# OpManager Integration

Integrating OpManager with ilert enables automated alerting and incident response by sending network and infrastructure alerts from OpManager to ilert. This integration helps streamline your IT operations and reduces mean time to respond (MTTR) by combining OpManager’s monitoring capabilities with ilert’s advanced alert management and escalation features.

## In ilert: Create a OpManager alert source&#x20;

1. Go to **Alert sources** -> **Alert sources** and click **Create new alert source**.

   <figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2FjX0cS4q7woTXKajZmc1W%2FScreenshot%202023-08-28%20at%2010.21.10.png?alt=media&#x26;token=8ef3666b-84eb-4b51-abee-f07303313941" alt=""><figcaption></figcaption></figure>
2. Search for **OpManager** in the search field, click the OpManager tile, and then **Next**.&#x20;

   <figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2FlXzQlJpaTFSR49AZk0xA%2FScreenshot%202023-08-28%20at%2010.24.23.png?alt=media&#x26;token=cffeacb4-57b9-47d4-827d-b0f6b1afd914" 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="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2FNnuZqONaIhbOf6fn4OkZ%2FScreenshot%202023-08-28%20at%2011.37.47.png?alt=media&#x26;token=8a74f7b5-5bd2-4eea-97fa-1c1dbb041333" alt=""><figcaption></figcaption></figure>
5. Select your [Alert grouping](https://docs.ilert.com/alerting/configure-alerting/alert-sources#alert-grouping) preference and click **Continue setup**. You may click **Do not group alerts** for now and change it later.&#x20;

   <figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2FueugN4JgHn1c90ggFA6u%2FScreenshot%202023-08-28%20at%2011.38.24.png?alt=media&#x26;token=b8009daf-3ca8-4264-a6fa-e42ef7333205" alt=""><figcaption></figcaption></figure>
6. The next page shows additional settings, such as customer alert templates or notification priority. Click **Finish setup** for now.
7. On the final page, an API key and/or webhook URL will be generated. You will need it later.

<figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2FLkw8OAzHP5bJfeducHyv%2Fil-1.png?alt=media&#x26;token=bb7fad27-4a8f-4fca-b489-c51c77872423" alt=""><figcaption></figcaption></figure>

## In OpManager: Creating a custom integration

1. On the top bar, navigate to Settings -> General Settings -> Integrations.

<figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2F0lvcWT9pKUltpr4qfucY%2F1.png?alt=media&#x26;token=49b4ac98-6cb7-48fe-9fb3-8f69ed53a5fa" alt=""><figcaption></figcaption></figure>

2. Now click New Custom Integration

<figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2FU5VykrJjbrcMpwoBOZNK%2F2.png?alt=media&#x26;token=030af06d-4ba0-4ef9-8c2b-6c3e099f2102" alt=""><figcaption></figcaption></figure>

3. Name the integration as **ilert Integration** and add a description.
4. In Integration Type, select **Event Management**.

<figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2FX0UcRn6qKtLA5wGnm7S5%2F3.png?alt=media&#x26;token=b5cb3ff4-83a8-447c-b304-644663813261" alt=""><figcaption></figcaption></figure>

5. Enter the following details under **Create Event** to create an event in OpManager:

* **Method Type:** POST
* **Method URL:** previously generated integration URL
* **Data Type:** Raw
* **Payload Type:** JSON
* **Body Content:**

```json
{
    "eventType": "ALERT",
    "summary": "$displayName - $stringseverity",
    "details": "$message",
    "priority": "HIGH",
    "alertKey":"$entity"
}
```

6. Click **Test action** to verify the connection and check the **Manage Event** box.
7. In Fetch Event id, enter **`$id`**.

<figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2FkkVo9ARdG7rVc43i5xyV%2F4.png?alt=media&#x26;token=2d99f489-5d50-4462-82ef-6ee19124a44a" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2FZMvhfdmRUljh0IbsvB15%2F5.png?alt=media&#x26;token=54d211d4-e6a4-4a9d-ba71-9ed0c24775f6" alt=""><figcaption></figcaption></figure>

8. To send update events, enter the following details:

* **Method Type:** POST
* **Method URL:** previously generated integration URL
* **Data Type:** Raw
* **Payload Type:** JSON
* **Body Content:**

```json
{
   "eventType": "ALERT",
   "summary": "$displayName - $stringseverity",
   "details": "$message",
   "priority": "HIGH",
   "alertKey":"$entity"
}
```

8. Enter the following details to send an resolution event to ilert:

* **Method Type:** POST
* **Method URL:** previously generated integration URL
* **Data Type:** Raw
* **Payload Type:** JSON
* **Body Content:**

```json
{
   "eventType": "RESOLVE",
   "summary": "$displayName - $stringseverity",
   "details": "$message",
   "priority": "HIGH",
   "alertKey":"$entity"
}
```

## FAQ

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

Yes, as soon as a OpManager sends an alert event with field `eventType` value set to `RESOLVE`, corresponding alert in ilert will be resolved.
