Ad Widget

Collapse

Trigger to check last 5 values of string item!!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ikleinie
    Junior Member
    • Mar 2020
    • 1

    #1

    Trigger to check last 5 values of string item!!

    Hi,

    I have set a UserParameter that sends "rsync failed" on rsync failure.
    I want to set a trigger that fires on 5 consecutive rsync failed alerts
    I tried below Trigger expression

    {Server:rsync.status.str("rsync failed",#5)}=1 & {Server:rsync.status.str("rsync failed",#4)}=1 & {Server:rsync.status.str("rsync failed",#3)}=1 & {Server:rsync.status.str("rsync failed",#2)}=1 & {Server:rsync.status.str("rsync failed",#1)}=1
    but is not working. The trigger fires even if any one of the previous roadrunner email 5 values is "rsync failed".

    Can someone help me with this trigger configuration ?
    Last edited by ikleinie; 16-03-2020, 12:05. Reason: spelling
  • Hamardaban
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • May 2019
    • 2713

    #2
    Your trigger doesn't work because you have the wrong idea of how the str(#) function works: "If more than one value is processed, '1' is returned if there is at least one matching value."
    Maybe you should use something like count(#5,"failed",like)=5 ...

    Comment

    Working...