Check_MK Integration

Check_MK is an extension to the Nagios monitoring system that allows creating rule-based configurations using Python and offloading work from the Nagios core to make it scale better, allowing more systems to be monitored from a single Nagios server.


What does Opsgenie offer Check_MK users?

Use Opsgenie's Check_MK Integration to forward Check_MK notifications to Opsgenie. Opsgenie determines the right people to notify based on on-call schedules– notifies via email, text messages (SMS), phone calls and iOS & Android push notifications, and escalates alerts until the alert is acknowledged or closed.

Functionality of the integration

  • When a host or service state becomes down in Check_MK, an alert is created in Opsgenie.
  • When the problem is acknowledged in Check_MK, the alert is acknowledged in Opsgenie.
  • When the state of host becomes UP or the state of service becomes OK again in Check_MK, the alert is closed in Opsgenie.

Add Check_MK Integration in Opsgenie

  1. Please create an Opsgenie account if you haven't done so already.
  2. Go to Opsgenie Check_MK Integration page.


For Free and Essentials plans, you can only add the integrations from the Team Dashboards, please use the alternative instructions given below to add this integration.

  1. Specify who is notified for Check_MK alerts using the Teams field. Auto-complete suggestions are provided as you type.


An alternative for Step 2) and Step 3) is to add the integration from the Team Dashboard of the team which will own the integration. To add an integration directly to a team, navigate to the Team Dashboard and open Integrations tab. Click Add Integration and select the integration that you would like to add.

  1. Click Save Integration.

Opsgenie Check_MK Plugin

  1. Get Opsgenie Check_MK integration plugin from here.
  2. Give the necessary permissions to the script using the command below:
sudo chmod +x opsgenie
  1. Put the plugin under the directory,
  • /omd/sites/[site name]/local/share/check_mk/notifications/ if you're using OMD version.
  • /usr/share/check_mk/notifications if you're using standalone version.

Configuration in Check_MK

  1. In Check_MK, click Users on the left under the WATO Configuration box.
  2. Click New User at the top.
  3. Enter a username and a full name for this new user.
  4. Leave the Authentication part blank and check disable the login to this account to value.
  5. Select Normal monitoring user for the Roles.
  6. Click Save.
  1. After creating the new user, you are redirected to Users page again.
  2. Click on the notification button under Actions column for the newly created user.
  1. Click New Rule at the top.
  2. Enter Opsgenie as the Description.
  3. Select Opsgenie as the Notification Method.
  4. Paste your Opsgenie API URL into the textbox under Call with the following parameters: combobox.
  5. Click Save.
  1. After saving, click on Main Menu on the left under WATO Configuration box.
  2. Click the orange button labeled # Changes at the top.
  3. Click Activate Changes at the top of the newly opened page.
12191219 12181218

All set! Now your Check_MK integration is configured.

Sample Webhook Message from Opsgenie Check_MK Plugin

    "HOSTCHECKCOMMAND": "check-mk-host-smart",
    "HOSTSTATE": "UP",
    "LASTHOSTUP_REL": "0d 00:00:03",
    "SERVICEDESC": "CPU utilization",
    "SERVICEPERFDATA": "user=88.272;;;; system=11.728;;;; wait=0.000;;;; steal=0;;;; guest=0;;;;",
    "HOSTTAGS": "/wato/ cmk-agent ip-v4 ip-v4-only lan prod site:og tcp wato",
    "MAIL_COMMAND": "mail -s '\$SUBJECT\\\$' '\$CONTACTEMAIL\\\$'",
    "HOSTNAME": "localhost",
    "LASTHOSTSTATECHANGE": "1478611924",
    "HOST_TAGS": "/wato/ cmk-agent ip-v4 ip-v4-only lan prod site:og tcp wato",
    "SHORTDATETIME": "2016-11-10 13:20:42",
    "CONTACTNAME": "opsgenie",
    "MONITORING_HOST": "ubuntu-pc",
    "HOSTATTEMPT": "1",
    "SERVICEFORURL": "CPU%20utilization",
    "WHAT": "SERVICE",
    "HOSTALIAS": "localhost",
    "HOST_FILENAME": "/wato/",
    "SERVICECHECKCOMMAND": "check_mk-kernel.util",
    "LASTSERVICEOK": "1478773181",
    "HOSTDOWNTIME": "0",
    "HOST_SL": "",
    "HOST_ADDRESS_4": "",
    "HOST_ADDRESS_6": "",
    "SERVICEOUTPUT": "CRIT - user: 88.3%, system: 11.7%, wait: 0.0%, steal: 0.0%, guest: 0.0%, total: 100.0% (warn/crit at 40.0%/60.0%)(!!)",
    "CONTACTALIAS": "OpsGenie",
    "HOSTADDRESS": "",
    "HOSTGROUPNAMES": "check_mk",
    "OMD_ROOT": "/omd/sites/og",
    "LASTHOSTSTATECHANGE_REL": "1d 20:48:39",
    "HOSTURL": "/check_mk/",
    "HOSTSTATEID": "0",
    "MICROTIME": "1478773242189620",
    "SERVICEDISPLAYNAME": "CPU utilization",
    "LOGDIR": "/omd/sites/og/var/check_mk/notify",
    "OMD_SITE": "og",
    "SERVICE_SL": "",
    "DATE": "2016-11-10",
    "HOSTOUTPUT": "Packet received via smart PING",
    "HOSTFORURL": "localhost",
    "LASTHOSTUP": "1478773240",
    "LASTSERVICEOK_REL": "0d 00:01:02",
    "HOST_EC_CONTACT": "",
    "CONTACTS": "opsgenie",
    "SVC_SL": "",
    "LONGDATETIME": "Thu Nov 10 13:20:42 +03 2016",
    "SERVICEURL": "/check_mk/"

Sample alert


Did this page help you?