2

Summary: Need almost all triggers to only send action after 5 minutes of being down. In this case, page after 5 minutes after 71F.

Polling is set for 30 seconds. Would like to keep this as the graphing is nice.

Temp = item

{Device:Temp.last(300)}>71

Problem: I get a email usually after a minute and not the 5 minutes.

I've tired

{Device:Temp.last()}>71 and {Device:Temp.min(5)}=0

Update: I was able to accomplish this goal using actions (Configuration->Actions->Operations) but the recovery action still comes in and there isn't a way to add a "delay" to it.

Ex. Problem was down for 5 minutes, comes up for one minute then goes right back down. Don't need to know about that one minute if it does right back down. This will prevent flap.

Jeff
  • 21
  • 1
  • 3
  • A duplicate of https://stackoverflow.com/questions/43605281/how-to-teach-zabbix-to-be-smart-about-short-spikes-in-events . – Richlv Jan 14 '19 at 13:17
  • Possible duplicate of [How to teach Zabbix to be smart about short spikes in events?](https://stackoverflow.com/questions/43605281/how-to-teach-zabbix-to-be-smart-about-short-spikes-in-events) – Richlv Jan 14 '19 at 13:17
  • @Richlv Similar but not the same. I can't use that logic for this issue. – Jeff Mar 15 '19 at 14:37
  • Please explain why you cannot use that logic. Based on your question, `min(5m)>71` might work. Note that the `min(5)` you have in the question is 5 seconds, which will almost always fail. – Richlv Mar 15 '19 at 18:07

3 Answers3

2

Trigger function .last() will always be just one single value. Time parameter, like .last(5m) is completely ignored. Sequence parameter, like .last(#5) will evaluate 5th value, not last 5 values.

Which means, that if you want to evaluate multiple values, you need to use different trigger functions. Let's say: 0=down and 1=up You want to alarm when last 5 checks report that host is down. Trigger function would be .max(#5)=0

In case if you want to keep all the trigger configuration as they are now, and only postpone execution of Actions, you need to change Operations tab of Action. By default first step will be 1-1, if you will change it to 2-2 it will execute only after Default operation step duration.

1

You need to set action on average value of a period (300 seconds).

Try avg(300) instead of last(300).

1

Old question, however, min (or max) is also a good method to measure time frame for some trigger to be fired.
Example of trigger expression:

min(/hostname/zabbix.key,20m)<>your-result

Trigger will be executed after 20 minutes when defined zabbix.key is not equal your defined your-result.

More on manual: https://www.zabbix.com/documentation/current/manual/config/triggers/expression

frank_108
  • 640
  • 5
  • 10