Skip to content

Commit

Permalink
select cluster label to use in multi cluster environment (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
eumel8 authored Dec 9, 2024
1 parent e41b945 commit 1047020
Showing 1 changed file with 32 additions and 4 deletions.
36 changes: 32 additions & 4 deletions chart/files/caas-carbon-dashboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -1744,7 +1744,7 @@
"type": "prometheus",
"uid": "${datasource}"
},
"definition": "label_values(kepler_container_package_joules_total, container_namespace)",
"definition": "label_values(kepler_container_package_joules_total{cluster=~\"$meta_cluster\"}, container_namespace)",
"description": "Namespace for pods to choose",
"hide": 0,
"includeAll": true,
Expand All @@ -1753,7 +1753,7 @@
"name": "namespace",
"options": [],
"query": {
"query": "label_values(kepler_container_package_joules_total, container_namespace)",
"query": "label_values(kepler_container_package_joules_total{cluster=~\"$meta_cluster\"}, container_namespace)",
"refId": "StandardVariableQuery"
},
"refresh": 1,
Expand All @@ -1776,15 +1776,15 @@
"type": "prometheus",
"uid": "${datasource}"
},
"definition": "label_values(kepler_container_package_joules_total{container_namespace=~\"$namespace\"}, pod_name)",
"definition": "label_values(kepler_container_package_joules_total{container_namespace=~\"$namespace\",cluster=~\"$meta_cluster\"}, pod_name)",
"hide": 0,
"includeAll": true,
"label": "Pod",
"multi": false,
"name": "pod",
"options": [],
"query": {
"query": "label_values(kepler_container_package_joules_total{container_namespace=~\"$namespace\"}, pod_name)",
"query": "label_values(kepler_container_package_joules_total{container_namespace=~\"$namespace\",cluster=~\"$meta_cluster\"}, pod_name)",
"refId": "StandardVariableQuery"
},
"refresh": 1,
Expand All @@ -1796,6 +1796,34 @@
"type": "query",
"useTags": false
},
{
"allValue": ".*",
"current": {
"selected": false,
"text": "All",
"value": "$__all"
},
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"definition": "label_values(prometheus_build_info, cluster)",
"hide": 0,
"includeAll": true,
"label": "Cluster",
"multi": false,
"name": "meta_cluster",
"options": [],
"query": "label_values(prometheus_build_info, cluster)",
"refresh": 2,
"regex": "",
"skipUrlSync": false,
"sort": 1,
"tagValuesQuery": "",
"tagsQuery": "",
"type": "query",
"useTags": false
},
{
"description": "1W*s = 1J and 1J = (1/3600000)kWh",
"hide": 2,
Expand Down

0 comments on commit 1047020

Please sign in to comment.