Ad Widget

Collapse

Trigger to check last 5 values of string item

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sagar
    Junior Member
    • Jun 2013
    • 3

    #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 5 values is "rsync failed".

    Can someone help me with this trigger configuration ?
  • sagar
    Junior Member
    • Jun 2013
    • 3

    #2
    Finally got it working

    Here is what I did:

    {Server:rsync.status.count(#5,"rsync failed","eq")}>4

    Comment

    • abonne01
      Junior Member
      • Dec 2011
      • 15

      #3
      Thanks ! I was also looking for that.

      Comment

      • rafaeloening
        Junior Member
        • Apr 2018
        • 1

        #4
        Thanks Sagar, it help me too!!

        Comment

        • brunohl
          Senior Member
          Zabbix Certified Specialist
          • Mar 2019
          • 215

          #5
          Originally posted by sagar
          Finally got it working

          Here is what I did:

          {Server:rsync.status.count(#5,"rsync failed","eq")}>4
          Great Work!!

          That did the trick.

          Thank you so much.

          Comment

          • RaulChiarella
            Member
            • Apr 2021
            • 59

            #6
            Originally posted by sagar
            Finally got it working

            Here is what I did:

            {Server:rsync.status.count(#5,"rsync failed","eq")}>4
            Hello there!
            What does the >4 part did? Can someone clarify?

            Comment

            • aconte
              Junior Member
              • Feb 2023
              • 2

              #7
              Originally posted by RaulChiarella

              Hello there!
              What does the >4 part did? Can someone clarify?
              Hello,

              My guess is that the >4 is to validate the fact that the trigger factors have been reached 5 time in a row.

              Comment

              Working...