Ad Widget

Collapse

Web Monitoring - ticket ID

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pietro54
    Senior Member
    • Feb 2011
    • 112

    #1

    Web Monitoring - ticket ID

    Hello,
    Im looking for solution to monitor web services that send back ticket id after log on.

    Here`s the steps i need:
    1. http://site.com/webapi, ststus code 200, require - login

    2. Send login/password status code 200,
    webservice send me back my ticked ID

    3. Now I need to generate next link with that ticketID, it should look something like this:
    http://site.com/webapi?ticketID={myTICKET},getmyorders etc.

    My question is how to capture that ticketID and put in to my link automatically?
    Last edited by pietro54; 10-02-2013, 14:54.
  • heaje
    Senior Member
    Zabbix Certified Specialist
    • Sep 2009
    • 325

    #2
    I don't believe that web monitoring currently supports what you want it to do. You'll have to write a custom script that accomplishes what you want.

    Comment

    • pietro54
      Senior Member
      • Feb 2011
      • 112

      #3
      Thanks heaje for reply,

      maybe some one else got same type of problem?

      Comment

      • danrog
        Senior Member
        • Sep 2009
        • 164

        #4
        Take a look at my post

        Comment

        • NgRox
          Member
          • Jun 2022
          • 44

          #5
          Originally posted by pietro54
          Thanks heaje for reply,

          maybe some one else got same type of problem?
          You can use an item like zabbix agent and run the commands (If running on Linux):

          system.run['teste=$(curl -x GET https://url/ | jq .id) && curl https://url...id=$teste//)']

          Basically you run a remote command: system.run
          It runs a curl that generates the ID and saves it in a variable called test: curl -x GET https://url/ | jq .id --- (note that jq .id is the treatment of the result to obtain the id number without anything else)
          If this first command is executed successfully, it will run the second: &&
          The second will be a CURL in the other url and now you can pass the id that is saved in the test variable: curl https://url...id=$teste/

          Comment

          Working...