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

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

      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.

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

              Created:
              Updated:
              Resolved: