Ad Widget

Collapse

Calculation of HTTP Agent Value

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • JamesPickup
    Junior Member
    • Sep 2024
    • 4

    #1

    Calculation of HTTP Agent Value

    I am attempting calculate an average from an HTTP Agent set of values, by 2 hours of Googling has left me more confused, so any help appreciated please.

    HTTP Agent returns the following every 5 mins:

    2024-09-06 09:55:58
    <channelStatistics>
    <serverId>06234d23-82cc-4764-a63f-6f5d1dee0e08</serverId>
    <channelId>53dbc431-4df0-4dba-9da7-4c8f214a9bfa</channelId>
    <received>4937</received>
    <sent>4572</sent>
    <error>139</error>
    <filtered>0</filtered>
    <queued>0</queued>
    </channelStatistics>

    I would like to calculate the average of the received number over the last hour.

    Failed calculations I have tried

    avg(/vmd1lmirthapp1/Channel.53dbc431-4df0-4dba-9da7-4c8f214a9bfa[<received>,values],1h)
    avg(/vmd1lmirthapp1/Channel.53dbc431-4df0-4dba-9da7-4c8f214a9bfa[/,<received>],1h)
  • Answer selected by JamesPickup at 09-09-2024, 18:38.
    cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    avg(/vmd1lmirthapp1/vmd1lmirthapp1.Received,1h)
    that looks like, it should work..
    function(/host/key,<parameter1>,<parameter2>,...)


    Same syntax should be good for a trigger calculation also.

    Comment

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

      #2
      You are trying to parse that data file directly in calculated item? What gave you that kind of idea?
      First you should split arrived data into dependentitems and then you can calculate your averages...

      Comment

      • JamesPickup
        Junior Member
        • Sep 2024
        • 4

        #3
        Thank you. ok, so I have already done that failed with the calculation there too.

        the dependant item returns this set of information (last hour):

        Timestamp vmd1lmirthapp1.Received
        2024-09-06 11:20:57 4939
        2024-09-06 11:15:58 4937
        2024-09-06 11:10:57 4937
        2024-09-06 11:05:58 4937
        2024-09-06 11:00:57 4937
        2024-09-06 10:55:58 4937
        2024-09-06 10:51:03 4937
        2024-09-06 10:45:58 4937
        2024-09-06 10:41:01 4937
        2024-09-06 10:35:57 4937
        2024-09-06 10:30:57 4937
        2024-09-06 10:25:57 4937

        and I have tried these calculations that all error. Clearly I dont know what I am doing, but I think I am close ;-)

        avg(/vmd1lmirthapp1/vmd1lmirthapp1.Received[values,vmd1lmirthapp1.Received],1h)
        avg(/vmd1lmirthapp1/vmd1lmirthapp1.Received[vmd1lmirthapp1.Received],1h)
        avg(/vmd1lmirthapp1/vmd1lmirthapp1.Received,1h)​

        Comment

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

          #4
          avg(/vmd1lmirthapp1/vmd1lmirthapp1.Received,1h)
          that looks like, it should work..
          function(/host/key,<parameter1>,<parameter2>,...)


          Same syntax should be good for a trigger calculation also.

          Comment

          • JamesPickup
            Junior Member
            • Sep 2024
            • 4

            #5
            Apologies, it does work when using the relevant syntax of an older version. I am very sorry for troubling you.
            Last edited by JamesPickup; 09-09-2024, 18:38.

            Comment

            Working...