> ## Documentation Index
> Fetch the complete documentation index at: https://docs.uselumina.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Alerting

> Configure cost and quality alerts

Real-time alerts for cost spikes and quality drops.

***

## Alert Types

**Cost Alerts:**
Spending exceeds baseline by threshold

**Quality Alerts:**
Similarity score drops below threshold

***

## Configuration

Configure via dashboard or API:

```bash theme={null}
curl -X POST http://api:8081/api/alerts/configure   -d '{
    "service": "chat-api",
    "costThreshold": 2.0,
    "qualityThreshold": 0.2,
    "window": "1h"
  }'
```

***

## Webhook Integration

Send alerts to:

* Slack
* PagerDuty
* Custom webhooks

```bash theme={null}
curl -X POST http://api:8081/api/webhooks   -d '{
    "url": "https://hooks.slack.com/...",
    "events": ["cost_spike", "quality_drop"]
  }'
```

***

## Alert Example

```json theme={null}
{
  "type": "cost_spike",
  "service": "chat-api",
  "baseline": 0.50,
  "current": 2.30,
  "increase": 360,
  "threshold": 200
}
```
