Ad Widget

Collapse

Upgraded from 6.0 to 6.2 Aggregate functions not working.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Jordan.g
    Junior Member
    • Mar 2021
    • 1

    #1

    Upgraded from 6.0 to 6.2 Aggregate functions not working.

    Good Morning,


    Currently in our environment we are using Zabbix to monitor a number of end points. There is an issue that causes communication issues and the units log these entries in /var/log.

    So I setup a task

    system.run["grep -c ConnectionError /var/log/file.log"] and pre processing of simple change. Occasional timeouts are not out of the ordinary. So I setup a dummy host to do an aggregate check.

    sum(last_foreach(/*/system.run["grep -c ConnectError /var/log/file.log"]?[group="endpoints"],5m))

    (This isn't exact I wanted to keep proprietary info out but the syntax is sound.)

    Anyway the host item on the endpoint works. and that aggregate calculation on the host worked when we had 6.0 when Zabbix was upgraded to 6.2 that aggregate calculation broke.

    I now get the following error:
    • Cannot evaluate expression: no input data for function at "sum(last_foreach(/*/system.run["grep -c ConnectError /var/log/file.log"]?[group="endpoints"],5m))"
    I have done everything I can think of to resolve this and for whatever reason this calculation is not working. And it worked 6.0 and is broken in 6.2

    Any input would be appreciated.
  • ilja
    Junior Member
    • Jan 2023
    • 14

    #2
    Originally posted by Jordan.g
    Good Morning,


    Currently in our environment we are using Zabbix to monitor a number of end points. There is an issue that causes communication issues and the units log these entries in /var/log.

    So I setup a task

    system.run["grep -c ConnectionError /var/log/file.log"] and pre processing of simple change. Occasional timeouts are not out of the ordinary. So I setup a dummy host to do an aggregate check.

    sum(last_foreach(/*/system.run["grep -c ConnectError /var/log/file.log"]?[group="endpoints"],5m))

    (This isn't exact I wanted to keep proprietary info out but the syntax is sound.)

    Anyway the host item on the endpoint works. and that aggregate calculation on the host worked when we had 6.0 when Zabbix was upgraded to 6.2 that aggregate calculation broke.

    I now get the following error:
    • Cannot evaluate expression: no input data for function at "sum(last_foreach(/*/system.run["grep -c ConnectError /var/log/file.log"]?[group="endpoints"],5m))"
    I have done everything I can think of to resolve this and for whatever reason this calculation is not working. And it worked 6.0 and is broken in 6.2

    Any input would be appreciated.
    Hello! Any luck with find out the reason of the problem? I have similar issue with my formula: max(max_foreach(/BILLING-DB-01/50prcntExTime[*]?[tag="50pr_of_inquiries:GprsGxService.onStart_"],1m)) .

    Comment

    • grantd
      Junior Member
      • Jun 2015
      • 6

      #3

      I know this is an old post, but figured I would reply. I found that when using the test function of the item, I had to use the group ID number instead of the group name, but for it to work as an actual item, it had to be the group name and not the group number.

      This meant for me to do this: sum(last_foreach(/*/vmware.hv.vm.num[{$URL},{$UUID}]?[group="ESX"]))
      To test before creating/updating the item, it had to look like this: sum(last_foreach(/*/vmware.hv.vm.num[{$URL},{$UUID}]?[group="121"]))
      Where the host group ID for "ESX" was "121"
      And then change it back to "ESX" when adding/updating the item for it to work on the interval.



      Also want to point out that in Zabbix 4.0, you couldn't directly use aggregate functions across items that had macros in the item key, and the workaround was to add a macro on the host entry that would contain the aggregate items and the value of that macro was the name of the macro used in the item keys.

      Example, if you wanted to do a grpsum of these items on many hosts: vmware.hv.vm.num[{$URL},{$UUID}]
      Your key would look like this: grpsum["ESX","vmware.hv.vm.num[{$HOST_URL},{$HOST_UUID}]",last]
      Where the host had macros like:
      {$HOST_URL} = {$URL}
      {$HOST_UUID} = {$UUID}

      So I just had to go through and update all my aggregate functions and replace {$HOST_URL} with {$URL} and {$HOST_UUID} with {$UUID} as they no longer will do macro replacements/evaluations.

      Comment

      Working...