Ad Widget

Collapse

Trigger not firing (possible V7 issue, possibly an upgrade mistake)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Linwood
    Senior Member
    • Dec 2013
    • 398

    #1

    Trigger not firing (possible V7 issue, possibly an upgrade mistake)


    I have 6.0.5 running in several clients and decided to start on V7 so I'll be ready when it releases. I built up a new home VM with Alpha 8, loaded the old database, fixed a bunch of odds and ends, and most stuff works, but...

    I have some triggers that are simply not working and not sure why. I suspect that I have failed to see some change between 6.0.5 and now, which is why I am here not reporting a bug.

    My underlying question is whether there is a good way to debug a trigger that I think should fire and is not.

    The trigger expression is a self-recovering one (i.e. no recovery expression) and is this:

    Code:
    ( {$EDGE_DEVICE}=1 and {TRIGGER.VALUE}=0 and last(/Flood8/pingCheck[{HOST.CONN},{HOST.HOST},{$INTERFACE_IP}])=0  ) or
    ( {$EDGE_DEVICE}=0 and {TRIGGER.VALUE}=0 and max (/Flood8/pingCheck[{HOST.CONN},{HOST.HOST},{$INTERFACE_IP}],#2)=0  ) or
    ( {TRIGGER.VALUE}=1 and min(/Flood8/pingCheck[{HOST.CONN},{HOST.HOST},{$INTERFACE_IP}],10m)=0  )​
    pingCheck is an external check. It's value is a solid zero (the device is powered off and has been). It polls every minute and does show zero (down). I can see the history, graph it, etc.

    $EDGE_DEVICE is zero (though it really shouldn't matter here).

    The trigger shows a solid "OK" on the trigger display.

    The 6.0.5 version is still running and is identical for this host, and does show the trigger as triggered, which is correct. The 7.0 version is not showing anything in the log set to info.

    I started a new log and did a log level increase for a couple minutes, and I can see the min and last evaluating and giving the expected value (zero). I can find expressions that are in the trigger being evaluated (as expected). I do not see any errors. I cannot find the actual evaluation of the fully evaluated trigger, at least not for sure. I do see things that may be it like this:

    Code:
    578403:20231207:044926.233 evaluate_expression(): ( 0=1 and "{TRIGGER.VALUE}"=0 and 0=0  ) or
    ( 0=0 and "{TRIGGER.VALUE}"=0 and 0=0  ) or
    ( "{TRIGGER.VALUE}"=1 and 0=0  ) => 0
    The problem is I think this is interleaved with multiple triggers, so I cannot tell if the final evaluation much less the right trigger, but to me this APPEARS to evaluate incorrectly, since it evaluates to zero not 1. And whether trigger.value is zero or one it looks like one of those last two conditions will end up true.

    What I do know is with (I think) the same database (one upgraded) and same IP, I am not getting a trigger in 7.

    Am I missing something? Is there a way to actually isolate the evaluation of one trigger like this?


  • Linwood
    Senior Member
    • Dec 2013
    • 398

    #2
    Yeah, this is just broken. Perhaps I need to move this to the alpha feedback channel.

    Here is what I think demonstrates the issue, though it does not help localize it very well. It appears to relate to the evaluation of {TRIGGER.VALUE} perhaps in conjunction with the OR statements.

    I duplicated the templated trigger (first line) and then changed it to remove the trigger.value macro entirely (third line). notice it went to error. That's not exactly a complete test as the trigger value was effectively selecting one of the other tests, so I changed it again to do an AND between the first two (normally trigger-value = 0) and last expression (trigger.value=1). This shows that both sets evaluate as a problem, and so their OR should as well. But it doesn't.

    I then (second line) did it with a recovery expression that should be identical to the first. It also goes to error.

    I have a bunch of templates that pre-date the recovery expression that are constructed like this, and I suspect there is a lot of old code out there.

    But it looks like including trigger.value is not working properly in 7.0 Alpha 8, unless the definition has changed (and I can't find any documentation to indicate it did).

    I'm going to move (ok, duplicate as I can't move) this discussion to the feedback forum. Please reply there (https://www.zabbix.com/forum/zabbix-...er-expressions )


    Click image for larger version  Name:	trigger.jpg Views:	0 Size:	141.0 KB ID:	475523


    Attached Files
    Last edited by Linwood; 07-12-2023, 18:36.

    Comment

    Working...