For the complete documentation index, see llms.txt. This page is also available as Markdown.

Checkmk Integration (v 1.x)

Send Checkmk 1.x notifications to ilert with the ilert notification plugin, installed on an OMD site.

Checkmk 1.x has no built-in ilert method, so you install the ilert plugin on the Checkmk server and add a notification rule that calls it. A problem opens an alert, an acknowledgment accepts it, and a recovery resolves it. On Checkmk 2.0 or later, use the built-in method instead.

Requirements

  • A Checkmk 1.x site managed with omd, and root access to the server. This guide does not cover installs without omd; for those, contact support@ilert.com.

  • Python 2.7.9 or later, which the site provides. Checkmk 1.6 runs Python 2.7 and has no python3 of its own, so these steps use the files from the plugin's python2 folder.

  • Outbound HTTPS from the Checkmk server to api.ilert.com.

These steps were last run against Checkmk Raw Edition 1.6.0p30.

In ilert: Create a Nagios / Icinga alert source

The plugin sends events in Nagios format, so the alert source type is Nagios / Icinga, not checkmk.

  1. Go to Alerting → Alert sources and click Create new alert source.

  2. Search for Nagios, click the Nagios / Icinga tile, and click Next.

  3. Give your alert source a name, optionally assign teams, and click Next.

  4. Choose who gets notified: select Use existing escalation policy and pick a policy, or Generate new escalation policy to start with a basic one that notifies you first. Click Next.

    The escalation step of the ilert alert source wizard, headed Who should be notified about alerts, with an escalation policy selected and a preview of its escalation rules below.
    Pick an existing escalation policy, or generate a basic one without leaving the wizard.
  5. Select Default grouping and click Continue setup. It groups events by the alert key the plugin sets; the other grouping options are easier to judge once events are arriving.

  6. The next page shows more settings, such as notification priority and alert templates. Click Finish setup for now; you can change them later.

  7. On the final page, ilert shows the integration key for this alert source. Copy it; you will paste it into the notification rule in the next section.

In Checkmk: Configure the ilert plugin

1

Install the plugin

Run this as root, with YOUR_SITE replaced by the name of your site. It puts the plugin in /usr/local/bin and the notification script in the site's notifications directory.

2

Add the retry job

The plugin keeps an event it could not send in /tmp/ilert_nagios. This cron job sends those events every minute. Run it as the site user:

3

Add a notification rule

In Checkmk's web interface, open Notifications in the WATO configuration and click New Rule.

  1. Under Notification Method, select iLert Check_MK Plugin, keep Call with the following parameters:, and paste the integration key into the field below it.

  2. Under Contact Selection, clear All contacts of the notified object, select The following users, and add one user. On a host without contacts, the default creates no notification. One user is enough, because Checkmk sends one notification per recipient.

  3. Click Save, and activate the pending change.

Test the integration

Open a host in Checkmk, click the hammer icon (Execute commands on hosts, services and other objects), and under Fake check results enter a message in Plugin output:, click Down, and confirm. The alert appears under Alerts with a summary such as PROBLEM Host Alert: acme-web-1 is DOWN - Test from Checkmk.

Under Fake check results, click Up and confirm. The alert changes to Resolved.

What each notification does in ilert

Notification type
What ilert does

PROBLEM

Opens an alert and starts its escalation policy. If an alert with the same key is still open, the event goes to that alert

ACKNOWLEDGEMENT

Accepts the alert, which stops its escalation. Keep send notification on when you acknowledge the problem

RECOVERY

Resolves the alert

Any other type, such as DOWNTIMESTART, FLAPPINGSTART or CUSTOM

Nothing. ilert takes the event and opens no alert

The alert key is HOSTADDRESS for a host and HOSTADDRESS-SERVICEDESC for a service, for example 192.0.2.10-Memory. With Default grouping, events with the same key belong to one alert, so two hosts with the same address share their host alert.

FAQ

What happens if the connection to ilert is interrupted?

The plugin keeps the event in /tmp/ilert_nagios after a network error, an HTTP 429 or a server error, and the retry job sends it within a minute of the connection coming back. Events in that directory are lost if /tmp is cleared, for example at a reboot.

Will alerts in ilert be resolved automatically?

Yes, as soon as the host or service is UP or OK again in Checkmk.

Can I send notifications to more than one alert source?

Yes. Add one notification rule per alert source, each with that alert source's integration key and conditions that select its hosts.

The plugin does not work. How do I find the issue?

Look at ~/var/log/notify.log as the site user. It shows which rules matched and whether the script ran. The plugin itself writes to the system log, such as /var/log/syslog or /var/log/messages, with the tag ilert_nagios.py:

  • HTTP 400 invalid API key means the key in the rule is wrong, or the alert source's key has been rotated. The plugin deletes an event that ilert rejects, so that notification does not come back.

  • could not send event to iLert means the server cannot reach api.ilert.com. The event waits for the retry job.

The Checkmk documentation describes the path of a notification and its log files. If you cannot find the cause, contact support@ilert.com.

Last updated

Was this helpful?