# InfluxDB Integration

[InfluxDB](https://www.influxdata.com) is an open-source time series database designed to handle high write and query loads, ideal for storing and analyzing time-stamped data such as metrics, events, and real-time analytics. It provides features like built-in time-stamping, data retention policies, and support for various data visualization tools, making it a popular choice for monitoring applications, IoT, and performance metrics.

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

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 **InfluxDB** in the search field, click the InfluxDB tile, and click **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 on **Finish setup** for now.
7. On the final page, an API key and/or webhook URL will be generated, which you will need later in this guide.

   <figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2Fi3TIOBvNYBQfDtNpmm0A%2FScreenshot%202023-08-28%20at%2011.47.34.png?alt=media&#x26;token=6cae965a-e448-4443-8c20-37cf501c43b2" alt=""><figcaption></figcaption></figure>

## In InfluxDB: Add ilert Webhook as Notification Endpoint

1. On the sidebar, click **Alerts**.

<figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2FntWIItFIFt78CWsrlRcN%2F1.png?alt=media&#x26;token=6fe2eb45-36ab-4fc3-8ff8-e649f5bd3937" alt="" width="563"><figcaption></figcaption></figure>

2. Click **Notification Endpoints -> Create**.

<figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2FcMLw9RPM0h2M3itiFpOw%2F2.png?alt=media&#x26;token=77700bb4-2613-442d-a416-1b099ec5527d" alt="" width="563"><figcaption></figcaption></figure>

3. Set HTTP as Destination and enter a Name.
4. Under **HTTP Options**, set **HTTP Method** to POST and enter the previously generated in ilert alert source URL into the **URL**.
5. Click **Create Notification Endpoint** to save.

<figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2Fa1LPVS32hvC0jgBOOtg2%2F3-2.png?alt=media&#x26;token=c3b5e481-0f82-4216-8d47-28ea87b027b1" alt="" width="563"><figcaption></figcaption></figure>

6. Navigate to **Checks -> Create** (this documentation uses threshold checks).

<figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2FVodEeEXK1sVwut5vLqOj%2F4-1.png?alt=media&#x26;token=9ec64330-daa3-4000-b41d-01670d1800f7" alt="" width="563"><figcaption></figcaption></figure>

7. Set a **Name** for your check.
8. Now select a metric you want to create a check for.
9. Click on **2. Configure Check** to set up the threshold.

<figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2FVfb4nmgl6pgzjR0upD4J%2F5.png?alt=media&#x26;token=12e8376f-baee-48c6-b221-78ffdd4833bb" alt="" width="563"><figcaption></figcaption></figure>

10. Set up some thresholds.

{% hint style="info" %}
We recommend that you create a threshold for setting the check status to '**OK'** as it is necessary to resolve corresponding alerts in ilert.
{% endhint %}

<figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2FUPKBUHft7tqhcbBm2lzr%2F6.png?alt=media&#x26;token=177e6a6e-8c34-41f1-8efe-53b8eb83037c" alt="" width="563"><figcaption></figcaption></figure>

11. Click on the blue tick in the top right corner to save the check.
12. Now navigate to **Notification Rules -> Create**.

<figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2FEzhNe7LucyIVrKIjTAM0%2F4.png?alt=media&#x26;token=2449d66e-00ae-4c3d-ba3e-d8e5aed2e282" alt="" width="563"><figcaption></figcaption></figure>

13. Add the following Notification Rules:

{% tabs %}
{% tab title="CRIT" %}

<figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2FL9JvQLEXHujZv5eQAcXr%2F7.png?alt=media&#x26;token=a55131bf-9baa-49d1-b424-b50b1257e822" alt="" width="563"><figcaption></figcaption></figure>
{% endtab %}

{% tab title="WARN" %}

<figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2F5EjcdxNNyahQ8q9x8o54%2F8.png?alt=media&#x26;token=62f3254f-5505-478f-9325-1b4396559685" alt="" width="563"><figcaption></figcaption></figure>
{% endtab %}

{% tab title="OK" %}

<figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2F6ZmRu0pVocQDqUqvLTcA%2F9.png?alt=media&#x26;token=7dc93c68-37c9-4365-850f-5383f0166ac6" alt="" width="563"><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}

14. Save the Notification Rule(s).

## FAQ <a href="#faq" id="faq"></a>

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

Yes, if you created a threshold and a notification rule for the 'OK' status, corresponding alerts will be resolved automatically.
