Ad Widget

Collapse

Text item requires numeric float in trigger? BUG

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • siegmarb
    Junior Member
    • Nov 2014
    • 25

    #1

    Text item requires numeric float in trigger? BUG

    Hi,

    Item Type: Text

    Trigger:

    ({postfix_Mailserver_Queue:system.run["postqueue -p | grep '\d{2}:\d{2}:\d{2}' || echo 0"].last()}<>0) and
    ({postfix_Mailserver_Queue:system.run["postqueue -p | grep '\d{2}:\d{2}:\d{2}' || echo 0"].change()}=0)

    Cannot evaluate expression: expected numeric token at "69F1B2772 3464 Tue Apr 3 11:10:22 [email protected])<>0) and
    (1=0)".

    This looks like a bug or am i missing something?
  • dimir
    Zabbix developer
    • Apr 2011
    • 1080

    #2
    Just tried in latest trunk it looks fine. Which version is that?

    Comment

    • siegmarb
      Junior Member
      • Nov 2014
      • 25

      #3
      It's 3.4.7. latest stable.

      Comment

      • Atsushi
        Senior Member
        • Aug 2013
        • 2028

        #4
        Please check the first part of the trigger expression.

        Since you are using last(), the left side of the trigger expression is text type.
        If you want compare 0 with trigger expressions, the value of the item you compare will need to be a number.
        Text and numbers can not be compared directly.

        If you want to compare with text, the function should use regexp() or str().

        Comment

        • siegmarb
          Junior Member
          • Nov 2014
          • 25

          #5
          DOH! Thank you - thats it!

          Comment

          Working...