Skip to content

feat(grafana_dashboard): enable datasource selection via templating #10257

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "rMzWaBvIk"
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": {
"defaults": {
Expand Down Expand Up @@ -110,7 +110,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "rMzWaBvIk"
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "histogram_quantile(0.99, sum(rate(litellm_self_latency_bucket{self=\"self\"}[1m])) by (le))",
Expand All @@ -125,7 +125,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "rMzWaBvIk"
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": {
"defaults": {
Expand Down Expand Up @@ -216,7 +216,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "rMzWaBvIk"
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "sum(increase(litellm_spend_metric_total[30d])) by (hashed_api_key)",
Expand All @@ -232,7 +232,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "rMzWaBvIk"
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": {
"defaults": {
Expand Down Expand Up @@ -309,7 +309,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "rMzWaBvIk"
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "sum by (model) (increase(litellm_requests_metric_total[5m]))",
Expand All @@ -324,7 +324,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "rMzWaBvIk"
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": {
"defaults": {
Expand Down Expand Up @@ -375,7 +375,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "rMzWaBvIk"
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "sum(increase(litellm_llm_api_failed_requests_metric_total[1h]))",
Expand All @@ -390,7 +390,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "rMzWaBvIk"
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": {
"defaults": {
Expand Down Expand Up @@ -468,7 +468,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "rMzWaBvIk"
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "sum(increase(litellm_spend_metric_total[30d])) by (model)",
Expand All @@ -483,7 +483,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "rMzWaBvIk"
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": {
"defaults": {
Expand Down Expand Up @@ -560,7 +560,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "rMzWaBvIk"
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "sum(increase(litellm_total_tokens_total[5m])) by (model)",
Expand All @@ -579,7 +579,27 @@
"style": "dark",
"tags": [],
"templating": {
"list": []
"list": [
{
"current": {
"selected": false,
"text": "prometheus",
"value": "edx8memhpd9tsa"
},
"hide": 0,
"includeAll": false,
"label": "datasource",
"multi": false,
"name": "DS_PROMETHEUS",
"options": [],
"query": "prometheus",
"queryValue": "",
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"type": "datasource"
}
]
},
"time": {
"from": "now-1h",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "bdiyc60dco54we"
"uid": "${DS_PROMETHEUS}"
},
"description": "Total requests per second made to proxy - success + failure ",
"fieldConfig": {
Expand Down Expand Up @@ -119,7 +119,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "bdiyc60dco54we"
"uid": "${DS_PROMETHEUS}"
},
"disableTextWrap": false,
"editorMode": "code",
Expand All @@ -138,7 +138,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "bdiyc60dco54we"
"uid": "${DS_PROMETHEUS}"
},
"description": "Failures per second by Exception Class",
"fieldConfig": {
Expand Down Expand Up @@ -220,7 +220,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "bdiyc60dco54we"
"uid": "${DS_PROMETHEUS}"
},
"disableTextWrap": false,
"editorMode": "code",
Expand All @@ -239,7 +239,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "bdiyc60dco54we"
"uid": "${DS_PROMETHEUS}"
},
"description": "Average Response latency (seconds)",
"fieldConfig": {
Expand Down Expand Up @@ -346,7 +346,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "bdiyc60dco54we"
"uid": "${DS_PROMETHEUS}"
},
"disableTextWrap": false,
"editorMode": "code",
Expand All @@ -361,7 +361,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "bdiyc60dco54we"
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "histogram_quantile(0.5, sum(rate(litellm_request_total_latency_metric_bucket[2m])) by (le))",
Expand Down Expand Up @@ -391,7 +391,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "bdiyc60dco54we"
"uid": "${DS_PROMETHEUS}"
},
"description": "x-ratelimit-remaining-requests returning from LLM APIs",
"fieldConfig": {
Expand Down Expand Up @@ -473,7 +473,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "bdiyc60dco54we"
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "topk(5, sort(litellm_remaining_requests))",
Expand All @@ -488,7 +488,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "bdiyc60dco54we"
"uid": "${DS_PROMETHEUS}"
},
"description": "x-ratelimit-remaining-tokens from LLM API ",
"fieldConfig": {
Expand Down Expand Up @@ -570,7 +570,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "bdiyc60dco54we"
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "topk(5, sort(litellm_remaining_tokens))",
Expand Down Expand Up @@ -598,7 +598,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "bdiyc60dco54we"
"uid": "${DS_PROMETHEUS}"
},
"description": "Requests per second by Key Alias (keys are LiteLLM Virtual Keys). If key is None - means no Alias Set ",
"fieldConfig": {
Expand Down Expand Up @@ -679,7 +679,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "bdiyc60dco54we"
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "sum(rate(litellm_proxy_total_requests_metric_total[2m])) by (api_key_alias)\n",
Expand All @@ -694,7 +694,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "bdiyc60dco54we"
"uid": "${DS_PROMETHEUS}"
},
"description": "Requests per second by Team Alias. If team is None - means no team alias Set ",
"fieldConfig": {
Expand Down Expand Up @@ -775,7 +775,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "bdiyc60dco54we"
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "sum(rate(litellm_proxy_total_requests_metric_total[2m])) by (team_alias)\n",
Expand All @@ -792,7 +792,27 @@
"schemaVersion": 40,
"tags": [],
"templating": {
"list": []
"list": [
{
"current": {
"selected": false,
"text": "prometheus",
"value": "edx8memhpd9tsb"
},
"hide": 0,
"includeAll": false,
"label": "datasource",
"multi": false,
"name": "DS_PROMETHEUS",
"options": [],
"query": "prometheus",
"queryValue": "",
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"type": "datasource"
}
]
},
"time": {
"from": "now-6h",
Expand Down
Loading