# Grafana Integration

{% hint style="info" %}
Are you using Grafana v9.x or higher? Please refer our [Grafana Integration (v 9.x)](/integrations/inbound-integrations/grafana/grafana-integration-v-9.x.md) guide.
{% endhint %}

## In ilert: Create a Grafana alert source

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 **Grafana** in the search field, click on the Grafana 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 you [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 show additional settings such as customer alert templates or notification prioritiy. Click on **Finish setup** for now.
7. On the final page, an API key and / or webhook URL will be generated that you will need later in this guide.

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

## In Grafana: Add ilert Webhook as Alerting Channel <a href="#add-webhook" id="add-webhook"></a>

1. In the sidebar, go to **Alerting** → **Notification channels** and click on the **New channel** button.

<figure><img src="/files/-M9_7r7_jwk5bq1PsZJw" alt=""><figcaption></figcaption></figure>

2. Select **Type** webhook and in the field **URL** insert the webhookurl generated in ilert. Set the HTTP Method to **POST**.

<figure><img src="/files/-M9_7uNs-LjI9ItIAPLv" alt=""><figcaption></figcaption></figure>

3. Optionally test the integration by cliking on the **Send Test** button. Click on **Save**

<figure><img src="/files/-M9_7y0bWzI7QiLk7s0h" alt=""><figcaption></figcaption></figure>

4. Check if an alert has been created in ilert.
5. After the Notification Channel has been created in Grafana, add it to one or more **graph alerts**.
6. Switch to any dashboard of your Grafana installation and edit a graph.

<figure><img src="/files/-M9_80HwHcqKq_S-F_tx" alt=""><figcaption></figcaption></figure>

7. In the edit view, open the **Alert** section via the left sidemenu and click on the green **Create Alert** button.
8. Fill in the desired **condition** and select the relevant ilert **Notification channel** under **Notifications → Send to** you created in steps 2 and 3. Do not forget to save the dashboard afterwards (in the upper right Navibar).

<figure><img src="/files/-M9_83Wirybw_1-HTGY-" alt=""><figcaption></figcaption></figure>

9. The integration is now set up!

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

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

Yes, as soon as an alert with "ok" has been resolved in Grafana, the associated alert in ilert will be resolved automatically.

**What happens when an alert is paused in Grafana, is the associated alert also accepted in ilert?**

Yes.

**Can I link Grafana to multiple alert sources in ilert?**

Yes, create a **Notification Channel** per alert source in Grafana.


---

# 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://docs.ilert.com/integrations/inbound-integrations/grafana/grafana-integration.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.
