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

# OpenSearch Integration

[OpenSearch](https://opensearch.org/) is an open-source search, analytics, and observability suite. Its Alerting plugin lets you monitor your data and trigger actions when conditions are met. With this integration, alerts raised by OpenSearch monitors automatically create alerts in ilert, so the right responders are notified and escalations happen reliably.

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

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

   <figure><img src="/files/rmL9OoRxcWnDwcJZQm4Y" alt=""><figcaption></figcaption></figure>
2. Search for **OpenSearch** 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#alert-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 need it in the next section.

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

## In OpenSearch: Create a notification channel <a href="#create-channel" id="create-channel"></a>

1. Click the **side menu** button.

   <figure><img src="/files/ERdbyQOL1qO5onGrQpai" alt=""><figcaption></figcaption></figure>
2. Scroll down and click on **Notifications**.

   <figure><img src="/files/WJNVZcMBUd3wuu7UWX37" alt=""><figcaption></figcaption></figure>
3. Click on **Create channel**.
4. Give the channel a **name**, choose **Custom webhook** as the channel type, and paste the webhook URL you copied from ilert into the **Webhook URL** field.

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

## In OpenSearch: Create a monitor and action <a href="#create-monitor" id="create-monitor"></a>

1. Click the **side menu** button again and choose **Alerting**.

   <figure><img src="/files/paE0NqgxPPflgWNmBiuU" alt=""><figcaption></figcaption></figure>
2. Click on **Monitors**, then **Create monitor**.

   <figure><img src="/files/J8csLZJyTpeA5SSH7mfi" alt=""><figcaption></figcaption></figure>
3. Fill in the monitor details as needed, then click **Add action**.
4. Give your action a **name**, choose the **channel** you just created, and copy and paste the template below into the message box.

   <figure><img src="/files/Gl4qVFRGSoAzzhgrIAal" alt=""><figcaption></figcaption></figure>
5. Click **Create**. You are done.

### Payload template

```json
{
  "monitor_name": "{{ctx.monitor.name}}",
  "monitor_type": "{{ctx.monitor.monitor_type}}",
  "trigger_name": "{{ctx.trigger.name}}",
  "trigger_id": "{{ctx.trigger.id}}",
  "severity": "{{ctx.trigger.severity}}",
  "period_start": "{{ctx.periodStart}}",
  "period_end": "{{ctx.periodEnd}}",
  "alert_id": "{{ctx.alert.id}}",
  "alert_version": "{{ctx.alert.version}}",
  "alert_state": "{{ctx.alert.state}}",
  "alert_error_message": "{{ctx.alert.error_message}}",
  "alert_acknowledged_time": "{{ctx.alert.acknowledged_time}}",
  "action_name": "{{ctx.action.name}}"
}
```

When a monitor's trigger fires, OpenSearch runs the action and posts this payload to ilert, which creates an alert.

## FAQ

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

Yes. ilert uses the `alert_state` field from the payload: when it is **COMPLETED** or **DELETED** (the trigger condition is no longer met), the corresponding ilert alert is resolved automatically.

#### **Is this integration bidirectional?**

No. The integration is one-directional: OpenSearch sends alerts to ilert. Acknowledging or resolving an alert in ilert is not synced back to OpenSearch, and vice versa.

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

Yes. Create an additional notification channel in OpenSearch for each alert source and point it at that alert source's webhook URL, then reference the channel from the relevant monitor actions.


---

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