# ElastAlert

Follow the steps below to configure a service so as to extract its related alert data from ElastAlert.

Squadcast will then process this information to create incidents for this service as per your preferences.

{% hint style="info" %}
**Note:**

In this document, we'll go through how to get alerts from **Elastic** to **Squadcast** using *ElastAlert*. If you're looking for how to get alerts from Elastic using *Watcher*, check out our [<mark style="color:blue;">Elastic Watcher Docs</mark>](/integrations/alert-source-integrations-native/elastic.md).
{% endhint %}

{% hint style="info" %}
**Note:**

We'll be using \_ElastAlert\_ for getting alerts from Elastic. To know more about *ElastAlert*, refer [ElastAlert - Easy & Flexible Alerting With Elasticsearch](https://elastalert.readthedocs.io/en/latest/).
{% endhint %}

### Using ElastAlert as an Alert Source

1. Navigate to **Services** -> **Service Overview** -> select or search for your Service. Expand the accordion -> In the Alert Sources section, click **Add**.

![](/files/ej4AI9zpOyFu5NZJCbwC)

2\. Select **ElastAlert**. Copy the displayed **Webhook URL** to [configure](#setup-squadcast-alerter-in-elastalert) it within **ElastAlert**. Finish by clicking **Add Alert Source** -> **Done**.

![](/files/97xv33Ps30im7ByWlHT0)

{% hint style="warning" %}
**Important:**

When an alert source turns Active, it’ll show up under Configured Alert Sources, you can either generate a test alert from the integration or wait for a real-time alert to be generated by the Alert Source. An Alert Source is active if there is a recorded incident via that Alert Source for the Service.
{% endhint %}

### Setup Squadcast Alerter in ElastAlert

For details about how to configure ElastAlert to send alerts, refer [Running ElastAlert for the First Time](https://elastalert.readthedocs.io/en/latest/running_elastalert.html).

Configuration variables in rules YAML file

```yaml
alert: post
http_post_url: <ElastAlert Webhook URL copied from Squadcast dashboard>
http_post_static_payload:
	Title: <Incident Title>
http_post_all_values: true
```

{% hint style="info" %}
**Note:**

You can make sure that the 'Incident Title Name' and 'ElastAlert Rule Name' be the same in order to help identify the rule that caused the alert easily.\
\
However, this is not mandatory.
{% endhint %}

![](/files/ckVKTQetraEuCmPkos5W)

For more details on **post** alert type, refer [HTTP Post Alert Type - ElastAlert](https://elastalert.readthedocs.io/en/latest/ruletypes.html#http-post).

Now, whenever an alert is triggered by ElastAlert according to the rules defined, it'll automatically create an incident in Squadcast. But, the resolving of incident needs to be done manually by going to Squadcast dashboard.

*Have any questions?* [*Ask the community*](https://community.squadcast.com/view/home)*.*


---

# Agent Instructions: 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:

```
GET https://support.squadcast.com/integrations/alert-source-integrations-native/elastalert.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
