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

Nested Trigger Functions May Not Always Work as Expected

    XMLWordPrintable

Details

    • Problem report
    • Status: Open
    • Trivial
    • Resolution: Unresolved
    • 5.4.4
    • None
    • Server (S)
    • Rocky Linux 8.4.2105, Zabbix Version 5.4.4

    Description

      When using nested trigger function sum() and trendcount() in a trigger expression it appears that the time shift in my trigger expression is ignored. This is my trigger expression:

       

      sum(trendcount(/test/test.test,3h:now/h-3h))>0

       

      Steps to reproduce:

       

      I've set the timezone on my system and the Zabbix Frontend to both be on UTC time and the current time is 19:55 UTC (Zulu). This should mean that the trend values used for determining if the above trigger is a PROBLEM or OKAY would be from the 1400, 1500, and 1600 hours. Without a timeshift parameter in the expression, the last 3 hours of trends would be 1700, 1800 and 1900.

       

      [[email protected] ~]# date
      Sun Sep 19 19:55:21 UTC 2021

       

      When I run the following script the trigger reports as okay in the web frontend, but this should actually yield a result of "1" from the expression above:

      [[email protected] ~]# for min in `seq 0 5`; do c=$(date --date="2021-09-19T*14*:${min}0:00" +%s); echo test test.test $c 95; done > file.out; zabbix_sender -i file.out -T -z 127.0.0.1
      Response from "127.0.0.1:10051": "processed: 6; failed: 0; total: 6; seconds spent: 0.000054"

       

      However when I change the timestamp parameter that I'm generating in the above script to be the 1700, 1800 or 1900 hour the trigger shows as a PROBLEM in the web frontend which seems to indicate that the timeshift is ignored in trigger expression

       

      [[email protected] ~]# for min in `seq 0 5`; do c=$(date --date="2021-09-19T*17*:${min}0:00" +%s); echo test test.test $c 95; done > file.out; zabbix_sender -i file.out -T -z 127.0.0.1
      Response from "127.0.0.1:10051": "processed: 6; failed: 0; total: 6; seconds spent: 0.000054"

       

       

      Is the timeshift being ignored or is there something else that is happening here?

       

      Attachments

        Activity

          People

            ssimonenko Sergey Simonenko
            GRyan337 Ryan Eberly
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: