forked from phoenix/litellm-mirror
(docs) alerting slack budgets
This commit is contained in:
parent
aa565dc990
commit
fa2c6fdebb
7 changed files with 49 additions and 7 deletions
|
@ -33,12 +33,16 @@ general_settings:
|
||||||
alerting: ["slack"]
|
alerting: ["slack"]
|
||||||
alerting_threshold: 300 # sends alerts if requests hang for 5min+ and responses take 5min+
|
alerting_threshold: 300 # sends alerts if requests hang for 5min+ and responses take 5min+
|
||||||
|
|
||||||
environment_variables:
|
```
|
||||||
|
|
||||||
|
Set `SLACK_WEBHOOK_URL` in your proxy env
|
||||||
|
|
||||||
|
```shell
|
||||||
SLACK_WEBHOOK_URL: "https://hooks.slack.com/services/<>/<>/<>"
|
SLACK_WEBHOOK_URL: "https://hooks.slack.com/services/<>/<>/<>"
|
||||||
```
|
```
|
||||||
|
|
||||||
### Step 3: Start proxy
|
### Step 3: Start proxy
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ litellm /path/to/config.yaml
|
$ litellm --config /path/to/config.yaml
|
||||||
```
|
```
|
|
@ -4,17 +4,54 @@ import Image from '@theme/IdealImage';
|
||||||
|
|
||||||
**Alerts when a project will exceed it’s planned limit**
|
**Alerts when a project will exceed it’s planned limit**
|
||||||
|
|
||||||
<Image img={require('../../img/budget_alert.png')} />
|
<Image img={require('../../img/budget_alerts.png')} />
|
||||||
|
|
||||||
## Quick Start
|
## Quick Start
|
||||||
|
|
||||||
### 1. Setup Slack Alerting on your Proxy Config.yaml
|
### 1. Setup Slack Alerting on your Proxy Config.yaml
|
||||||
|
|
||||||
|
**Update proxy config.yaml with slack alerting**
|
||||||
|
Add `general_settings:alerting`
|
||||||
|
```yaml
|
||||||
|
model_list:
|
||||||
|
model_name: "azure-model"
|
||||||
|
litellm_params:
|
||||||
|
model: "azure/gpt-35-turbo"
|
||||||
|
|
||||||
|
general_settings:
|
||||||
|
alerting: ["slack"]
|
||||||
|
```
|
||||||
|
|
||||||
|
Get a slack webhook url from https://api.slack.com/messaging/webhooks
|
||||||
|
|
||||||
|
|
||||||
|
Set `SLACK_WEBHOOK_URL` in your proxy env
|
||||||
|
|
||||||
|
```shell
|
||||||
|
SLACK_WEBHOOK_URL: "https://hooks.slack.com/services/<>/<>/<>"
|
||||||
|
```
|
||||||
|
|
||||||
|
Start proxy
|
||||||
|
```bash
|
||||||
|
$ litellm --config /path/to/config.yaml
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
### 2. Create API Key on Proxy Admin UI
|
||||||
|
The Admin UI is found on `your-litellm-proxy-endpoint/ui`, example `http://localhost:4000/ui/`
|
||||||
|
|
||||||
### 1. Create API Key on Admin UI
|
|
||||||
- Set a key name
|
- Set a key name
|
||||||
- Set a Soft Budget on when to get alerted
|
- Set a Soft Budget on when to get alerted
|
||||||
|
|
||||||
### 2. Test Alerting
|
<Image img={require('../../img/create_key.png')} />
|
||||||
|
|
||||||
### 3. Check Slack
|
|
||||||
|
### 3. Test Slack Alerting on Admin UI
|
||||||
|
After creating a key on the Admin UI, click on "Test Slack Alert" to send a test alert to your Slack channel
|
||||||
|
<Image img={require('../../img/test_alert.png')} />
|
||||||
|
|
||||||
|
### 4. Check Slack
|
||||||
|
|
||||||
|
When the test alert works, you should expect to see this on your alerts slack channel
|
||||||
|
|
||||||
|
<Image img={require('../../img/budget_alerts.png')} />
|
Binary file not shown.
Before Width: | Height: | Size: 69 KiB |
BIN
docs/my-website/img/budget_alerts.png
Normal file
BIN
docs/my-website/img/budget_alerts.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 89 KiB |
BIN
docs/my-website/img/create_key.png
Normal file
BIN
docs/my-website/img/create_key.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 140 KiB |
BIN
docs/my-website/img/test_alert.png
Normal file
BIN
docs/my-website/img/test_alert.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 203 KiB |
|
@ -40,6 +40,7 @@ const sidebars = {
|
||||||
"proxy/virtual_keys",
|
"proxy/virtual_keys",
|
||||||
"proxy/users",
|
"proxy/users",
|
||||||
"proxy/ui",
|
"proxy/ui",
|
||||||
|
"proxy/budget_alerts",
|
||||||
"proxy/model_management",
|
"proxy/model_management",
|
||||||
"proxy/health",
|
"proxy/health",
|
||||||
"proxy/debugging",
|
"proxy/debugging",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue