From ff4eb5a5d48d32d4abddd6427f9f610c7ce64c2d Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Tue, 2 Jan 2024 22:47:01 +0530 Subject: [PATCH] docs(alerting.md): add slack alerting to docs --- docs/my-website/docs/proxy/alerting.md | 36 ++++++++++++++++++++++++++ docs/my-website/sidebars.js | 1 + 2 files changed, 37 insertions(+) create mode 100644 docs/my-website/docs/proxy/alerting.md diff --git a/docs/my-website/docs/proxy/alerting.md b/docs/my-website/docs/proxy/alerting.md new file mode 100644 index 000000000..a4a2ab6c8 --- /dev/null +++ b/docs/my-website/docs/proxy/alerting.md @@ -0,0 +1,36 @@ +# Slack Alerting + +Get alerts for failed db read/writes, hanging api calls, failed api calls. + +## Quick Start + +Set up a slack alert channel to receive alerts from proxy. + +### Step 1: Add a Slack Webhook URL to env + +Get a slack webhook url from https://api.slack.com/messaging/webhooks + + +### Step 2: Update config.yaml + +Let's save a bad key to our proxy + +```yaml +model_list: + model_name: "azure-model" + litellm_params: + model: "azure/gpt-35-turbo" + api_key: "my-bad-key" # 👈 bad key + +general_settings: + alerting: ["slack"] + +environment_variables: + SLACK_WEBHOOK_URL: "https://hooks.slack.com/services/<>/<>/<>" +``` + +### Step 3: Start proxy + +```bash +$ litellm /path/to/config.yaml +``` \ No newline at end of file diff --git a/docs/my-website/sidebars.js b/docs/my-website/sidebars.js index 95e637c3e..b65015906 100644 --- a/docs/my-website/sidebars.js +++ b/docs/my-website/sidebars.js @@ -113,6 +113,7 @@ const sidebars = { "proxy/health", "proxy/call_hooks", "proxy/caching", + "proxy/alerting", "proxy/logging", "proxy/streaming_logging", "proxy/deploy",