Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-26778

Calculated items use old values in calculations

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Unresolved
    • Icon: Trivial Trivial
    • None
    • 7.0.17
    • Server (S)
    • None
    • Oracle Linux Server release 8.10

      Steps to reproduce:

      1. Add 3 hosts
      2. Configure an SNMP item with the following parameters:
         * Name: Manager: get metrics
         * Type: SNMP agent
         * Key: manager.get
         * Type of information: Text
         * SNMP OID: walk[enterprises.43925.73.1.1.1]
         * Update interval: 30s
         * History: Do not store
         * Preprocessing:
            Name: SNMP walk to JSON
            Field name: value
            OID prefix: .1.3.6.1.4.1.43925.73.1.1.1
            Format: Unchanged
         
      1. Configure a "Dependent item" that depends on "manager.get":
         * Name: ChangesRequests
         * Type: Dependent item
         * Key: enterprises.43925.73.1.1.1.8.1
         * Type of information: Numeric (unsigned)
         * History: 14d
         * Trends: 180d
         * Preprocessing:
            Name: JSONPath
            Parameters: $[?(@.['{#SNMPINDEX}'] == '8.1')].value.first()
         
      1. Include both items in a template and link this temlate to 2 hosts
      2. On the third host configure a "Calculated item" with the following parameters:
         * Name: ChangesRequests (aggregated)
         * Type: Calculated
         * Key: ChangesRequests_aggr
         * Type of information: Numeric (unsigned)
         * Formula: sum(last_foreach(/*/enterprises.43925.73.1.1.1.8.1?[group="{$MANAGER_HOSTGROUP}"]))
         * Update interval: 30s
         * History: 14d
         * Trends: 180d
         

      Set the value of macro {$MANAGER_HOSTGROUP} to the name of the group, that includes only the two hosts.

      Result:

      See screenshot

      Starting fromĀ 2025-07-28 16:02:45, the value of the calculated item (first column) does not change, even though the dependent item value on the first host is updating.

      Expected:
      The calculated item should reflect the latest values from the dependent items.

      Possible issue:
      The last_foreach(), sum(), or value cache may not be working correctly. I can't find problem itemids in the output of "zabbix_server -R diaginfo=valuecache".

        1. image-2025-07-31-20-05-42-374.png
          48 kB
          Pavel Kadichev
        2. image-2025-08-01-12-06-00-378.png
          86 kB
          Pavel Kadichev

            zabbix.support Zabbix Support Team
            p.kadichev Pavel Kadichev
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: