From 38770da2f6c6102e5a31fe994262650f7a95b4b0 Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Mon, 1 Jul 2024 22:45:33 -0700 Subject: [PATCH] docs prometheus tracking x-remaining tokens --- docs/my-website/docs/proxy/prometheus.md | 27 ++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/docs/my-website/docs/proxy/prometheus.md b/docs/my-website/docs/proxy/prometheus.md index 974a081a9b0..6790b25b028 100644 --- a/docs/my-website/docs/proxy/prometheus.md +++ b/docs/my-website/docs/proxy/prometheus.md @@ -1,3 +1,6 @@ +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + # 📈 Prometheus metrics [BETA] LiteLLM Exposes a `/metrics` endpoint for Prometheus to Poll @@ -77,6 +80,25 @@ litellm_settings: | `litellm_remaining_tokens` | Track `x-ratelimit-remaining-tokens` return from LLM API Deployment | Example Metric + + + + +```shell +litellm_remaining_requests +{ + api_base="https://api.openai.com/v1", + api_provider="openai", + litellm_model_name="gpt-3.5-turbo", + model_group="gpt-3.5-turbo" +} +8998.0 +``` + + + + + ```shell litellm_remaining_tokens { @@ -87,6 +109,11 @@ litellm_remaining_tokens } 999981.0 ``` + + + + + ## Monitor System Health To monitor the health of litellm adjacent services (redis / postgres), do: