Uploaded image for project: 'ZABBIX FEATURE REQUESTS'
  1. ZABBIX FEATURE REQUESTS
  2. ZBXNEXT-2971

Calculated items: alternative handling of division by zero or unavailable values

    XMLWordPrintable

Details

    • Change Request
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.0.15
    • None
    • Server (S)

    Description

      We calculate request response times of our application by a calculated value:

      requests.total_processing_time:
      => sum of all request processing times
      => Store value : Delta (Simple change)

      requests.count: count of all requests
      => sum of all request processing times
      => Store value : Delta (Simple change)

      Expression:

      last("requests.total_processing_time") / 
      ( 
         last("requests.count") + 
         count("requests.count",#1,0) 
      )
      

      We added the expression 'count("requests.count",#1,0)' to prevent a division by zero.
      Otherwise, Zabbix alters the calculated item to "unsupported" if at least one item is not available or a division by zero appears and reactivates the item after the configured value for "Refresh unsupported items".
      (Administration => General => Other)
      We do not want to increase this value only for reactivating calculated items faster.

      From our point of view a adeuqate solution might be:
      A option "skip on calculation problems" which just skips the calculation if a division by zero appears of a item is not available.
      No value will be stored - the user should see a measurement hole.

      Why do we not calculate the performance measure in the application?
      Adding values to requests.total_processing_time and requests.count is very useful, because :

      • the measurement frequency of these value can be changed without changing the application
      • the calculated/displayed values are standardized and not depended to the measuement frequency
      • the application code for requests.total_processing_time and requests.count can be very simple from locking and queueing point of view

      Attachments

        Activity

          People

            Unassigned Unassigned
            scoopex Marc Schoechlin
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: