Skip to content

Commit

Permalink
make dashboards multi-replica tolerant and make each dashboard opt-in
Browse files Browse the repository at this point in the history
Signed-off-by: clux <[email protected]>
  • Loading branch information
clux committed Sep 9, 2024
1 parent fac3f29 commit 8db7403
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 49 deletions.
2 changes: 1 addition & 1 deletion charts/cx-dashboards/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ apiVersion: v2
name: cx-dashboards
description: cx dashboard configmaps
type: application
version: 0.1.4
version: 0.1.5
dependencies: []
6 changes: 3 additions & 3 deletions charts/cx-dashboards/templates/cxalertmanager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ data:
},
"editorMode": "code",
"exemplar": false,
"expr": "label_replace(alertmanager_build_info, \"repository\", \"prometheus/alertmanager\", \"container\", \"(.*)\")",
"expr": "label_replace(avg(alertmanager_build_info) by (repository, container, version), \"repository\", \"prometheus/alertmanager\", \"container\", \"(.*)\")",
"format": "table",
"hide": false,
"instant": true,
Expand All @@ -193,7 +193,7 @@ data:
},
"editorMode": "code",
"exemplar": false,
"expr": "label_replace(prometheus_operator_build_info, \"repository\", \"prometheus-operator/prometheus-operator\", \"container\", \"(.*)\")",
"expr": "label_replace(avg(prometheus_operator_build_info) by (repository, container, version), \"repository\", \"prometheus-operator/prometheus-operator\", \"container\", \"(.*)\")",
"format": "table",
"hide": false,
"instant": true,
Expand All @@ -208,7 +208,7 @@ data:
},
"editorMode": "code",
"exemplar": false,
"expr": "label_replace(grafana_build_info, \"repository\", \"grafana/grafana\", \"container\", \"(.*)\")",
"expr": "label_replace(avg(grafana_build_info) by (repository, container, version), \"repository\", \"grafana/grafana\", \"container\", \"(.*)\")",
"format": "table",
"hide": false,
"instant": true,
Expand Down
18 changes: 7 additions & 11 deletions charts/cx-dashboards/templates/cxprometheus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ data:
},
"editorMode": "code",
"exemplar": false,
"expr": "label_replace(prometheus_build_info, \"repository\", \"$1/$1\", \"container\", \"(.*)\")",
"expr": "label_replace(avg(prometheus_build_info) by (repository, container, version), \"repository\", \"$1/$1\", \"container\", \"(.*)\")",
"format": "table",
"hide": false,
"instant": true,
Expand All @@ -213,7 +213,7 @@ data:
},
"editorMode": "code",
"exemplar": false,
"expr": "label_replace(prometheus_operator_build_info, \"repository\", \"prometheus-operator/prometheus-operator\", \"container\", \"(.*)\")",
"expr": "label_replace(avg(prometheus_operator_build_info) by (repository, container, version), \"repository\", \"prometheus-operator/prometheus-operator\", \"container\", \"(.*)\")",
"format": "table",
"hide": false,
"instant": true,
Expand All @@ -228,7 +228,7 @@ data:
},
"editorMode": "code",
"exemplar": false,
"expr": "label_replace(grafana_build_info, \"repository\", \"grafana/grafana\", \"container\", \"(.*)\")",
"expr": "label_replace(avg(grafana_build_info) by (repository, container, version), \"repository\", \"grafana/grafana\", \"container\", \"(.*)\")",
"format": "table",
"hide": false,
"instant": true,
Expand Down Expand Up @@ -2101,8 +2101,7 @@ data:
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
"color": "green"
}
]
},
Expand Down Expand Up @@ -2225,8 +2224,7 @@ data:
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
"color": "green"
}
]
},
Expand Down Expand Up @@ -2450,8 +2448,7 @@ data:
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
"color": "green"
},
{
"color": "#EAB839",
Expand Down Expand Up @@ -2555,8 +2552,7 @@ data:
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
"color": "green"
},
{
"color": "red",
Expand Down
11 changes: 5 additions & 6 deletions charts/cx-dashboards/values.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@

urls:
prometheus: http://prometheus.clux.dev
alertmanager: http://alertmanager.clux.dev

dashboards:
home:
enabled: true
enabled: false
machine:
enabled: true
enabled: false
prometheus:
enabled: true
enabled: false
alertmanager:
enabled: true
enabled: false
flux:
enabled: true
enabled: false
6 changes: 3 additions & 3 deletions dashboards/alertmanager.json
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@
},
"editorMode": "code",
"exemplar": false,
"expr": "label_replace(alertmanager_build_info, \"repository\", \"prometheus/alertmanager\", \"container\", \"(.*)\")",
"expr": "label_replace(avg(alertmanager_build_info) by (repository, container, version), \"repository\", \"prometheus/alertmanager\", \"container\", \"(.*)\")",
"format": "table",
"hide": false,
"instant": true,
Expand All @@ -181,7 +181,7 @@
},
"editorMode": "code",
"exemplar": false,
"expr": "label_replace(prometheus_operator_build_info, \"repository\", \"prometheus-operator/prometheus-operator\", \"container\", \"(.*)\")",
"expr": "label_replace(avg(prometheus_operator_build_info) by (repository, container, version), \"repository\", \"prometheus-operator/prometheus-operator\", \"container\", \"(.*)\")",
"format": "table",
"hide": false,
"instant": true,
Expand All @@ -196,7 +196,7 @@
},
"editorMode": "code",
"exemplar": false,
"expr": "label_replace(grafana_build_info, \"repository\", \"grafana/grafana\", \"container\", \"(.*)\")",
"expr": "label_replace(avg(grafana_build_info) by (repository, container, version), \"repository\", \"grafana/grafana\", \"container\", \"(.*)\")",
"format": "table",
"hide": false,
"instant": true,
Expand Down
18 changes: 7 additions & 11 deletions dashboards/prometheus.json
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
},
"editorMode": "code",
"exemplar": false,
"expr": "label_replace(prometheus_build_info, \"repository\", \"$1/$1\", \"container\", \"(.*)\")",
"expr": "label_replace(avg(prometheus_build_info) by (repository, container, version), \"repository\", \"$1/$1\", \"container\", \"(.*)\")",
"format": "table",
"hide": false,
"instant": true,
Expand All @@ -201,7 +201,7 @@
},
"editorMode": "code",
"exemplar": false,
"expr": "label_replace(prometheus_operator_build_info, \"repository\", \"prometheus-operator/prometheus-operator\", \"container\", \"(.*)\")",
"expr": "label_replace(avg(prometheus_operator_build_info) by (repository, container, version), \"repository\", \"prometheus-operator/prometheus-operator\", \"container\", \"(.*)\")",
"format": "table",
"hide": false,
"instant": true,
Expand All @@ -216,7 +216,7 @@
},
"editorMode": "code",
"exemplar": false,
"expr": "label_replace(grafana_build_info, \"repository\", \"grafana/grafana\", \"container\", \"(.*)\")",
"expr": "label_replace(avg(grafana_build_info) by (repository, container, version), \"repository\", \"grafana/grafana\", \"container\", \"(.*)\")",
"format": "table",
"hide": false,
"instant": true,
Expand Down Expand Up @@ -2089,8 +2089,7 @@
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
"color": "green"
}
]
},
Expand Down Expand Up @@ -2213,8 +2212,7 @@
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
"color": "green"
}
]
},
Expand Down Expand Up @@ -2438,8 +2436,7 @@
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
"color": "green"
},
{
"color": "#EAB839",
Expand Down Expand Up @@ -2543,8 +2540,7 @@
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
"color": "green"
},
{
"color": "red",
Expand Down
6 changes: 3 additions & 3 deletions deploy/dashboards/cxalertmanager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ data:
},
"editorMode": "code",
"exemplar": false,
"expr": "label_replace(alertmanager_build_info, \"repository\", \"prometheus/alertmanager\", \"container\", \"(.*)\")",
"expr": "label_replace(avg(alertmanager_build_info) by (repository, container, version), \"repository\", \"prometheus/alertmanager\", \"container\", \"(.*)\")",
"format": "table",
"hide": false,
"instant": true,
Expand All @@ -191,7 +191,7 @@ data:
},
"editorMode": "code",
"exemplar": false,
"expr": "label_replace(prometheus_operator_build_info, \"repository\", \"prometheus-operator/prometheus-operator\", \"container\", \"(.*)\")",
"expr": "label_replace(avg(prometheus_operator_build_info) by (repository, container, version), \"repository\", \"prometheus-operator/prometheus-operator\", \"container\", \"(.*)\")",
"format": "table",
"hide": false,
"instant": true,
Expand All @@ -206,7 +206,7 @@ data:
},
"editorMode": "code",
"exemplar": false,
"expr": "label_replace(grafana_build_info, \"repository\", \"grafana/grafana\", \"container\", \"(.*)\")",
"expr": "label_replace(avg(grafana_build_info) by (repository, container, version), \"repository\", \"grafana/grafana\", \"container\", \"(.*)\")",
"format": "table",
"hide": false,
"instant": true,
Expand Down
18 changes: 7 additions & 11 deletions deploy/dashboards/cxprometheus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ data:
},
"editorMode": "code",
"exemplar": false,
"expr": "label_replace(prometheus_build_info, \"repository\", \"$1/$1\", \"container\", \"(.*)\")",
"expr": "label_replace(avg(prometheus_build_info) by (repository, container, version), \"repository\", \"$1/$1\", \"container\", \"(.*)\")",
"format": "table",
"hide": false,
"instant": true,
Expand All @@ -211,7 +211,7 @@ data:
},
"editorMode": "code",
"exemplar": false,
"expr": "label_replace(prometheus_operator_build_info, \"repository\", \"prometheus-operator/prometheus-operator\", \"container\", \"(.*)\")",
"expr": "label_replace(avg(prometheus_operator_build_info) by (repository, container, version), \"repository\", \"prometheus-operator/prometheus-operator\", \"container\", \"(.*)\")",
"format": "table",
"hide": false,
"instant": true,
Expand All @@ -226,7 +226,7 @@ data:
},
"editorMode": "code",
"exemplar": false,
"expr": "label_replace(grafana_build_info, \"repository\", \"grafana/grafana\", \"container\", \"(.*)\")",
"expr": "label_replace(avg(grafana_build_info) by (repository, container, version), \"repository\", \"grafana/grafana\", \"container\", \"(.*)\")",
"format": "table",
"hide": false,
"instant": true,
Expand Down Expand Up @@ -2099,8 +2099,7 @@ data:
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
"color": "green"
}
]
},
Expand Down Expand Up @@ -2223,8 +2222,7 @@ data:
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
"color": "green"
}
]
},
Expand Down Expand Up @@ -2448,8 +2446,7 @@ data:
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
"color": "green"
},
{
"color": "#EAB839",
Expand Down Expand Up @@ -2553,8 +2550,7 @@ data:
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
"color": "green"
},
{
"color": "red",
Expand Down

0 comments on commit 8db7403

Please sign in to comment.