Ad Widget

Collapse

Only trigger alert after consecutive failures (using str)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • yossarianuk
    Junior Member
    • Apr 2020
    • 2

    #1

    Only trigger alert after consecutive failures (using str)

    Hi.

    I would like an alert to trigger only after a report of a failure occurs multiple consecutive times

    I have a script which sends, via zabbix-sender to the zabbix server string values.

    At present I have this trigger (as an example)

    Code:
    {TPL_IPA_Server:ipa.ntpd.service.str(STOPPED)}=1
    Which works fine to alert you when we have 1 fail.

    I want it to trigger only after X (say 3) fails in a row - how is this possible ?

    I have tried these triggers and all just trigger after 1 fail.

    Code:
    {TPL_IPA_Server:ipa.ntpd.service.str[B]([/B]STOPPED,#3[B])[/B]}=1
    Code:
    {{TPL_IPA_Server:ipa.ntpd.service.regexp(STOPPED,#3)}=1

    I have seen these threads however none have helped - i.e the trigger alerts after only 1 fail..





    Can anyone help me ?

    Cheers
  • yossarianuk
    Junior Member
    • Apr 2020
    • 2

    #2
    I ended up asking in the #Zabbix irc room and got an answer

    Which was

    Code:
    {TPL_IPA_Server:ipa.ntpd.service.count(#3,STOPPED)}=3
    Thanks

    Comment

    Working...