pagerduty with zabbix

Hi,

I have integrated pagerduty with zabbix. I have triggers on both prod and test servers. But I want pagerduty to notify only when the trigger belongs to prod servers and the severity is disaster. I tried changing the pd-zabbix file but the changes are not working. Any help is would be of great help.

changes made to push to pagerduty queue only when the severity level is disaster but this is not working. none of the below changes are working.

#if Disaster in severity:

if severity == Disaster

if Disaster in details

agent_config = load_agent_config()
queue_event(
    agent_config.get_enqueuer(),
    message_type, service_key, incident_key, description, "", "", details,
    agent_config.get_agent_id(), "pd-zabbix",)

Hi there,

This is Tom from the PagerDuty support team. Thanks for reaching out!

Rather than achieving this in Zabbix, you could opt to use Global Event Rules in PagerDuty to achieve this by filtering out events you don’t want to have trigger incidents. I recommend you take a read of the guide and get back to me with any questions you have about this process.

If you have any further questions or issues, please do not hesitate to reply to this email.

Kind regards,

Hello,

Just an additional thought:

One could achieve this by modifying the alert action (or, for good measure, creating a new one so that the default behavior is preserved and can easily be brought back). It should have all the same configuration, except for the “Use if severity” condition on the PagerDuty media type. That should be configured so that it only includes Disaster level alerts, by unchecking all the other severities.

The next thing to do would be giving the dummy integration user / user group view permission only on the production hosts, so that alerts for the test environment servers don’t get sent to it.

Hi,

Thanks for your help. That helped. One more question , as a part of integrating zabbix with pagerduty we have to export PD_SERVICE_KEY. But is there a way to set this up without exporting so that my zabbix would still be able to send the notifications to pagerduty as with export the moment I close my window , the variable would be unavailable

Thanks
Eswar

Hi @Ishvar,

The integration key should still be available by going to the “integrations” page of the service.

The behavior you describe (where the key is only visible once) applies only to REST API keys (and this is by design), which should not be used in the Zabbix integration (it doesn’t need to use the REST API, only the Events API via an integration key).

Thus, you should be able to set up the integration on the PagerDuty side first and then configure Zabbix later.

Hopefully that clears things up!

Hi Demitri,

Thanks. I have sorted that out. One more question, right now i am being notified when events are triggered in zabbix. So once i acknowledge these events in pagerduty, is it possible for pagerduty to acknowledge the corresponding even in zabbix? So i dont want to acknowledge events both on pagerduty and zabbix.

Thanks

Hi @Ishvar,

The Zabbix integration does not currently support this functionality, unfortunately.

Hi Demitri,

Thanks for your mail. One quick question, I want to know if I close incidents in zabbix that had an incident in pagerduty, would the pagerduty incident be closed on it own or do I need to go to pagerduty again to close it ? it seems to be not working as the incidents that are going in to resolved state in zabbix are not the propagating the status to pagerduty.

Thanks
Eswar

Hey Eswar!

Our Zabbix integration guide does refer to auto-resolving incidents in PagerDuty. The Recovery Operations tab mentioned in Step 5 of Create the alert action should be sending the created notification to PagerDuty.

If the guide and our troubleshooting steps aren’t helping in sending the recovery operation notifications, kindly submit an email to support@pagerduty.com with the specific events being sent for us to review.

Hi Geeth,

Thanks for your mail. I did follow the integration set up and there isn’t any issue with the zabbix pushing notifications to pagerduty. I want to know whether it is possible it is possible to push notifications backwards from pagerduty to zabbix which at this moment , i believe is not possible.

Thanks
Eswar

You’re right, this integration is not bidirectional at this time. This is a common feature request so we will pass this on to our Product team.

Is integration to icinga bi-directional?

Hello Eswar,

The native Icinga integration with PagerDuty is not bidirectional. However, some users have had success using the pd-nag-connector. You would need to reach out to the contributors listed on the page for documentation.

Thanks,

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.