Ad Widget

Collapse

Measure HTTP Agent response time

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • MitchC
    Junior Member
    • Jun 2023
    • 4

    #1

    Measure HTTP Agent response time

    Zabbix 6.4.3 on Ubuntu 22.04 (mysql)

    I've been successful at using the HTTP Agent to retrieve information in JSON and pull a value from the result.
    How do I measure the response time of that HTTP request?
    The only way that I've discovered to measure the response time is with a Web Scenario. I don't really want to have both of those items hitting the server.
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    #2
    http items do not record that time, so you need to have another item... Not necessarily web scenario... there are also web related items https://www.zabbix.com/documentation...onitoring-data
    But then again.. those are not executed from server/proxy, so results are not completely comparable... If you use agent on server/proxy, it might be similar...

    Comment

    • Semiadmin
      Senior Member
      • Oct 2014
      • 1625

      #3
      You may try a script item with HttpRequest object instead of http agent. In JS you may get timestamps before and after http request and add difference to returned JSON as another key-value pair.

      Comment

      • MitchC
        Junior Member
        • Jun 2023
        • 4

        #4
        Semiadmin That worked well, thanks.

        I'm surprised that elapsed time is not available in the HTTP Agent - seems like a no-brainer to me.

        Comment

        • cyber
          Senior Member
          Zabbix Certified SpecialistZabbix Certified Professional
          • Dec 2006
          • 4807

          #5
          Originally posted by MitchC
          Semiadmin That worked well, thanks.

          I'm surprised that elapsed time is not available in the HTTP Agent - seems like a no-brainer to me.
          I think original idea for http items has been getting the data, not measuring performance.. performance measurements are part of web scenarios and special items..
          And no-brainer or not, it is against the 1 item, 1 value policy. It would turn http items into something else, where it creates multiple items or you need to have dependent items etc...

          Comment

          Working...