Start Using PagerDuty Today
Try PagerDuty free for 14 days — no credit card required.
Checkmk is built on top of Nagios, which is one of the leading providers of open source and enterprise-grade IT infrastructure monitoring tools. Used by hundreds of thousands of users worldwide, Nagios allows its users to monitor their entire IT infrastructure, spot problems before they occur, detect security breaches and plan/budget for IT upgrades. By integrating PagerDuty into your existing Checkmk monitoring solution, you can have alerts go directly to the the person on-call in your PagerDuty schedule.
This guide describes how to integrate Checkmk 1.2.x, by itself or as part of the Open Monitoring Distribution (OMD), with PagerDuty using our easy to install agent. Note that you must be logged in as root
to complete the installation. You might need to slightly alter these instructions depending on your exact Linux distribution as well as your Checkmk configuration and version. Please contact our Support team if you have any trouble completing the integration.
Note: If you are running Nagios on CentOS 5, you will need to use the Perl-based integration for Checkmk instead of following this guide.
This guide includes steps for the standalone version of Checkmk as well as the OMD version. You will need to adjust the paths used depending on the version of Checkmk you’re using. Note that all commands provided are intended to be run as the root
user.
pagerduty-agent
from GitHub and make it executable:
wget https://gist.githubusercontent.com/Deconstrained/466645559c28240472f44864658ee48f/raw/0bbb795ee3309273a1dfe5d5269b4b8f2810d67e/pagerduty-agent chmod +x pagerduty-agent
pagerduty-agent
is a notification script for Checkmk and is not the agent or a replacement for it. You must still install the agent separately.
/usr/share/check_mk/notifications
:
mv pagerduty-agent /usr/share/check_mk/notifications
For the OMD version of Checkmk this is usually /omd/sites/{site-name-here}/local/share/check_mk/notifications
:
mv pagerduty-agent /omd/sites/{site-name-here}/local/share/check_mk/notifications
You can test the integration to make sure everything works as expected by going to a host or service in the Checkmk interface and clicking the Execute icon (hammer). In the Fake check results box, click Critical (if on a service) or Down (if on a host), then click Yes! to confirm you want to send the fake alert. You should see a new incident created in PagerDuty momentarily, however keep in mind that the test incident may be resolved quickly, as the fake check results are replaced by real check results on the next scheduled check.
This is most easily accomplished with Event Rules, but it is also possible to do this within Checkmk itself by having each Checkmk service in PagerDuty directly mapped to a user in Checkmk. In order to configure multiple services, just create multiple users in Checkmk with different names (i.e. pagerduty_database
, pagerduty_network
, etc). Then copy and paste the corresponding Integration Key from PagerDuty into the Notification Method parameters/Plugin Arguments field. Don’t forget to activate your changes for the configuration to take effect.
Note: If you are using Rules in Checkmk to control which contact is notified under different conditions, note that the rules are tried sequentially, and only the first rule whose criteria match will be applied and used.
If a PagerDuty server can’t be reached for any reason, events will be stored to an on-disk queue. The PagerDuty agent will attempt to re-send the events when connectivity is restored.
You should configure an external ping check service such as StatusCake or NodePing to monitor your site’s external connectivity. Of course, you can use PagerDuty to receive alerts from these services as well.
First, make sure you’ve installed the PagerDuty Agent, and that there were no errors from your package manager when attempting to install it. Failed installs (i.e. due to an incompatible distribution, such as CentOS 5) are the most common issue with the integration not working.
Other common issues include the integration key being changed (i.e. from a user regenerating the key, or deleting and re-creating the Checkmk service in PagerDuty), or using the wrong integration type (i.e. Generic API instead of Checkmk).
If Checkmk alerts still aren’t triggering incidents in PagerDuty, check the notification log at /var/log/nagios.log
(for the standalone version of Checkmk) or /omd/sites/{site-name-here}/var/log/nagios.log
(for the OMD version) for potential errors, or contact our Support team for assistance.
PagerDuty can process PROBLEM
, ACKNOWLEDGEMENT
, and RECOVERY
messages. All other messages, including FLAPPINGSTART
and FLAPPINGSTOP
, or custom messages, are ignored.
Try PagerDuty free for 14 days — no credit card required.