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

Cannot evaluate function "last()" because of broken data

    XMLWordPrintable

Details

    • Incident report
    • Status: Closed
    • Trivial
    • Resolution: Cannot Reproduce
    • 3.4.14
    • None
    • Frontend (F), Server (S)
    • None

    Description

      I was not able to get a calculated item to work correctly.

      The server log outputs the following line:

      3347007:20181011:103327.080 item "csdra-s46:tomcat.globalrequestprocessor.requestAverageResponseTime" became not supported: Cannot evaluate function "last()": item "foohost: tomcat.globalrequestprocessor.processingTime" does not exist.
      

       

      The calculation form

      last("tomcat.globalrequestprocessor.processingTime")/last("tomcat.globalrequestprocessor.requestCount") / 1000

      I exported the template and discovered the following byte sequence:

       

      I removed that character and imported the fixed template:

      $ diff -u zbx_export_templates_exported.xml  zbx_export_templates_fixed.xml
      --- zbx_export_templates_exported.xml    2018-10-14 10:51:01.979270834 +0200
      +++ zbx_export_templates_fixed.xml    2018-10-14 10:51:49.986746548 +0200
      @@ -299,7 +299,7 @@
                           <snmpv3_authpassphrase/>
                           <snmpv3_privprotocol>0</snmpv3_privprotocol>
                           <snmpv3_privpassphrase/>
      -                    <params>last(    &quot;tomcat.globalrequestprocessor.processingTime&quot;)/last(&quot;tomcat.globalrequestprocessor.requestCount&quot;) / 1000</params>
      +                    <params>last(&quot;tomcat.globalrequestprocessor.processingTime&quot;)/last(&quot;tomcat.globalrequestprocessor.requestCount&quot;) / 1000</params>
                           <ipmi_sensor/>
                           <authtype>0</authtype>
                           <username/>

      This solved the problem instantly.

      Attachments

        1. image-2018-10-14-11-11-31-276.png
          409 kB
          Marc Schoechlin
        2. zbx_export_templates_exported.xml
          41 kB
          Marc Schoechlin
        3. zbx_export_templates_fixed.xml
          41 kB
          Marc Schoechlin

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: