# Grafana Integration

### Overview

[Grafana](https://grafana.com/) is an open-source analytics and observability platform widely used for monitoring metrics, logs, and traces. By configuring a Webhook contact point in Grafana Alerting, you can forward firing and resolved alerts directly to ITOC360 and trigger your on-call escalation policies in real time.

### Provider Configuration & Mapping

ITOC360 uses the `status` field from Grafana's webhook payload to determine the alert type.

| Grafana Status | ITOC360 Type |
| -------------- | ------------ |
| `firing`       | ALERT        |
| `resolved`     | RESOLVE      |

Priority is read from the `severity` label on your Grafana alert rule. The supported values and their mappings are:

| Grafana Severity Label | ITOC360 Priority |
| ---------------------- | ---------------- |
| `info`                 | LOW              |
| `warning`              | MEDIUM           |
| `critical`             | CRITICAL         |

To use priority mapping, add a `severity` label to your Grafana alert rule with one of the values above. If no severity label is present, the alert will default to MEDIUM priority.

***

### Setup Instructions

**Step 1: Get Your Webhook URL**

1. Log in to your ITOC360 platform.
2. Go to **Sources → Add Source**.
3. Select **Grafana** as your provider.
4. Save the configuration and copy the generated **Webhook URL** and **Token**.

**Step 2: Open Notification Configuration**

1. Log in to your Grafana instance.
2. From the left sidebar, go to **Alerts & IRM → Alerting → Notification configuration**.
3. Make sure you are on the **Contact points** tab.

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

**Step 3: Create a Contact Point**

1. Click **+ New contact point** in the top right corner.
2. Fill in the form:
   * **Name:** `itoc360`
   * **Integration:** Select `Webhook` from the dropdown.
   * **URL:** Paste your webhook URL in the following format:

     ```
     https://api.itoc360.app/functions/v1/events
     ```
   * **HTTP Method:** `POST`
   * **Extra Headers:**`x-itoc360-token`
3. Leave all other fields as default.

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

<figure><img src="/files/6yi4Fgo9MMEN1QTU8fQi" alt=""><figcaption></figcaption></figure>

**Step 4: Test the Contact Point**

1. Click the **Test** button in the top right of the form.
2. A dialog will appear — click **Send test notification**.
3. A green **Test notification sent successfully** message confirms the payload reached ITOC360.

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

4. Click **Save contact point**.

**Step 5: Set as Default Notification Policy**

1. Switch to the **Notification policies** tab.
2. On the **Default policy** row, click **More → Edit**.
3. In the **Edit route** dialog, click the **Default contact point** dropdown and select `itoc360`.

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

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

4. Click **Update policy**.

From this point on, all firing alerts in Grafana will be routed to ITOC360. Each alert rule you create will automatically notify your on-call team based on your escalation policies.


---

# 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.itoc360.com/integrations/inbound-integrations/observability-and-apm/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.
