> 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/openitcockpit.md).

# openITCOCKPIT Integration

[openITCOCKPIT](https://openitcockpit.io/) is an open-source monitoring configuration and management tool for Nagios and Naemon that lets you monitor hosts, services, and your infrastructure from a single interface. With this integration, host and service notifications raised in openITCOCKPIT automatically create alerts in ilert, so the right responders are notified and escalations happen reliably.

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

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

   <figure><img src="/files/rmL9OoRxcWnDwcJZQm4Y" alt=""><figcaption></figcaption></figure>
2. Search for **openITCOCKPIT** in the search field, click on the tile and click on **Next**.

   <figure><img src="/files/1WoRRYB5U40PbeMJ7Hit" alt=""><figcaption></figcaption></figure>
3. Give your alert source a name, optionally assign teams and click **Next**.
4. Select an **escalation policy** by creating a new one or assigning an existing one.

   <figure><img src="/files/y4Bakf2apGhBN56U8ZPR" alt=""><figcaption></figcaption></figure>
5. Select your [Alert grouping](/alerting/configure-alerting/alert-sources.md#event-grouping) preference and click **Continue setup**. You may click **Do not group alerts** for now and change it later.

   <figure><img src="/files/nTlB0ZCIW1SP3dj6P9nO" alt=""><figcaption></figcaption></figure>
6. The next page shows additional settings such as custom alert templates or notification priority. Click on **Finish setup** for now.
7. On the final page, ilert generates a webhook URL for your alert source. Copy it — you will insert it into the notification command in the next section.

   <figure><img src="/files/hIr2L1gH2U00ff5WJGs6" alt=""><figcaption></figcaption></figure>

## In openITCOCKPIT: Create a notification command <a href="#create-command" id="create-command"></a>

1. Click on **Objects**, then **Commands**.

   <figure><img src="/files/aU41RB4CPcWuQ49J7jGo" alt=""><figcaption></figcaption></figure>
2. Click on **New**.
3. Choose **Notification command** as the command type, give it a name, and paste the matching command below into the command line — the **host** command if you want to notify on host state changes, or the **service** command for service state changes. Replace `<api-key>` with the API key from the webhook URL you copied from ilert. Then click **Create**.

   <figure><img src="/files/2yjmpT5v9TFuM2TRqqX2" alt=""><figcaption></figcaption></figure>

### Host notification command

```bash
curl -s -X POST \
  -H "Content-Type: application/json" \
  -d '{"type":"$NOTIFICATIONTYPE$","host":"$HOSTNAME$","address":"$HOSTADDRESS$","state":"$HOSTSTATE$","output":"$HOSTOUTPUT$","author":"$NOTIFICATIONAUTHOR$","comment":"$NOTIFICATIONCOMMENT$"}' \
  https://api.ilert.com/api/v1/events/openitcockpit/<api-key>
```

### Service notification command

```bash
curl -s -X POST \
  -H "Content-Type: application/json" \
  -d '{"type":"$NOTIFICATIONTYPE$","host":"$HOSTNAME$","service":"$SERVICEDESC$","address":"$HOSTADDRESS$","state":"$SERVICESTATE$","output":"$SERVICEOUTPUT$","author":"$NOTIFICATIONAUTHOR$","comment":"$NOTIFICATIONCOMMENT$"}' \
  https://api.ilert.com/api/v1/events/openitcockpit/<api-key>
```

## In openITCOCKPIT: Create a contact <a href="#create-contact" id="create-contact"></a>

1. Click on **Contacts**, then **New**.

   <figure><img src="/files/z63AlT26bKNUTFRhQDrH" alt=""><figcaption></figcaption></figure>
2. Fill in the relevant details. In the notification section, depending on what you configured, choose **host** or **service**, choose a notification **period**, and for the command choose the one you created earlier. Then save the contact.

   <figure><img src="/files/9XRltMRSQJMyJrxgkc0C" alt=""><figcaption></figcaption></figure>

## In openITCOCKPIT: Assign the contact to a host <a href="#assign-contact" id="assign-contact"></a>

1. Click on **Hosts**, then click the **gear** icon of the relevant host.

   <figure><img src="/files/Vt2133YS5hhBJJUGyn1h" alt=""><figcaption></figcaption></figure>
2. Scroll down to the **notification configuration** section, choose the **contact** you created earlier, and **save**.

   <figure><img src="/files/41J8b7VHvZF9Gpdj6UnT" alt=""><figcaption></figcaption></figure>

That's it. When a matching host or service notification fires in openITCOCKPIT, the notification command posts to ilert and an alert is created.

## FAQ

#### **When does ilert automatically resolve an openITCOCKPIT alert?**

When openITCOCKPIT sends a notification whose state is **UP** (host recovery) or **OK** (service recovery). Resolution is driven by the state, not the notification type. So recovery, custom, downtime, or flapping notifications will all resolve the alert as long as they carry a healthy state.

#### **How does acknowledging work?**

If the notification's type is **ACKNOWLEDGEMENT**, ilert marks the alert as accepted (acknowledged). This takes precedence over the state, an acknowledgement is always treated as an ack regardless of the current state. The acknowledgement's comment is surfaced on the alert.

#### **If I acknowledge an alert in ilert, does it also acknowledge in openITCOCKPIT?**

No. This is a one-way integration. ilert reflects acks/resolutions that openITCOCKPIT sends, but it does not push an ilert-side ack or resolve back to openITCOCKPIT.

#### **Should I use the host or the service notification command?**

Use the **host** command to be notified when a host changes state (for example, DOWN or UP), and the **service** command for service state changes (for example, CRITICAL, WARNING, or OK). The service command additionally includes the service description in the payload. You can create both commands if you want to forward host and service notifications.

#### **Can I connect openITCOCKPIT with multiple alert sources in ilert?**

Yes. Create an additional notification command for each alert source, pointing the command at that alert source's webhook URL, then reference it from the relevant contacts.


---

# 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/openitcockpit.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.
