Ad Widget

Collapse

Trigger after x number of samples

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bytesize
    Member
    • Aug 2005
    • 71

    #1

    Trigger after x number of samples

    Hi,

    I would like to create a trigger which only activates once a specified number of samples have registered as true. For example, this expression:

    {__Items_Critical_Websites:http.last(2)}=0

    ...should only trigger after two samples (of 30 seconds apart) have failed consecutively.

    Is this possible? Thanks!

    John
  • Alexei
    Founder, CEO
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2004
    • 5654

    #2
    {__Items_Critical_Websites:http.max(30)}=0
    Alexei Vladishev
    Creator of Zabbix, Product manager
    New York | Tokyo | Riga
    My Twitter

    Comment

    • bytesize
      Member
      • Aug 2005
      • 71

      #3
      Hi Alexei,

      Thanks for the reply, but I don't think Max will do what I'm after.

      Basically I only want an alert generated if the status of a website is "0" over 60 seconds. I sample the website every 30 seconds, so I only want the Zabbix trigger to action if two samples have both returned 0, one after the other. Without this I get false positives if I couldn't contact the website on one occasion.

      So, if I get these samples (every 30 seconds):

      1 0 1 (Zabbix trigger = false)
      0 1 0 (Zabbix trigger = false)
      1 0 0 (Zabbix trigger = true)

      Can this be done?

      Thanks!

      John

      Comment

      • Alexei
        Founder, CEO
        Zabbix Certified Trainer
        Zabbix Certified SpecialistZabbix Certified Professional
        • Sep 2004
        • 5654

        #4
        Sorry, I meant {__Items_Critical_Websites:http.max(60)}=0
        Alexei Vladishev
        Creator of Zabbix, Product manager
        New York | Tokyo | Riga
        My Twitter

        Comment

        • bytesize
          Member
          • Aug 2005
          • 71

          #5
          Hi Alexei,

          I have probably got confused here, but according to the documentation, max is "Maximal value for period of time. Parameter defines length of the period in seconds."

          So if I understand correctly the parameter above would become true even if there was only one sample out of two which returned 0?

          I actually only want the trigger to action if both samples return 0, not just one sample within 60 seconds. Something which functions like this:

          ({__Items_Critical_Websites:http.last(0)}=0)&({__I tems_Critical_Websites:http.prev(0)}=0)

          I hope this makes sense! Thanks!

          John
          Last edited by bytesize; 06-02-2006, 16:00.

          Comment

          • Alexei
            Founder, CEO
            Zabbix Certified Trainer
            Zabbix Certified SpecialistZabbix Certified Professional
            • Sep 2004
            • 5654

            #6
            {__Items_Critical_Websites:http.max(60)}=0:

            Come on The expression will activate a trigger if all values will be equal to zero within last 60 seconds. That's exactly what you want!

            0sec | 30 sec | 60 sec
            001 - FALSE
            010 - FALSE
            100 - TRUE
            Alexei Vladishev
            Creator of Zabbix, Product manager
            New York | Tokyo | Riga
            My Twitter

            Comment

            • bytesize
              Member
              • Aug 2005
              • 71

              #7
              Thanks Alexei - I'll stop being dumb now!

              Great work with Zabbix; its miles better than any systems monitoring tool I have used before!

              John

              Comment

              Working...