View Full Version : Trigger after x number of samples
bytesize
03-02-2006, 22:06
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
{__Items_Critical_Websites:http.max(30)}=0
bytesize
06-02-2006, 09:50
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
Sorry, I meant {__Items_Critical_Websites:http.max(60)}=0
bytesize
06-02-2006, 14:54
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)&({__Items_Critical_Websites:http.prev(0)}=0)
I hope this makes sense! Thanks!
John
{__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
bytesize
06-02-2006, 15:35
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