> For the complete documentation index, see [llms.txt](https://docs.ilert.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ilert.com/integrations/inbound-integrations/checkmk/check-mk.md).

# Checkmk Integration (v 1.x)

Use this guide for checkmk v 1.x

With the ilert checkmk notification plugin you can easily integrate checkmk into ilert and extend your existing checkmk system with SMS, push and voice notifications as well as on-call schedules from ilert. The screenshots below are based on the checkmk Raw Edition (CRE) 1.2.8. The ilert checkmk plugin is compatible with all checkmk versions.

{% hint style="success" %}
Did you know we offer a [native integration for checkmk 2.x](/integrations/inbound-integrations/checkmk/native.md)
{% endhint %}

## System requirements

* Python >= 3.7 (alternatively Python >= 2.7.9, we suggest 2.7.10)

{% hint style="warning" %}
Python 2.x is EOL (end of life) we suggest to use Python >= 3.7
{% endhint %}

## In ilert: Create a Checkmk alert source <a href="#create-alarm-source" id="create-alarm-source"></a>

1. Go to **Alerting** → **Alert sources** and click **Create new alert source**.
2. Search for **Nagios / Icinga**, click its 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**.

   <figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2Fgit-blob-8a281bf3931f5a1a531951ce97984d50989dd875%2Falert-source-escalation-step.png?alt=media" alt="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."><figcaption><p>Pick an existing escalation policy, or generate a basic one without leaving the wizard.</p></figcaption></figure>
5. Select **Default grouping** and click **Continue setup**. It groups events by the alert key the integration sets; the other [grouping options](/alerting/configure-alerting/alert-sources.md#event-grouping) 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 and URL for this alert source. You will need them later in this guide.

## In Checkmk: Configure the ilert plugin <a href="#configure-ilert-plugin" id="configure-ilert-plugin"></a>

Download the [checkmk](https://github.com/iLert/ilert-nagios) plugin package and unzip it:

```
> https://github.com/iLert/ilert-nagios/releases/download/latest/ilert-nagios.zip
> unzip ilert-nagios.zip
```

{% hint style="info" %}
For Python >= 2.7.9 support, please use the files in the python2 folder
{% endhint %}

For checkmk you need the two files `ilert_nagios.py` and `ilert_check_mk.sh`. You can delete the remaining files in the directory. Move the plugin file `ilert_nagios.py` into the directory `/usr/local/bin` . Both files must be executable by both checkmk and the cron daemon:

```
> mv ilert_nagios.py /usr/local/bin
> chmod 755 /usr/local/bin/ilert_nagios.py
> chmod 755 ilert_check_mk.sh
```

{% tabs %}
{% tab title="Standalone version of checkmk" %}
If you are using the standalone version of checkmk, follow the instructions below. If you are using the OMD version, please go the tab **OMD version of** checkmk.

```
> crontab -u nagios -e
```

Add the following entry:

```
* * * * * python3 /usr/local/bin/ilert_nagios.py -m send
```

Via this cron job, events are sent to ilert every minute that failed in the first send attempt (e..g due to a network error).

Move the ilert alerting script to the notifications directory of checkmk:

```
> mv ilert_check_mk.sh /usr/share/check_mk/notifications
```

{% endtab %}

{% tab title="OMD version of checkmk" %}
If you are using the OMD version of checkmk, follow the instructions below.

```
> su - {site-name}
```

Create a file named `ilert` under the `cron.d` directory of your monitoring instance (e.g. `/omd/sites/{site-name}/etc/cron.d`). The file should contain the following content:

```
* * * * * python3 /usr/local/bin/ilert_nagios.py -m send
```

Execute the following command for the changes to take effect:

```
> omd reload crontab 
> exit
```

Move the ilert alerting script to the `notifications` directory of checkmk:

```
> mv ilert_check_mk.sh /omd/sites/{site-name}/local/share/check_mk/notifications
```

{% endtab %}
{% endtabs %}

Log in to checkmk's web GUI and continue there.

1. Navigate to the "Users" menu and click on "New User".

![](https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M76ygPnS4HUcFSX8ulm%2F-M9_0_VNCeZEXxOEXyKS%2F-M9_1YR6CUvFl95NHkbL%2Fmk4.jpg?alt=media\&token=3fa468d4-9a12-4ad3-bd71-43b461b15727)

2. Fill in the fields marked below. Add the user to the contact groups to which the hosts or services that you want to be alerted for. Click on "Save".

![](https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M76ygPnS4HUcFSX8ulm%2F-M9_0_VNCeZEXxOEXyKS%2F-M9_1aqMtF6UZTUlq-oE%2Fmk5.jpg?alt=media\&token=f4774a57-2f6c-46a2-95bb-b2a5bc22064f)

3. Go to the notification settings of this user (by clicking on the "Notifications" icon).

![](https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M76ygPnS4HUcFSX8ulm%2F-M9_0_VNCeZEXxOEXyKS%2F-M9_1g2J_B4kH5FOyqc8%2Fmk6.jpg?alt=media\&token=3a7f4bf2-a159-4c57-bcfc-28184a964277)

4. Click on "New Rule" and select ilert checkmk Plugin as the "Notification Method". Enter your ilert API key (see above) as a parameter.

![](https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M76ygPnS4HUcFSX8ulm%2F-M9_0_VNCeZEXxOEXyKS%2F-M9_1j0vYXXWXsgZAC9b%2Fmk7.jpg?alt=media\&token=ecc518a5-f2ce-4eef-8294-61ebc9b1ee3c)

5. Go back to the user list and activate your changes by clicking on "1 Changes":

![](https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M76ygPnS4HUcFSX8ulm%2F-M9_0_VNCeZEXxOEXyKS%2F-M9_1mboR9Z5O0gi82wG%2Fmk8.jpg?alt=media\&token=056796e7-0624-4564-a053-d15538f20985)

## Test the integration <a href="#test" id="test"></a>

You can test the integration directly in checkmk to verify that everything is working. To do this, open a host or service check in the Web GUI and click on the "Execute" icon (Hammer Icon). In "Fake check results" you can manually set the state of a host or service. Click on "Down" (for a host) or "Critical" (for a service) and then confirm with "Yes!". You should now see an alert in ilert.

![](https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M76ygPnS4HUcFSX8ulm%2F-M9_0_VNCeZEXxOEXyKS%2F-M9_1qYptH9pYZeeZ9PG%2Fmk9.jpg?alt=media\&token=a807a3e7-5738-4805-8007-f01e25f48e91)

## FAQ <a href="#faq" id="faq"></a>

**Which notification types are processed by the plugin?**

The plugin processes the notification types `PROBLEM` , `ACKNOWLEDGEMENT` and `RECOVERY`. The remaining Notification Types (including `FLAPPING*` and `DOWNTIME*`) are ignored.

checkmk has the following notification types:

| Types             | Description                                 |
| ----------------- | ------------------------------------------- |
| PROBLEM           | Normal host or service problem              |
| RECOVERY          | Host / service goes UP / OK again           |
| ACKNOWLEDGMENT    | Acknowledgment of a problem                 |
| FLAPPINGSTART     | A host / service begins to be discontinuous |
| FLAPPINGSTOP      | End of discontinuity                        |
| DOWNTIMESTART     | Start of scheduled maintenance.             |
| DOWNTIMEEND       | Normal end of maintenance                   |
| DOWNTIMECANCELLED | Premature termination of maintenance        |
| CUSTOM            | Alarm triggered manually by command         |
| ALERT HANDLER     | Alerthandler execution (CEE from 1.4.0i2)   |

**What happens if my internet connection is lost? Are the events generated in checkmk lost?**

No, events won't be lost. The plugin stores the events locally in a temporary directory (by default in /tmp/ilert\_nagios) and tries to send them to ilert every minute. This means that as soon as your connection is available again, cached events will be sent to ilert. In addition, we recommend that you monitor your Internet connection using our uptime monitoring feature.

**Will alerts in ilert be resolved automatically?**

Yes, as soon as the state of a host / service is UP or OK again in checkmk, the associated alert is resolved in ilert. If a problem is acknowledged in checkmk, the associated alert in ilert is set to the status Accepted.

**Can I link checkmk to multiple alert sources in ilert?**

Yes, create a checkmk user for each alert source in checkmk. Proceed as described above in the instructions.

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

Please look first in the log file. The plugin uses the Unix / Linux system log for logging (eg under /var/log/messages or /var/log/syslog ). If you can not find the error, please contact our support at <support@ilert.com> .

Please also have a look at the checkmk documentation, where additional log files related to alerting are documented: [The course of a notification from beginning to end](https://checkmk.com/cms_notifications.html#The%20course%20of%20a%20notification%20from%20beginning%20to%20end)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.ilert.com/integrations/inbound-integrations/checkmk/check-mk.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
