Skip to content
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

Fix NaN Cluster Stats Dashboard #24

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
128 changes: 75 additions & 53 deletions monitoring/configs/dashboards/cluster.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"id": 1,
"id": null,
"links": [],
"liveNow": false,
"panels": [
Expand Down Expand Up @@ -84,14 +84,15 @@
"values": false
},
"text": {},
"textMode": "value"
"textMode": "value",
"wideLayout": true
},
"pluginVersion": "10.0.3",
"pluginVersion": "10.2.2",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"exemplar": false,
Expand Down Expand Up @@ -150,14 +151,15 @@
"values": false
},
"text": {},
"textMode": "value"
"textMode": "value",
"wideLayout": true
},
"pluginVersion": "10.0.3",
"pluginVersion": "10.2.2",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"exemplar": false,
Expand Down Expand Up @@ -220,14 +222,15 @@
"values": false
},
"text": {},
"textMode": "value"
"textMode": "value",
"wideLayout": true
},
"pluginVersion": "10.0.3",
"pluginVersion": "10.2.2",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"exemplar": false,
Expand Down Expand Up @@ -286,14 +289,15 @@
"values": false
},
"text": {},
"textMode": "value"
"textMode": "value",
"wideLayout": true
},
"pluginVersion": "10.0.3",
"pluginVersion": "10.2.2",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"exemplar": false,
Expand All @@ -309,7 +313,10 @@
"type": "stat"
},
{
"datasource": "${DS_PROMETHEUS}",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"description": "",
"fieldConfig": {
"defaults": {
Expand Down Expand Up @@ -346,6 +353,7 @@
"displayMode": "gradient",
"minVizHeight": 10,
"minVizWidth": 0,
"namePlacement": "auto",
"orientation": "horizontal",
"reduceOptions": {
"calcs": [
Expand All @@ -358,21 +366,30 @@
"text": {},
"valueMode": "color"
},
"pluginVersion": "10.0.3",
"pluginVersion": "10.2.2",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also updated to the latest Grafana format by 10.2.x.

Wouldn't such grafana format updates apply to the other dashboards too? It may be better to update all the dashboards together separately and keep this PR more focused to fixing the bug.

"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"exemplar": true,
"expr": "sum(rate(gotk_reconcile_duration_seconds_sum{namespace=~\"$operator_namespace\",exported_namespace=~\"$namespace\",kind=~\"Kustomization|HelmRelease\"}[5m])) by (kind)\n/\n sum(rate(gotk_reconcile_duration_seconds_count{namespace=~\"$operator_namespace\",exported_namespace=~\"$namespace\",kind=~\"Kustomization|HelmRelease\"}[5m])) by (kind)",
"expr": "sum(rate(gotk_reconcile_duration_seconds_sum{namespace=~\"$operator_namespace\",exported_namespace=~\"$namespace\",kind=~\"Kustomization|HelmRelease\"}[5m])) by (kind)\n/\n sum(rate(gotk_reconcile_duration_seconds_count{namespace=~\"$operator_namespace\",exported_namespace=~\"$namespace\",kind=~\"Kustomization|HelmRelease\"}[5m]) >0 ) by (kind)",
"interval": "",
"legendFormat": "{{kind}}",
"range": true,
"refId": "A"
}
],
"title": "Reconciler ops avg. duration",
"title": "Reconciler ops avg. duration [5m]",
"type": "bargauge"
},
{
"datasource": "${DS_PROMETHEUS}",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"description": "",
"fieldConfig": {
"defaults": {
Expand Down Expand Up @@ -409,6 +426,7 @@
"displayMode": "gradient",
"minVizHeight": 10,
"minVizWidth": 0,
"namePlacement": "auto",
"orientation": "horizontal",
"reduceOptions": {
"calcs": [
Expand All @@ -421,17 +439,23 @@
"text": {},
"valueMode": "color"
},
"pluginVersion": "10.0.3",
"pluginVersion": "10.2.2",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"exemplar": true,
"expr": "sum(rate(gotk_reconcile_duration_seconds_sum{namespace=~\"$operator_namespace\",exported_namespace=~\"$namespace\",kind=~\"GitRepository|HelmRepository|Bucket|OCIRepository\"}[5m])) by (kind)\n/\n sum(rate(gotk_reconcile_duration_seconds_count{namespace=~\"$operator_namespace\",exported_namespace=~\"$namespace\",kind=~\"GitRepository|HelmRepository|Bucket|OCIRepository\"}[5m])) by (kind)",
"expr": "sum(rate(gotk_reconcile_duration_seconds_sum{namespace=~\"$operator_namespace\",exported_namespace=~\"$namespace\",kind=~\"GitRepository|HelmRepository|Bucket|OCIRepository\"}[5m])) by (kind)\n/\n sum(rate(gotk_reconcile_duration_seconds_count{namespace=~\"$operator_namespace\",exported_namespace=~\"$namespace\",kind=~\"GitRepository|HelmRepository|Bucket|OCIRepository\"}[5m])>0) by (kind)",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't the "Cluster reconciliation duration" and "Source acquisition duration" panels below also be updated likewise?

"interval": "",
"legendFormat": "{{kind}}",
"range": true,
"refId": "A"
}
],
"title": "Source ops avg. duration",
"title": "Source ops avg. duration [5m]",
"type": "bargauge"
},
{
Expand Down Expand Up @@ -534,12 +558,12 @@
}
]
},
"pluginVersion": "10.0.3",
"pluginVersion": "10.2.2",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"exemplar": true,
Expand Down Expand Up @@ -732,12 +756,12 @@
}
]
},
"pluginVersion": "10.0.3",
"pluginVersion": "10.2.2",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"exemplar": true,
Expand Down Expand Up @@ -895,12 +919,12 @@
}
]
},
"pluginVersion": "10.1.0",
"pluginVersion": "10.2.2",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"exemplar": true,
Expand Down Expand Up @@ -997,14 +1021,18 @@
"type": "row"
},
{
"datasource": "${DS_PROMETHEUS}",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"description": "",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
Expand All @@ -1018,6 +1046,7 @@
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
Expand Down Expand Up @@ -1122,14 +1151,21 @@
"hide": false,
"interval": "",
"legendFormat": "{{kind}}/{{name}}",
"refId": "B"
"refId": "B",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
}
}
],
"title": "Cluster reconciliation duration",
"type": "timeseries"
},
{
"datasource": "${DS_PROMETHEUS}",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"description": "",
"fieldConfig": {
"defaults": {
Expand Down Expand Up @@ -1171,8 +1207,7 @@
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
"color": "green"
},
{
"color": "red",
Expand Down Expand Up @@ -1254,7 +1289,11 @@
"hide": false,
"interval": "",
"legendFormat": "{{kind}}/{{name}}",
"refId": "B"
"refId": "B",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
}
}
],
"title": "Source acquisition duration",
Expand All @@ -1263,23 +1302,14 @@
],
"refresh": "30s",
"schemaVersion": 38,
"style": "light",
"tags": [
"flux"
],
"templating": {
"list": [
{
"allValue": "",
"current": {
"selected": true,
"text": [
"All"
],
"value": [
"$__all"
]
},
"current": {},
"datasource": {
"type": "prometheus",
"uid": "$DS_PROMETHEUS"
Expand All @@ -1305,15 +1335,7 @@
"useTags": false
},
{
"current": {
"selected": true,
"text": [
"All"
],
"value": [
"$__all"
]
},
"current": {},
"datasource": {
"type": "prometheus",
"uid": "$DS_PROMETHEUS"
Expand Down Expand Up @@ -1342,7 +1364,7 @@
"current": {
"selected": false,
"text": "Prometheus",
"value": "Prometheus"
"value": "prometheus"
},
"hide": 0,
"includeAll": false,
Expand Down