# Prometheus & Better Stack integration

This integration allows you to create Uptime incidents from Prometheus automatically.

## Connecting Prometheus and Uptime

1.  Go to [Integrations](https://uptime.betterstack.com/team/0/integrations/ ";_blank") and click the **Importing data** tab.
2.  Find the Prometheus card and click **Add**.
3.  Name your Prometheus integration (for example, "Backend service") and click **Save changes**.
4.  Copy the webhook URL from the integration settings.

### In Prometheus

1.  Open your `alertmanager.yml` configuration file.
2.  Add a new webhook receiver using the URL from your Better Stack integration settings. Here is an example:

    ```yml
    [label alertmanager.yml]
    route:
      receiver: uptime

    receivers:
      - name: uptime
        webhook_configs:
          - url: https://uptime.betterstack.com/api/v1/prometheus/webhook/a6SD6giRjW7FTaYHxr9LryGo
    ```

3.  Save `alertmanager.yml` and reload the Alertmanager service.

That's it. Now, when Prometheus fires an alert, an incident will be created in Uptime.
