diff --git a/docs/my-website/docs/proxy/alerting.md b/docs/my-website/docs/proxy/alerting.md index e99f435248..feb54babd2 100644 --- a/docs/my-website/docs/proxy/alerting.md +++ b/docs/my-website/docs/proxy/alerting.md @@ -33,12 +33,16 @@ general_settings: alerting: ["slack"] alerting_threshold: 300 # sends alerts if requests hang for 5min+ and responses take 5min+ -environment_variables: - SLACK_WEBHOOK_URL: "https://hooks.slack.com/services/<>/<>/<>" +``` + +Set `SLACK_WEBHOOK_URL` in your proxy env + +```shell +SLACK_WEBHOOK_URL: "https://hooks.slack.com/services/<>/<>/<>" ``` ### Step 3: Start proxy ```bash -$ litellm /path/to/config.yaml +$ litellm --config /path/to/config.yaml ``` \ No newline at end of file diff --git a/docs/my-website/docs/proxy/budget_alerts.md b/docs/my-website/docs/proxy/budget_alerts.md index 92b0555100..580040d978 100644 --- a/docs/my-website/docs/proxy/budget_alerts.md +++ b/docs/my-website/docs/proxy/budget_alerts.md @@ -4,17 +4,54 @@ import Image from '@theme/IdealImage'; **Alerts when a project will exceed it’s planned limit** - + ## Quick Start ### 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 Soft Budget on when to get alerted -### 2. Test Alerting + -### 3. Check Slack \ No newline at end of file + +### 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 + + +### 4. Check Slack + +When the test alert works, you should expect to see this on your alerts slack channel + + \ No newline at end of file diff --git a/docs/my-website/img/budget_alert.png b/docs/my-website/img/budget_alert.png deleted file mode 100644 index 467080f41a..0000000000 Binary files a/docs/my-website/img/budget_alert.png and /dev/null differ diff --git a/docs/my-website/img/budget_alerts.png b/docs/my-website/img/budget_alerts.png new file mode 100644 index 0000000000..82d80b90ed Binary files /dev/null and b/docs/my-website/img/budget_alerts.png differ diff --git a/docs/my-website/img/create_key.png b/docs/my-website/img/create_key.png new file mode 100644 index 0000000000..b3b0532982 Binary files /dev/null and b/docs/my-website/img/create_key.png differ diff --git a/docs/my-website/img/test_alert.png b/docs/my-website/img/test_alert.png new file mode 100644 index 0000000000..ba253da83a Binary files /dev/null and b/docs/my-website/img/test_alert.png differ diff --git a/docs/my-website/sidebars.js b/docs/my-website/sidebars.js index 764e9e7212..d50e31c791 100644 --- a/docs/my-website/sidebars.js +++ b/docs/my-website/sidebars.js @@ -40,6 +40,7 @@ const sidebars = { "proxy/virtual_keys", "proxy/users", "proxy/ui", + "proxy/budget_alerts", "proxy/model_management", "proxy/health", "proxy/debugging",