alerta / alerta-contrib

Contributed integrations, plugins and custom webhooks
http://alerta.io
MIT License
119 stars 170 forks source link

Zabbix event doesn't get closed if it's not acked before closing #307

Closed burakksglu closed 3 years ago

burakksglu commented 4 years ago

Issue Summary Zabbix event doesn't get closed if it's not acked before closing

Environment

To Reproduce Steps to reproduce the behavior:

  1. Select a Zabbix generated alert in Alerta
  2. Click on close in Alerta (do not ack before this step)
  3. It will be closed on alerta but will stay open zabbix

Root cause seems to be selecting only acknowledged events from zabbix in the line below:

https://github.com/alerta/alerta-contrib/blob/0836ac391e892eb51480c1407bf4a3b24a88767d/plugins/zabbix/alerta_zabbix.py#L87

This doesn't bring the original event thus it is not closed.

Thanks.

satterly commented 4 years ago

Thanks for raising this issue. Is this something you think you could fix yourself?

burakksglu commented 4 years ago

I am not familiar with Zabbix api but I can help if you need anything from my side.

satterly commented 4 years ago

All you need to do is submit the code snippet above as a PR and test it. Then I'll merge. Easy.

burakksglu commented 4 years ago

Alright, I'll try to have a look this week when I have time.

satterly commented 3 years ago

Fixed by d18494b812bc0fcc0cab4cc3b2f288f31d4938cd