How-to configure Opsgenie notifications

Starting with version 1.6, Checkmk supports integration with OpsGenie. You can create, close, and acknowledge alerts without needing a custom plugin.

LAST TESTED ON CHECKMK 2.3.0P1

Table of Contents


Official Documentation : Notifications via Opsgenie

This guide was tested with the “Essential” subscription. Other subscriptions may require different configurations.

Step-by-step guide

  1. Log in to your Opsgenie account and create your teams, if they haven't been created already.

    In this example, we create two teams and assign team members.

    Image showing a dialog on how to set up your team



  2. Activate the “Check_MK Integration” for your entire site or for each individual team, if necessary. This will generate the API key(s), which can be stored in the Checkmk Password Store.

    Be sure to note them down.

    Image showing cmk1 for the integration name

    Image showing the integration settings



  3. In Checkmk, create a technical user for each team (if each team uses its own API key). Disable the login and assign the “Normal monitoring user” role.

    Image showing the add user page within checkmk



  4. Configure the “Customer Notification Table” for each user by clicking the “Bell” icon in the user settings.

    Image showing two opsgenie users within checkmk



  5. Configure the Opsgenie notification rule by entering the API key, owner, and responsible team(s) for the alert. Leave all other fields at their default settings.

    Note that the responsible team is populated as the “Responder” in the OpsGenie API.


    Image showing the notification rule for the opsgenie users



  6. Configuring match conditions is mandatory. For example, you can match only a single “Linux” host. 

    Avoid overlapping matching criteria when creating two separate Opsgenie notification rules for two team integrations, as the “first one wins.”



    Image showing notification rule settings for opsgenie users



  7. Test your matching conditions using the “Test Notification” tool. Note that no alert will be triggered. In the “$OMD_ROOT/var/log/notify.log” file, you'll see the result of the test as “would notify OpsGenie_User.

    Image showing test notifications within checkmk



  8. To test the generation of an alert in the OpsGenie API, you can simulate a HARD STATE using the “Fake Check Results” option in the “Services of Host” view.

    To directly create a HARD STATE, temporarily set the “Maximum number of check attempts for service” to “1.


    Image showing that the max number of check attempts set to 1


    Image showing a checkmk service

    Image showing fake check results for a checkmk service



  9. On your OpsGenie site, the alert is created in the “Alert” section. For example:

    Image showing the alert configuration within opsgenie


    You can also create an alert for two responders if it is configured in the OpsGenie notification rule (Responsible Team).

    Image showing further alert configurations within opsgenie



Additional information

  • Tags should not contain spaces, as shown in the example. Special characters are allowed. Valid tags include: team1, team:1, team?1.

  • To debug notifications, increase the debug level for “Notifications” in the Global Settings (CMK). The output will appear in ~/var/log/cmc.log.

  • To check for firewall issues, log in to the CMK CLI and test the connection using:

    curl -X GET 'https://api.opsgenie.com/v2/teams' --header 'Authorization: GenieKey <your_api_key>' | json_pp
  • Currently, the OpsGenie integration uses api.opsgenie.com/v1/. This will change to v2 in future CMK releases.