---
title: "Kapacitor integration for Grafana IRM | Grafana Cloud documentation"
description: "Configure Kapacitor integration for Grafana IRM to receive InfluxDB monitoring alerts"
---

# Kapacitor integration for Grafana IRM

The Kapacitor integration for Grafana IRM handles ticket events sent from Kapacitor webhooks. The integration provides grouping, auto-acknowledge and auto-resolve logic via customizable alert templates.

## Configure Grafana IRM to receive alerts from Kapacitor

1. In Grafana IRM, navigate to **IRM &gt; Integrations &gt; Monitoring Systems**
2. Click **+ New integration**
3. Select **Kapacitor** from the list of available integrations
4. Enter a name and description for the integration, click **Create**
5. A new page will open with the integration details. Copy the **IRM Integration URL** from **HTTP Endpoint** section

## Configure Kapacitor to send alerts to Grafana IRM

To send an alert from Kapacitor, you can follow these steps:

1. Create a Kapacitor TICKscript or modify an existing one to define the conditions for triggering the alert
2. The TICKscript specifies the data source, data processing, and the alert rule. Here’s an example of a simple TICKscript:
   
   tickscript ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy
   
   ```tickscript
   stream
       |from()
           .measurement('measurement_name')
           .where(lambda: <condition>)
       |alert()
           .webhook('<webhook_url>')
   ```
   
   Replace `'measurement_name'` with the name of the measurement you want to monitor, `<condition>` with the condition that triggers the alert, and `'<webhook_url>'` with **IRM Integration URL**
3. Save the TICKscript file with a `.tick` extension, for example, `alert_script.tick`
4. Start the Kapacitor service using the TICKscript:
   
   Bash ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy
   
   ```bash
   kapacitor define <alert_name> -tick /path/to/alert_script.tick
   kapacitor enable <alert_name>
   kapacitor reload
   ```
   
   Replace `<alert_name>` with a suitable name for your alert
5. Ensure that the Kapacitor service is running and actively monitoring the data
6. When the condition defined in the TICKscript is met, Kapacitor will trigger the alert and send a POST request to the specified webhook URL with the necessary information. Make sure your webhook endpoint is configured to receive and process the incoming alerts from Kapacitor

## Related topics

- [Grafana IRM integrations overview](/docs/grafana-cloud/alerting-and-irm/irm/integrations/alert-sources)
- [Alert escalation and routing](/docs/grafana-cloud/alerting-and-irm/irm/escalation-and-routing)
- [Kapacitor documentation](https://docs.influxdata.com/kapacitor/)
