Skip to content

Commit 67dbbe2

Browse files
committed
fix(grafana): add datasource binding to template variables
All query-type variables (namespace, pod_dp, job_*, instance_*) were missing the datasource field. Without it, Grafana doesn't know which datasource to use for label_values() queries, causing all variables to return empty.
1 parent 9da2dac commit 67dbbe2

1 file changed

Lines changed: 26 additions & 2 deletions

File tree

deploy/observability/grafana/pingora-gateway-observability-dashboard.json

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,11 @@
3838
"text": "nantian-gw",
3939
"value": "nantian-gw"
4040
},
41-
"definition": "label_values(nantian_gateway_dataplane_ready, namespace)"
41+
"definition": "label_values(nantian_gateway_dataplane_ready, namespace)",
42+
"datasource": {
43+
"type": "prometheus",
44+
"uid": "$DS_PROMETHEUS"
45+
}
4246
},
4347
{
4448
"name": "pod_dp",
@@ -52,7 +56,11 @@
5256
"text": "All",
5357
"value": "$__all"
5458
},
55-
"definition": "label_values(nantian_gateway_dataplane_ready{namespace=~\"$namespace\"}, pod)"
59+
"definition": "label_values(nantian_gateway_dataplane_ready{namespace=~\"$namespace\"}, pod)",
60+
"datasource": {
61+
"type": "prometheus",
62+
"uid": "$DS_PROMETHEUS"
63+
}
5664
},
5765
{
5866
"name": "job_controlplane",
@@ -65,6 +73,10 @@
6573
"current": {
6674
"text": "All",
6775
"value": "$__all"
76+
},
77+
"datasource": {
78+
"type": "prometheus",
79+
"uid": "$DS_PROMETHEUS"
6880
}
6981
},
7082
{
@@ -78,6 +90,10 @@
7890
"current": {
7991
"text": "All",
8092
"value": "$__all"
93+
},
94+
"datasource": {
95+
"type": "prometheus",
96+
"uid": "$DS_PROMETHEUS"
8197
}
8298
},
8399
{
@@ -91,6 +107,10 @@
91107
"current": {
92108
"text": "All",
93109
"value": "$__all"
110+
},
111+
"datasource": {
112+
"type": "prometheus",
113+
"uid": "$DS_PROMETHEUS"
94114
}
95115
},
96116
{
@@ -104,6 +124,10 @@
104124
"current": {
105125
"text": "All",
106126
"value": "$__all"
127+
},
128+
"datasource": {
129+
"type": "prometheus",
130+
"uid": "$DS_PROMETHEUS"
107131
}
108132
}
109133
]

0 commit comments

Comments
 (0)