PagerDuty 알림
PagerDuty 알림 (PagerDuty Alerting)
PagerDuty Alerting은 LiteLLM Enterprise 라이선스가 필요한 엔터프라이즈 기능이에요. 무료 30일 체험을 시작하거나 데모를 예약할 수 있어요. Enterprise가 제공하는 기능도 확인해 보세요.
두 가지 유형의 알림을 처리해요:
- 높은 LLM API 실패율: Y초 안에 X번 실패하도록 설정해 알림을 트리거해요.
- 많은 수의 멈춘(hanging) LLM 요청: Y초 안에 X번 hang 되도록 설정해 알림을 트리거해요.
출처: 문서
본문
빠른 시작 (Quick Start)
- 환경 변수에
PAGERDUTY_API_KEY="d8bxxxxx"를 설정해요.
PAGERDUTY_API_KEY="d8bxxxxx"
- config 파일에 PagerDuty Alerting을 설정해요.
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
- 테스트하기 — LiteLLM Proxy를 시작해요.
litellm --config config.yaml
LLM API 실패 알림 (LLM API Failure Alert)
프록시에 잘못된 요청을 보내 봐요.
curl -i --location 'http://0.0.0.0:4000/chat/completions' \
--header 'Content-Type: application/json' \
--header "Authorization: Bearer ***" \
--data ' {
"model": "gpt-5.6-terra",
"user": "hi",
"messages": [
{
"role": "user",
"bad_param": "i like coffee"
}
]
}'

LLM 멈춤 알림 (LLM Hanging Alert)
프록시에 멈춘(hanging) 요청을 보내 봐요. 우리의 멈춤 기준(hanging threshold)이 0.0000001초이므로 알림이 떠야 해요.
curl -i --location 'http://0.0.0.0:4000/chat/completions' \
--header 'Content-Type: application/json' \
--header "Authorization: Bearer ***" \
--data ' {
"model": "gpt-5.6-terra",
"user": "hi",
"messages": [
{
"role": "user",
"content": "i like coffee"
}
]
}'
