v-zhuravlev / zabbix-notify

Notify alarms from Zabbix to Slack Hipchat and PagerDuty
GNU General Public License v3.0
133 stars 35 forks source link

[Option] Do not send recovery message if problem message was not sent for a particular event #47

Open gregolsky opened 4 years ago

gregolsky commented 4 years ago

I use Zabbix escalation steps (e.g. esc period 10 minutes, esc step >1) and some of the notifications are only send after some time when the PROBLEM appears (in some subsequent escalation step). Sometimes it just goes away before PROBLEM message is sent and then the recovery message is sent for no reason (as the PROBLEM notification did not show up at all yet).

Could you add an option to skip sending recovery message if the problem message has not been send yet? This could be achieved with writing event IDs for which message was send to a temp file and during the recovery step you'd check if it's there, maybe?

I would have send a PR, yet I'm not that familiar with perl unfortunately.