---
title: "PagerDuty Alerting"
url: "/docs/proxy/pagerduty"
canonical_url: "https://docs.litellm.ai/docs/proxy/pagerduty"
type: "docs"
last_updated: "2026-10-08"
summary: "Handles two types of alerts:"
related:
  - "/docs/proxy/alerting"
  - "/docs/proxy/prometheus"
---
# PagerDuty Alerting

> Index of all LiteLLM docs: https://docs.litellm.ai/llms.txt


> **LiteLLM Enterprise feature: PagerDuty Alerting.** Requires an Enterprise license (`LITELLM_LICENSE`). Talk to sales: https://www.litellm.ai/enterprise#talk-to-sales

Handles two types of alerts:
- High LLM API Failure Rate. Configure X fails in Y seconds to trigger an alert.
- High Number of Hanging LLM Requests. Configure X hangs in Y seconds to trigger an alert.

## Quick Start

1. Set `PAGERDUTY_API_KEY="d8bxxxxx"` in your environment variables.

```
PAGERDUTY_API_KEY="d8bxxxxx"
```

2. Set PagerDuty Alerting in your config file.

```yaml
model_list:
  - model_name: "openai/*"
    litellm_params:
      model: "openai/*"
      api_key: os.environ/OPENAI_API_KEY

general_settings: 
  alerting: ["pagerduty"]
  alerting_args:
    failure_threshold: 1  # Number of requests failing in a window
    failure_threshold_window_seconds: 10  # Window in seconds

    # Requests hanging threshold
    hanging_threshold_seconds: 0.0000001  # Number of seconds of waiting for a response before a request is considered hanging
    hanging_threshold_window_seconds: 10  # Window in seconds
```

3. Test it 

Start LiteLLM Proxy

```shell
litellm --config config.yaml
```

### LLM API Failure Alert
Try sending a bad request to proxy 

```shell
curl -i --location 'http://0.0.0.0:4000/chat/completions' \
--header 'Content-Type: application/json' \
--header "Authorization: Bearer $LITELLM_API_KEY" \
--data ' {
      "model": "gpt-5.6-terra",
      "user": "hi",
      "messages": [
        {
          "role": "user",
          "bad_param": "i like coffee"
        }
      ]
    }
'
```

### LLM Hanging Alert

Try sending a hanging request to proxy 

Since our hanging threshold is 0.0000001 seconds, you should see an alert.

```shell
curl -i --location 'http://0.0.0.0:4000/chat/completions' \
--header 'Content-Type: application/json' \
--header "Authorization: Bearer $LITELLM_API_KEY" \
--data ' {
      "model": "gpt-5.6-terra",
      "user": "hi",
      "messages": [
        {
          "role": "user",
          "content": "i like coffee"
        }
      ]
    }
'
```

## Related pages

- [Alerting / Webhooks](https://docs.litellm.ai/docs/proxy/alerting.md)
- [Prometheus metrics](https://docs.litellm.ai/docs/proxy/prometheus.md)
