Ad Widget

Collapse

Can't use {TRIGGER.VALUE} in trigger - Zabbix 1.6.6

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • whowd
    Junior Member
    • Jul 2007
    • 28

    #1

    Can't use {TRIGGER.VALUE} in trigger - Zabbix 1.6.6

    Anytime I try to use {TRIGGER.VALUE} in a trigger I receive the following message:

    Code:
    An item key must be used in trigger expression
    Here's a new a trigger I'm trying to setup:

    Code:
    (({Template_Website:http,80.sum(#3)}=0)&{TRIGGER.VALUE}=0)|(({TRIGGER.VALUE}=1)&({Template_Website:http,80.sum(#6)}#6))
    I will also receive this error if I go and try to edit an existing trigger that I had defined with a {TRIGGER.VALUE} entry. I upgraded to 1.6.6 from 1.6.2 a few weeks ago.

    Any ideas?
  • MrKen
    Senior Member
    • Oct 2008
    • 652

    #2
    Just guessing here, but what if you put extra brackets around the Trigger.Value expression? ({TRIGGER.VALUE}=0))

    (({Template_Website:http,80.sum(#3)}=0)&({TRIGGER. VALUE}=0))|etc...
    Disclaimer: All of the above is pure speculation.

    Comment

    • whowd
      Junior Member
      • Jul 2007
      • 28

      #3
      Even with the extra brackets, it returns the same message

      Comment

      • nms_user
        Member
        • Feb 2009
        • 43

        #4
        Same problem here, doesn't work with the following trigger-expression:
        Code:
        ({TRIGGER.VALUE}=0&{SensGroup_TempRZ:sensor_temperature.last(0)}>25) | 
        ({TRIGGER.VALUE}=1&{SensGroup_TempRZ:sensor_temperature.last(0)}>22)
        This also doesn't work with double brackets...

        Always the error "An item key must be used in trigger expression".

        Is this a bug in expression-parsing on the "Save"-Button in the web gui? Existing hysteresis-expressions which were created in earlier zabbix-versions are running fine as long as I don't want to change them via gui...
        Last edited by nms_user; 17-09-2009, 06:26.

        Comment

        • richlv
          Senior Member
          Zabbix Certified Trainer
          Zabbix Certified SpecialistZabbix Certified Professional
          • Oct 2005
          • 3112

          #5
          Zabbix 3.0 Network Monitoring book

          Comment

          • whowd
            Junior Member
            • Jul 2007
            • 28

            #6
            I applied the fix in the bug details, changing the lines at 625/626 to the following:

            Code:
                                    if($arr[ZBX_EXPRESSION_MACRO_ID]) {
                                            if (!isset($ZBX_TR_EXPR_ALLOWED_MACROS[$arr[ZBX_EXPRESSION_MACRO_ID]]) ){
                                                    error('Unknown macro ['.$arr[ZBX_EXPRESSION_MACRO_ID].']');
                                                    return false;
                                            }
                                    }

            I could then add triggers with {TRIGGER.VALUE}

            Comment

            Working...