From ca57f61f96bc1a21f9d11814f5730c00d819e720 Mon Sep 17 00:00:00 2001 From: MoritzWeber Date: Thu, 6 Jun 2024 11:14:33 +0200 Subject: [PATCH] fix(monitoring): Filter out negative values Negative values indicate failured in the metrics collection. They produce unclear jumps in the time series and influence the min and mean values. In addition, the color of the mean value was wrong. This is fixed. --- helm/config/grafana/team4capella.json | 103 +++++++++++++++++++++++++- 1 file changed, 101 insertions(+), 2 deletions(-) diff --git a/helm/config/grafana/team4capella.json b/helm/config/grafana/team4capella.json index d6dec8073..84b0eb2ae 100644 --- a/helm/config/grafana/team4capella.json +++ b/helm/config/grafana/team4capella.json @@ -108,6 +108,24 @@ } ] } + }, + { + "id": "filterByValue", + "options": { + "filters": [ + { + "config": { + "id": "greaterOrEqual", + "options": { + "value": 0 + } + }, + "fieldName": "max(used_t4c_licenses)" + } + ], + "match": "any", + "type": "include" + } } ], "type": "stat" @@ -121,7 +139,7 @@ "fieldConfig": { "defaults": { "color": { - "mode": "continuous-RdYlGr" + "mode": "continuous-GrYlRd" }, "mappings": [], "min": 0, @@ -178,7 +196,7 @@ "type": "prometheus", "uid": "PBFA97CFB590B2093" }, - "editorMode": "builder", + "editorMode": "code", "expr": "max(total_t4c_licenses)", "hide": false, "instant": false, @@ -199,6 +217,24 @@ } ] } + }, + { + "id": "filterByValue", + "options": { + "filters": [ + { + "config": { + "id": "greaterOrEqual", + "options": { + "value": 0 + } + }, + "fieldName": "max(used_t4c_licenses)" + } + ], + "match": "any", + "type": "include" + } } ], "type": "stat" @@ -289,6 +325,24 @@ } ] } + }, + { + "id": "filterByValue", + "options": { + "filters": [ + { + "config": { + "id": "greaterOrEqual", + "options": { + "value": 0 + } + }, + "fieldName": "max(used_t4c_licenses)" + } + ], + "match": "any", + "type": "include" + } } ], "type": "stat" @@ -378,6 +432,24 @@ } ] } + }, + { + "id": "filterByValue", + "options": { + "filters": [ + { + "config": { + "id": "greaterOrEqual", + "options": { + "value": 0 + } + }, + "fieldName": "max(total_t4c_licenses)" + } + ], + "match": "any", + "type": "include" + } } ], "type": "stat" @@ -518,6 +590,33 @@ } ] } + }, + { + "id": "filterByValue", + "options": { + "filters": [ + { + "config": { + "id": "greaterOrEqual", + "options": { + "value": 0 + } + }, + "fieldName": "Total licenses" + }, + { + "config": { + "id": "greaterOrEqual", + "options": { + "value": 0 + } + }, + "fieldName": "Used licenses" + } + ], + "match": "any", + "type": "include" + } } ], "type": "timeseries"