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

Trigger using "length" gives error

    XMLWordPrintable

Details

    • Problem report
    • Status: Closed
    • Trivial
    • Resolution: Cannot Reproduce
    • 5.4.1
    • None
    • Server (S)
    • None
    • Debian 10.9
      Zabbix 5.4.1
      php 7.3.27
      mysql Ver 15.1 Distrib 10.3.27-MariaDB

    Description

      Steps to reproduce:

      1. Create an Item on a Linux host that monitors a log file, using a regex: logrt[/var/log/syslog,"(?i)error:"]
      2. Create a trigger using the following expression: length(last(/hostname.com/logrt[/var/log/syslog,"(?i)error:"]))>=1
      3. Using the Expression Constructor, test the expression.  Note that when text is entered in the box it returns true, when text is removed from the box it returns false.
      4. Save the trigger with the expression.
      5. Note the error that is shown "Cannot convert expression result of type "string" to floating point value"

      Result:
      The trigger is saved/updated, but shows an error "Cannot convert expression result of type "string" to floating point value"
      Trigger does not work and cannot be used.
      Expected:
      I expected that length would return a number that that is either 0, or the number of characters in {{last(/hostname.com/logrt[/var/log/syslog,"(?i)error:"]) }}and be triggerable on this.

      Attachments

        Activity

          People

            zabbix.support Zabbix Support Team
            tjh Tim Harman
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: