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

# Check MK

## Prerequisites: <a href="#prerequisites" id="prerequisites"></a>

This section explains on how to integrate and ingest alerts from Check MK monitoring tool into CloudFabrix AIOPs platform.

Check MK (derived from Nagios Core) is a monitoring tool which supports alert notifications via email, slack, pagerduty, victorops or a script executing a command. CloudFabrix AIOPs platform uses webhook notification method using a script from Check MK monitoring tool to receive and ingest the alerts or events.

Click here for [Alert Sources](/features-guide/alert-watch/alert-sources.md) to create a Webhook URL for Check MK alert notifications in CloudFabrix OIA application.

**Note:** Under **Alert Mapping** section, use Nagios alert mapping configuration for Check MK alerts.

## **Configure Check MK for Alert notifications over a Webhook:** <a href="#create-webhook-for-incoming-alerts-from-dynatrace-1" id="create-webhook-for-incoming-alerts-from-dynatrace-1"></a>

**Step 1:** Download the below scripts for both '**Host**' and '**Service**' type of alerts

For '**Host**' type alerts:&#x20;

<https://macaw-amer.s3.amazonaws.com/releases/OIA/scripts/webhook/cfx-host-webhook-notification.sh>

For '**Service**' type alerts:&#x20;

<https://macaw-amer.s3.amazonaws.com/releases/OIA/scripts/webhook/cfx-service-webhook-notification.sh>

**Step 2:** Copy the '**cfx-host-webhook-notification.sh**' and '**cfx-service-webhook-notification.sh**' script to Check MK system into the folder '**/omd/sites/\<Site\_Name>/local/share/check\_mk/notifications**'

**Step 3:** Login into Check MK monitoring tool's machine using SSH CLI as 'root' user and execute the below commands.

```
ssh root@<checkmk-ip-address>
```

```
cd /omd/sites/<Site_Name>/local/share/check_mk/notifications
```

```
chmod 755 cfx-host-webhook-notification.sh
chmod 755 cfx-service-webhook-notification.sh
```

**Step 4:** Edit the scripts '**cfx-host-webhook-notification.sh**' & '**cfx-service-webhook-notification.sh**' and configure the below variables. Configure the '**CFX\_WEBHOOK\_URL**' variable with 'Webhook URL' that was created under ['Alert Sources](/features-guide/alert-watch/alert-sources.md)' section in CloudFabrix OIA application.&#x20;

Configure '**CFX\_WEBHOOK\_USERNAME**' and '**CFX\_WEBHOOK\_PASSWORD'** variables if the Webhook is configured with HTTP authentication, otherwise, leave them empty.

```
CFX_WEBHOOK_URL="<cfx-webhook-url>"
CFX_WEBHOOK_USERNAME="<cfx-webhook-username-Optional>"
CFX_WEBHOOK_PASSWORD="<cfx-webhook-username-Optional>"
```

**Step 5:** Login into Check MK monitoring tool UI as a user which has admin privileges to configure the alert notifications.

![](/files/RdQBfXaVH28n6Za35yED)

**Step 6:** Under '**Setup**' menu, click on '**Users**' menu to create a new user for Check MK alert notifications.

![](/files/UQAbPnylCkZCPdJN1v2C)

**Step 7:** Click on '**Add**' button

![](/files/3uTNhqSSUP8DYYcXU7Bq)

**Step 8:** Enter username as '**cfx\_notifications**'. Select appropriate sites under '**Authorized sites**'. Under '**Security**' section, select '**Automatic secret for machine accounts**' and generate a secret.&#x20;

Select '**Disable password**' option to disable the login to this account. Select the roles as '**Normal monitoring user**'

![](/files/PpMCf9nxTv0jIBJkbyup)

**Step 9:** Commit the changes.

**Step 10**: Under '**Setup**' menu, click on '**Notifications**' menu to create configure alert notifications for both **Host** and **Service** type problems.

![](/files/syXakfYm594wOO2M73K1)

**Step 11**: Configure alert notifications for '**Host**' type problems.

Click on '**Add rule**' button.

![](/files/z9LLP9GodWvQWQN7LXKo)

**Step 12**: Enter the '**Decsription**' as '**cfx\_host\_notification**'.

Select '**Notification Method**' as '**cfx-host-webhook-notification.sh**' from the drop down menu.

Under Contact selection section, select **cfx\_notifications** user that was created to enable the alert notification.

Select appropriate '**Sites**' to enable the alert notification.

![](/files/UdrBwfQRxRoxE7lRJIX0)

**Step 13**: For '**Match host event type**' option, select appropriate options as shown below.

Click on **Save** button to save the alert notification rule.

![](/files/0N7uLGVA0qdIpP6GRXKj)

**Step 14**: Configure alert notifications for '**Service**' type problems.

Click on '**Add rule**' button.

Enter the '**Decsription**' as '**cfx\_service\_notification**'.

Select '**Notification Method**' as '**cfx-service-webhook-notification.sh**' from the drop down menu.

Under Contact selection section, select **cfx\_notifications** user that was created to enable the alert notification.

Select appropriate '**Sites**' to enable the alert notification.

![](/files/vPzYTsjHGtaom5W0Q1Ke)

**Step 15**: For '**Match service event type**' option, select appropriate options as shown below.

Click on **Save** button to save the alert notification rule.

![](/files/EsFI12R9RSNoSJ3QYkZ6)

Below is the Alert Filed mapping table (for information only) between Check MK alert notification fields and CloudFabrix OIA's common data model fields for Alerts.

| **Check MK Alert Field**                                                     | **CloudFabrix OIA Alert Field**                                            |
| ---------------------------------------------------------------------------- | -------------------------------------------------------------------------- |
| Alert\_NotificationType                                                      | alertType                                                                  |
| Alert\_Nagios\_SourceType                                                    | <p>Determines whether source alert is from </p><p>Host or Service type</p> |
| <p>Alert\_ServiceNotificationId /</p><p>Alert\_HostNotificationId</p>        | key (Service/Host)                                                         |
| <p>Alert\_ServiceDescription /</p><p>Alert\_ServiceOutput</p>                | message (Service)                                                          |
| Alert\_HostName                                                              | assetName                                                                  |
| Alert\_HostAddress                                                           | assetIpAddress                                                             |
| Alert\_Nagios\_SourceType                                                    | assetType                                                                  |
| <p>Alert\_HostState /</p><p>Alert\_HostAddress (or)<br>Alert\_HostOutput</p> | message (Host)                                                             |
| Alert\_DateTime                                                              | raisedAt / clearedAt                                                       |
| <p>Alert\_ServiceState/</p><p>Alert\_HostState</p>                           | severity (Service/Host)                                                    |
