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

now-0s time shift not working in 5.4.0

    XMLWordPrintable

Details

    • Problem report
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 5.4.0
    • 5.4.10rc1, 6.0.0beta3, 6.0 (plan)
    • Server (S)
    • None
    • Zabbix 5.4.0 with MySQL 5.7
    • Team B
    • Sprint 83 (Dec 2021), Sprint 84 (Jan 2022), Sprint 85 (Feb 2022)
    • 0.25

    Description

      After upgrading from Zabbix 5.2.4 to 5.4.0, our calculated items that had "0" configured for its time shift was now converted to ":now-0s" which is not working.

      These calculated items are now reporting "invalid second parameter" error, eg.

      Cannot evaluate function: invalid second parameter at "avg(//jmx["com.example.com:type=key1","metric1"],#2:now-0s)"

      In Zabbix 5.2.4 the expression that worked was:

      avg("jmx[\"com.example.com:type=key1\",\"metric1\"]",#2,0)

      To fix the issue I had to go and search the database for all calculated items that included "%now-0s%" and then I went into the UI to fix it by simply removing ":now-0s":

      SELECT h.host, i.* FROM items i
      LEFT JOIN hosts h ON h.hostid = i.hostid
      WHERE i.type=15
      AND i.params LIKE '%now-0s%'
      ORDER BY i.name desc

      I kind of expected this timeshift of now-0s to work, or that the migration should have excluded it from the expression.

      Attachments

        Activity

          People

            ssimonenko Sergey Simonenko
            pada Chris Kistner
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: