From 57aa28688ca059e478f2ac801faa9eca2b9020f0 Mon Sep 17 00:00:00 2001 From: Dmytro Date: Fri, 14 Feb 2025 00:01:13 -0700 Subject: [PATCH] Add descriptions to the grafana dashboard --- .../custom-metrics-dashboard.json | 1875 +++++++++-------- 1 file changed, 994 insertions(+), 881 deletions(-) diff --git a/grafana/custom-metrics/custom-metrics-dashboard.json b/grafana/custom-metrics/custom-metrics-dashboard.json index 1594222..112013a 100644 --- a/grafana/custom-metrics/custom-metrics-dashboard.json +++ b/grafana/custom-metrics/custom-metrics-dashboard.json @@ -9,19 +9,47 @@ "pluginName": "Prometheus" } ], + "__elements": {}, "__requires": [ + { + "type": "panel", + "id": "gauge", + "name": "Gauge", + "version": "" + }, + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "10.0.3" + }, { "type": "datasource", "id": "prometheus", "name": "Prometheus", "version": "1.0.0" + }, + { + "type": "panel", + "id": "state-timeline", + "name": "State timeline", + "version": "" + }, + { + "type": "panel", + "id": "timeseries", + "name": "Time series", + "version": "" } ], "annotations": { "list": [ { "builtIn": 1, - "datasource": "-- Grafana --", + "datasource": { + "type": "datasource", + "uid": "grafana" + }, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", @@ -38,974 +66,1057 @@ }, "editable": true, "fiscalYearStartMonth": 0, - "graphTooltip": 0, + "graphTooltip": 1, + "id": null, "links": [], "liveNow": false, "panels": [ { - "datasource": "${DS_PROMETHEUS}", - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 12, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "scheme", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "smooth", - "lineWidth": 3, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" + "description": "This is what Shard Managers were able to discover. This is what would be used by all autoscaler components as input.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "scheme", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "none" }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 1 + }, + "id": 1, + "interval": "1m", + "links": [], + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true }, - "thresholdsStyle": { - "mode": "off" + "tooltip": { + "mode": "single", + "sort": "none" } }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null + "pluginVersion": "8.4.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "number" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 24 - }, - "interval": "1m", - "links": [], - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom" + "editorMode": "code", + "exemplar": true, + "expr": "sum(argocd_autoscaler_shard_manager_discovered_shards) by (shard_manager_type,shard_manager_ref)", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{shard_manager_ref}} ({{shard_manager_type}})", + "range": true, + "refId": "A", + "step": 10 + } + ], + "title": "Discovered Shards", + "type": "timeseries" }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.4.3", - "targets": [ { - "datasource": "${DS_PROMETHEUS}", - "exemplar": true, - "expr": "sum(argocd_autoscaler_shard_manager_discovered_shards) by (shard_manager_type,shard_manager_ref)", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "refId": "A", - "step": 10 - } - ], - "title": "argocd_autoscaler_shard_manager_discovered_shards (gauge)", - "type": "timeseries" - }, - - { - "datasource": "${DS_PROMETHEUS}", - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "scheme", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "smooth", - "lineWidth": 3, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" + "description": "This is Load Index per each discovered shard.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "scheme", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "none" }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 1 + }, + "id": 4, + "interval": "1m", + "links": [], + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false }, - "thresholdsStyle": { - "mode": "off" + "tooltip": { + "mode": "single", + "sort": "none" } }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null + "pluginVersion": "8.4.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "number" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 24 - }, - "interval": "1m", - "links": [], - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom" + "editorMode": "code", + "exemplar": true, + "expr": "sum(argocd_autoscaler_load_index_values) by (load_index_type,load_index_ref,shard_name)", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{load_index_ref}} ({{load_index_type}}): {{shard_name}}", + "range": true, + "refId": "A", + "step": 10 + } + ], + "title": "Load Index", + "type": "timeseries" }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.4.3", - "targets": [ { - "datasource": "${DS_PROMETHEUS}", - "exemplar": true, - "expr": "sum(argocd_autoscaler_poll_values) by (poll_type,poll_ref,shard_name,metric_id)", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "refId": "A", - "step": 10 - } - ], - "title": "argocd_autoscaler_poll_values (gauge)", - "type": "timeseries" - }, - - { - "datasource": "${DS_PROMETHEUS}", - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "scheme", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "smooth", - "lineWidth": 3, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" + "description": "These are values of metrics polled as-is with no modifications. Looking at this might be useful if you are trying to troubleshoot your poller configuration.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "scheme", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "none" }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 10 + }, + "id": 2, + "interval": "1m", + "links": [], + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false }, - "thresholdsStyle": { - "mode": "off" + "tooltip": { + "mode": "single", + "sort": "none" } }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null + "pluginVersion": "8.4.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "number" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 24 - }, - "interval": "1m", - "links": [], - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom" + "editorMode": "code", + "exemplar": true, + "expr": "sum(argocd_autoscaler_poll_values) by (poll_type,poll_ref,shard_name,metric_id)", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{poll_ref}} ({{poll_type}}): {{shard_name}}/{{metric_id}}", + "range": true, + "refId": "A", + "step": 10 + } + ], + "title": "Polled Values", + "type": "timeseries" }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.4.3", - "targets": [ { - "datasource": "${DS_PROMETHEUS}", - "exemplar": true, - "expr": "sum(argocd_autoscaler_normalizer_values) by (normalizer_type,normalizer_ref,shard_name,metric_id)", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "refId": "A", - "step": 10 - } - ], - "title": "argocd_autoscaler_normalizer_values (gauge)", - "type": "timeseries" - }, - - { - "datasource": "${DS_PROMETHEUS}", - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "scheme", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "smooth", - "lineWidth": 3, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" + "description": "This is all polled metrics with their normalized values. You may want to looks at this to determine weights and when you are trying to understand what metric contributes most to the load index.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "scheme", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "none" }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 10 + }, + "id": 3, + "interval": "1m", + "links": [], + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false }, - "thresholdsStyle": { - "mode": "off" + "tooltip": { + "mode": "single", + "sort": "none" } }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null + "pluginVersion": "8.4.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "number" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 24 - }, - "interval": "1m", - "links": [], - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.4.3", - "targets": [ - { - "datasource": "${DS_PROMETHEUS}", - "exemplar": true, - "expr": "sum(argocd_autoscaler_load_index_values) by (load_index_type,load_index_ref,shard_name)", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "refId": "A", - "step": 10 + "editorMode": "code", + "exemplar": true, + "expr": "sum(argocd_autoscaler_normalizer_values) by (normalizer_type,normalizer_ref,shard_name,metric_id)", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{normalizer_ref}} ({{normalizer_type}}): {{shard_name}}/{{metric_id}}", + "range": true, + "refId": "A", + "step": 10 + } + ], + "title": "Normalized Values", + "type": "timeseries" } ], - "title": "argocd_autoscaler_load_index_values (gauge)", - "type": "timeseries" + "title": "Polling", + "type": "row" }, - { - "datasource": "${DS_PROMETHEUS}", - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 1 + }, + "id": 13, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "scheme", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "smooth", - "lineWidth": 3, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" + "description": "This shows how partitioner calculates shards distribution at the moment in time. This is just for the reference of what historical values were, and does not represent actual distribution, which is yet to go via evaluation and scaler.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "custom": { + "fillOpacity": 70, + "lineWidth": 0, + "spanNulls": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "none" }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" + "overrides": [] + }, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 2 + }, + "id": 5, + "interval": "1m", + "links": [], + "options": { + "alignValue": "center", + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": false }, - "thresholdsStyle": { - "mode": "off" + "mergeValues": true, + "rowHeight": 0.9, + "showValue": "always", + "tooltip": { + "mode": "single", + "sort": "none" } }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null + "pluginVersion": "10.0.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "number" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 24 - }, - "interval": "1m", - "links": [], - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom" + "editorMode": "code", + "exemplar": true, + "expr": "sum(argocd_autoscaler_partition_shards) by (partition_type,partition_ref,replica_id)", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{partition_ref}} ({{partition_type}}): {{replica_id}}", + "range": true, + "refId": "A", + "step": 10 + } + ], + "title": "Partitioning (partitioner)", + "type": "state-timeline" }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.4.3", - "targets": [ { - "datasource": "${DS_PROMETHEUS}", - "exemplar": true, - "expr": "sum(argocd_autoscaler_partition_shards) by (partition_type,partition_ref,replica_id)", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "refId": "A", - "step": 10 - } - ], - "title": "argocd_autoscaler_partition_shards (gauge)", - "type": "timeseries" - }, - - { - "datasource": "${DS_PROMETHEUS}", - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "scheme", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "smooth", - "lineWidth": 3, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" + "description": "This is shards distribution as it would be applied if applied at this moment in time. I.e. if stabilization period was 0 - this is what evaluator would do.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "custom": { + "fillOpacity": 70, + "lineWidth": 0, + "spanNulls": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "none" }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" + "overrides": [] + }, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 2 + }, + "id": 7, + "interval": "1m", + "links": [], + "options": { + "alignValue": "center", + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": false }, - "thresholdsStyle": { - "mode": "off" + "mergeValues": true, + "rowHeight": 0.9, + "showValue": "always", + "tooltip": { + "mode": "single", + "sort": "none" } }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null + "pluginVersion": "8.4.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "number" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 24 - }, - "interval": "1m", - "links": [], - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom" + "editorMode": "code", + "exemplar": true, + "expr": "sum(argocd_autoscaler_evaluation_projected_shards) by (evaluation_type,evaluation_ref,replica_id)", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{evaluation_ref}} ({{evaluation_type}}): {{replica_id}}", + "range": true, + "refId": "A", + "step": 10 + } + ], + "title": "Partitioning (projected)", + "type": "state-timeline" }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.4.3", - "targets": [ { - "datasource": "${DS_PROMETHEUS}", - "exemplar": true, - "expr": "sum(argocd_autoscaler_partition_replicas_total_load) by (partition_type,partition_ref,replica_id)", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "refId": "A", - "step": 10 - } - ], - "title": "argocd_autoscaler_partition_replicas_total_load (gauge)", - "type": "timeseries" - }, - - { - "datasource": "${DS_PROMETHEUS}", - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "scheme", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "smooth", - "lineWidth": 3, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" + "description": "This represents partition as it was last applied. Look at this to understand when and what changes are done to the shard assignments. This will only be changing when evaluator approves a new partitioning.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "custom": { + "fillOpacity": 70, + "lineWidth": 0, + "spanNulls": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "none" }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" + "overrides": [] + }, + "gridPos": { + "h": 12, + "w": 24, + "x": 0, + "y": 12 + }, + "id": 9, + "interval": "1m", + "links": [], + "options": { + "alignValue": "center", + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": false }, - "thresholdsStyle": { - "mode": "off" + "mergeValues": true, + "rowHeight": 0.9, + "showValue": "always", + "tooltip": { + "mode": "single", + "sort": "none" } }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null + "pluginVersion": "8.4.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "number" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 24 - }, - "interval": "1m", - "links": [], - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.4.3", - "targets": [ - { - "datasource": "${DS_PROMETHEUS}", - "exemplar": true, - "expr": "sum(argocd_autoscaler_evaluation_projected_shards) by (evaluation_type,evaluation_ref,replica_id)", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "refId": "A", - "step": 10 + "editorMode": "code", + "exemplar": true, + "expr": "sum(argocd_autoscaler_evaluation_shards) by (evaluation_type,evaluation_ref,replica_id)", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{evaluation_ref}} ({{evaluation_type}}): {{replica_id}}", + "range": true, + "refId": "A", + "step": 10 + } + ], + "title": "Partitioning (applied)", + "type": "state-timeline" } ], - "title": "argocd_autoscaler_evaluation_projected_shards (gauge)", - "type": "timeseries" + "title": "Partitioning", + "type": "row" }, - { - "datasource": "${DS_PROMETHEUS}", - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 2 + }, + "id": 14, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "scheme", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "smooth", - "lineWidth": 3, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" + "description": "This shows total load per replica (sum of loads of all shards) as per the partitioner current output in the moment in time. This is just for the reference of what historical values were, and does not represent actual loads, which is yet to go via evaluation and scaler.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "scheme", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" + "overrides": [] + }, + "gridPos": { + "h": 11, + "w": 12, + "x": 0, + "y": 25 + }, + "id": 6, + "interval": "1m", + "links": [], + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false }, - "thresholdsStyle": { - "mode": "off" + "tooltip": { + "mode": "single", + "sort": "none" } }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null + "pluginVersion": "8.4.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "number" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 24 - }, - "interval": "1m", - "links": [], - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom" + "editorMode": "code", + "exemplar": true, + "expr": "sum(argocd_autoscaler_partition_replicas_total_load) by (partition_type,partition_ref,replica_id)", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{partition_ref}} ({{partition_type}}): {{replica_id}}", + "range": true, + "refId": "A", + "step": 10 + } + ], + "title": "Total Load per Replica (partitioner)", + "type": "timeseries" }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.4.3", - "targets": [ { - "datasource": "${DS_PROMETHEUS}", - "exemplar": true, - "expr": "sum(argocd_autoscaler_evaluation_projected_replicas_total_load) by (evaluation_type,evaluation_ref,replica_id)", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "refId": "A", - "step": 10 - } - ], - "title": "argocd_autoscaler_evaluation_projected_replicas_total_load (gauge)", - "type": "timeseries" - }, - - { - "datasource": "${DS_PROMETHEUS}", - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "scheme", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "smooth", - "lineWidth": 3, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" + "description": "This is total load per replica as if partitioning would have been applied at this moment in time. I.e. if stabilization period was 0 - this is what evaluator would do.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "scheme", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" + "overrides": [] + }, + "gridPos": { + "h": 11, + "w": 12, + "x": 12, + "y": 25 + }, + "id": 8, + "interval": "1m", + "links": [], + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false }, - "thresholdsStyle": { - "mode": "off" + "tooltip": { + "mode": "single", + "sort": "none" } }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null + "pluginVersion": "8.4.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "number" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 24 - }, - "interval": "1m", - "links": [], - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom" + "editorMode": "code", + "exemplar": true, + "expr": "sum(argocd_autoscaler_evaluation_projected_replicas_total_load) by (evaluation_type,evaluation_ref,replica_id)", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{evaluation_ref}} ({{evaluation_type}}): {{replica_id}}", + "range": true, + "refId": "A", + "step": 10 + } + ], + "title": "Total Load per Replica (projected)", + "type": "timeseries" }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.4.3", - "targets": [ { - "datasource": "${DS_PROMETHEUS}", - "exemplar": true, - "expr": "sum(argocd_autoscaler_evaluation_shards) by (evaluation_type,evaluation_ref,replica_id)", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "refId": "A", - "step": 10 - } - ], - "title": "argocd_autoscaler_evaluation_shards (gauge)", - "type": "timeseries" - }, - - { - "datasource": "${DS_PROMETHEUS}", - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "scheme", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "smooth", - "lineWidth": 3, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" + "description": "This represents total load per replica as per partitioning as it was last applied. Look at this to understand when and what changes are done to the shard assignments. This will only be changing when evaluator approves a new partitioning.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "scheme", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "none" }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" + "overrides": [] + }, + "gridPos": { + "h": 12, + "w": 17, + "x": 0, + "y": 36 + }, + "id": 10, + "interval": "1m", + "links": [], + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false }, - "thresholdsStyle": { - "mode": "off" + "tooltip": { + "mode": "single", + "sort": "none" } }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null + "pluginVersion": "8.4.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "number" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 24 - }, - "interval": "1m", - "links": [], - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom" + "editorMode": "code", + "exemplar": true, + "expr": "sum(argocd_autoscaler_evaluation_replicas_total_load) by (evaluation_type,evaluation_ref,replica_id)", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{evaluation_ref}} ({{evaluation_type}}): {{replica_id}}", + "range": true, + "refId": "A", + "step": 10 + } + ], + "title": "Total Load per Replica (applied)", + "type": "timeseries" }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.4.3", - "targets": [ { - "datasource": "${DS_PROMETHEUS}", - "exemplar": true, - "expr": "sum(argocd_autoscaler_evaluation_replicas_total_load) by (evaluation_type,evaluation_ref,replica_id)", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "refId": "A", - "step": 10 - } - ], - "title": "argocd_autoscaler_evaluation_replicas_total_load (gauge)", - "type": "timeseries" - }, - - { - "datasource": "${DS_PROMETHEUS}", - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "scheme", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "smooth", - "lineWidth": 3, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" + "description": "This shows how many changes scaler applied to the replica set controller.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "none" }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" + "overrides": [] + }, + "gridPos": { + "h": 12, + "w": 7, + "x": 17, + "y": 36 + }, + "id": 11, + "interval": "1m", + "links": [], + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false }, - "thresholdsStyle": { - "mode": "off" - } + "showThresholdLabels": false, + "showThresholdMarkers": true }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null + "pluginVersion": "10.0.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "number" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 24 - }, - "interval": "1m", - "links": [], - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.4.3", - "targets": [ - { - "datasource": "${DS_PROMETHEUS}", - "exemplar": true, - "expr": "sum(argocd_autoscaler_scaler_replica_set_changes_total) by (scaler_type,scaler_ref,replica_set_controller_kind,replica_set_controller_ref)", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "refId": "A", - "step": 10 + "editorMode": "code", + "exemplar": true, + "expr": "sum(argocd_autoscaler_scaler_replica_set_changes_total) by (scaler_type,scaler_ref,replica_set_controller_kind,replica_set_controller_ref)", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{scaler_ref}} ({{scaler_type}}): {{replica_set_controller_ref}} ({{replica_set_controller_type}})", + "range": true, + "refId": "A", + "step": 10 + } + ], + "title": "Changes", + "type": "gauge" } ], - "title": "argocd_autoscaler_scaler_replica_set_changes_total (counter)", - "type": "timeseries" + "title": "Load Distribution", + "type": "row" } ], "refresh": "", + "schemaVersion": 38, "style": "dark", "tags": [], "templating": { "list": [ { - "datasource": "${DS_PROMETHEUS}", + "allFormat": "glob", + "current": {}, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, "definition": "label_values(controller_runtime_reconcile_total{namespace=~\"$namespace\"}, job)", "hide": 0, "includeAll": false, @@ -1023,21 +1134,21 @@ "type": "query" }, { - "current": { - "selected": false, - "text": "observability", - "value": "observability" + "allFormat": "glob", + "current": {}, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - "datasource": "${DS_PROMETHEUS}", - "definition": "label_values(controller_runtime_reconcile_total, namespace)", + "definition": "label_values(controller_runtime_reconcile_total,namespace)", "hide": 0, "includeAll": false, "multi": false, "name": "namespace", "options": [], "query": { - "query": "label_values(controller_runtime_reconcile_total, namespace)", - "refId": "StandardVariableQuery" + "query": "label_values(controller_runtime_reconcile_total,namespace)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" }, "refresh": 1, "regex": "", @@ -1046,12 +1157,12 @@ "type": "query" }, { - "current": { - "selected": false, - "text": "All", - "value": "$__all" + "allFormat": "glob", + "current": {}, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - "datasource": "${DS_PROMETHEUS}", "definition": "label_values(controller_runtime_reconcile_total{namespace=~\"$namespace\", job=~\"$job\"}, pod)", "hide": 2, "includeAll": true, @@ -1072,11 +1183,13 @@ ] }, "time": { - "from": "now-15m", + "from": "now-30m", "to": "now" }, "timepicker": {}, "timezone": "", - "title": "Custom-Metrics", + "title": "ArgoCD Autoscaler", + "uid": "d2ff3315-40b7-449a-9024-8c32aa606a75", + "version": 8, "weekStart": "" }