• Products
  • Get started
  • Documentation
  • Resources

Integrate Opsgenie with Checkmk

Checkmk logo

What does Opsgenie offer Checkmk users?

Use Opsgenie’s Checkmk Integration to forward Checkmk 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 Checkmk, an alert is created in Opsgenie.

  • When the problem is acknowledged in Checkmk, the alert is acknowledged in Opsgenie.

  • When the state of host becomes UP or the state of service becomes OK again in Checkmk, the alert is closed in Opsgenie.

Add Checkmk Integration in Opsgenie

You can add this integration from your team dashboard

If you're using Opsgenie's Free or Essentials plan, or if you’re using Opsgenie with Jira Service Management's Standard plan, you can only add this integration from your team dashboard as the Integrations page under Settings is not available in your plan.

Adding the integration from your team dashboard will make your team the owner of the integration. This means Opsgenie will assign the alerts received through this integration to your team only.

To do that,

  1. Go to your team’s dashboard from Teams,

  2. Select Integrations, and select Add integration.

Follow the rest of the steps to complete the integration.

  1. Go to Settings > Integrations. Search for Checkmk and select Add

  2. Specify who is notified for Checkmk alerts using the Responders field. Auto-complete suggestions are provided as you type.

  3. Select Save Integration.

Opsgenie Checkmk Plugin

  1. Get the Opsgenie Checkmk integration plugin.

  2. Give the necessary permissions to the script using the command below:

Permission command

1 sudo chmod +x opsgenie

3. 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 Checkmk

  1. In Checkmk, select Users on the left under the WATO Configuration box.

  2. Select 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. Select Save.

Checkmk create new user

7. After creating the new user, you are redirected to Users page again.

8. Select the notification button under Actions column for the newly created user.

Checkmk users

9. Select New Rule at the top.

10. Enter Opsgenie as the Description.

11. Select Opsgenie as the Notification Method.

Due to an issue with Checkmk, you'll see two Opsgenie entries. The one which asks for 

Call with forwarding parameters

 is the correct one. Avoid using the one which asks for API key

 

12. Paste your Opsgenie API Url into the textbox under Call with the following parameters: combobox.

13. Select Save.

Checkmk notification

14. After saving, select Main Menu on the left under WATO Configuration box.

15. Select the orange button labeled # Changes at the top.

16. Select Activate Changes at the top of the newly opened page.

Checkmk wato
Checkmk activate change

All set! Now your Checkmk integration is configured.

Sample Webhook Message from Opsgenie Checkmk Plugin

JSON

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 { "LASTSERVICESTATECHANGE_REL": "0d 00:00:01", "LASTSERVICESTATE": "OK", "HOSTCHECKCOMMAND": "check-mk-host-smart", "HOSTSTATE": "UP", "LASTHOSTUP_REL": "0d 00:00:03", "HOSTNOTESURL": "", "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", "HOSTPERFDATA": "", "SERVICEATTEMPT": "1", "LASTHOSTSHORTSTATE": "UP", "NOTIFICATIONCOMMENT": "", "SERVICESHORTSTATE": "CRIT", "MAXSERVICEATTEMPTS": "1", "MAIL_COMMAND": "mail -s '\$SUBJECT\\\$' '\$CONTACTEMAIL\\\$'", "HOSTNAME": "localhost", "LASTHOSTSTATECHANGE": "1478611924", "SERVICESTATE": "CRITICAL", "SERVICEGROUPNAMES": "", "SERVICENOTESURL": "", "SERVICEACKCOMMENT": "", "HOST_TAGS": "/wato/ cmk-agent ip-v4 ip-v4-only lan prod site:og tcp wato", "SHORTDATETIME": "2016-11-10 13:20:42", "CONTACTPAGER": "", "LASTSERVICESTATECHANGE": "1478773242", "LONGSERVICEOUTPUT": "", "HOSTPROBLEMID": "0", "CONTACTNAME": "opsgenie", "LONGHOSTOUTPUT": "", "MONITORING_HOST": "ubuntu-pc", "HOSTATTEMPT": "1", "SERVICEFORURL": "CPU%20utilization", "WHAT": "SERVICE", "HOSTALIAS": "localhost", "SERVICE_EC_CONTACT": "", "SERVICEACKAUTHOR": "", "HOST_FILENAME": "/wato/hosts.mk", "SERVICECHECKCOMMAND": "check_mk-kernel.util", "LASTSERVICESTATEID": "0", "LASTSERVICEOK": "1478773181", "HOSTDOWNTIME": "0", "SERVICEPROBLEMID": "48", "HOST_SL": "", "NOTIFICATIONAUTHORALIAS": "", "HOST_ADDRESS_4": "127.0.0.1", "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": "127.0.0.1", "SERVICENOTIFICATIONNUMBER": "1", "SERVICEDOWNTIME": "0", "NOTIFICATIONAUTHORNAME": "", "HOSTGROUPNAMES": "check_mk", "HOSTSHORTSTATE": "UP", "HOSTNOTIFICATIONNUMBER": "1", "OMD_ROOT": "/omd/sites/og", "LASTHOSTSTATECHANGE_REL": "1d 20:48:39", "PREVIOUSHOSTHARDSTATEID": "0", "LASTSERVICESHORTSTATE": "OK", "CONTACTEMAIL": "", "PREVIOUSSERVICEHARDSHORTSTATE": "OK", "HOST_ADDRESS_FAMILY": "4", "HOSTACKAUTHOR": "", "HOSTURL": "/check_mk/index.py?start_url=view.py%3Fview_name%3Dhoststatus%26host%3Dlocalhost", "HOSTSTATEID": "0", "MICROTIME": "1478773242189620", "LASTSERVICEPROBLEMID": "48", "PREVIOUSSERVICEHARDSTATE": "OK", "SERVICEDISPLAYNAME": "CPU utilization", "NOTIFICATIONTYPE": "PROBLEM", "LOGDIR": "/omd/sites/og/var/check_mk/notify", "MAXHOSTATTEMPTS": "1", "OMD_SITE": "og", "HOSTACKCOMMENT": "", "PREVIOUSSERVICEHARDSTATEID": "0", "SERVICE_SL": "", "DATE": "2016-11-10", "HOSTOUTPUT": "Packet received via smart PING", "NOTIFICATIONAUTHOR": "", "HOSTFORURL": "localhost", "LASTHOSTSTATEID": "0", "SERVICESTATEID": "2", "LASTHOSTUP": "1478773240", "PREVIOUSHOSTHARDSTATE": "UP", "LASTSERVICEOK_REL": "0d 00:01:02", "HOSTCONTACTGROUPNAMES": "all", "HOST_EC_CONTACT": "", "SERVICECONTACTGROUPNAMES": "all", "CONTACTS": "opsgenie", "LASTHOSTPROBLEMID": "0", "SVC_SL": "", "LASTHOSTSTATE": "UP", "PREVIOUSHOSTHARDSHORTSTATE": "UP", "LONGDATETIME": "Thu Nov 10 13:20:42 +03 2016", "SERVICEURL": "/check_mk/index.py?start_url=view.py%3Fview_name%3Dservice%26host%3Dlocalhost%26service%3DCPU%20utilization" }

Additional Help