From 26f84f52e5b7f9cf8195c46aa4f82b3e36e32147 Mon Sep 17 00:00:00 2001 From: dmaiocchi Date: Thu, 3 Dec 2020 15:02:20 +0100 Subject: [PATCH 1/4] New dashboard for tuning (1/2) --- .../grafana/dashboards/tuning.json | 269 ++++-------------- 1 file changed, 60 insertions(+), 209 deletions(-) diff --git a/salt/monitoring_srv/grafana/dashboards/tuning.json b/salt/monitoring_srv/grafana/dashboards/tuning.json index d4e488b10..5e68ef372 100644 --- a/salt/monitoring_srv/grafana/dashboards/tuning.json +++ b/salt/monitoring_srv/grafana/dashboards/tuning.json @@ -16,93 +16,9 @@ "gnetId": null, "graphTooltip": 0, "id": 6, - "iteration": 1605698565793, + "iteration": 1606995630740, "links": [], "panels": [ - { - "datasource": null, - "fieldConfig": { - "defaults": { - "custom": { - "align": null, - "displayMode": "color-background", - "filterable": false - }, - "mappings": [], - "thresholds": { - "mode": "percentage", - "steps": [ - { - "color": "dark-green", - "value": null - }, - { - "color": "dark-blue", - "value": 1 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 12, - "w": 10, - "x": 0, - "y": 0 - }, - "id": 6, - "links": [ - { - "targetBlank": true, - "title": "SAP NOTES", - "url": "https://support.sap.com/en/index.html" - } - ], - "options": { - "showHeader": true, - "sortBy": [ - { - "desc": false, - "displayName": "Enabled" - } - ] - }, - "pluginVersion": "7.3.1", - "targets": [ - { - "expr": "saptune_note_enabled", - "interval": "", - "legendFormat": "{{ noteName }}", - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Saptune notes enabled", - "transformations": [ - { - "id": "reduce", - "options": { - "reducers": [ - "last" - ] - } - }, - { - "id": "organize", - "options": { - "excludeByName": {}, - "indexByName": {}, - "renameByName": { - "Field": "Saptune note ID ", - "Last": "Enabled" - } - } - } - ], - "type": "table" - }, { "datasource": "Prometheus", "fieldConfig": { @@ -130,7 +46,7 @@ "value": null }, { - "color": "dark-blue", + "color": "rgba(255, 255, 255, 0.87)", "value": 0 }, { @@ -144,22 +60,32 @@ }, "gridPos": { "h": 4, - "w": 14, - "x": 10, + "w": 24, + "x": 0, "y": 0 }, "id": 4, "options": { - "frameIndex": 0, + "frameIndex": 1, "showHeader": true, "sortBy": [] }, "pluginVersion": "7.3.1", "targets": [ + { + "expr": "node_uname_info", + "format": "table", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + }, { "expr": "saptune_solution_enabled", + "format": "table", + "instant": true, "interval": "", - "legendFormat": "{{ solutionName}}", + "legendFormat": "", "refId": "C" } ], @@ -171,17 +97,16 @@ "id": "filterFieldsByName", "options": { "include": { - "names": [] + "names": [ + "nodename", + "solution_name" + ] } } }, { - "id": "reduce", - "options": { - "reducers": [ - "lastNotNull" - ] - } + "id": "concatenate", + "options": {} }, { "id": "organize", @@ -189,8 +114,8 @@ "excludeByName": {}, "indexByName": {}, "renameByName": { - "Field": "Solution Name", - "Last (not null)": "Status" + "nodename": "HOST", + "solution_name": "CURRENT PROFILE" } } } @@ -198,9 +123,12 @@ "type": "table" }, { - "datasource": "Prometheus", + "datasource": null, "fieldConfig": { "defaults": { + "color": { + "mode": "thresholds" + }, "custom": { "align": null, "displayMode": "color-background", @@ -210,7 +138,7 @@ { "from": "", "id": 1, - "text": "Compliant", + "text": "Applied", "to": "", "type": 1, "value": "1" @@ -220,11 +148,11 @@ "mode": "absolute", "steps": [ { - "color": "green", + "color": "dark-green", "value": null }, { - "color": "dark-blue", + "color": "rgb(255, 255, 255)", "value": 0 }, { @@ -237,38 +165,45 @@ "overrides": [] }, "gridPos": { - "h": 3, - "w": 14, - "x": 10, + "h": 17, + "w": 24, + "x": 0, "y": 4 }, - "id": 9, + "id": 6, + "links": [ + { + "targetBlank": true, + "title": "SAP NOTES", + "url": "https://support.sap.com/en/index.html" + } + ], "options": { - "frameIndex": 0, "showHeader": true, "sortBy": [] }, "pluginVersion": "7.3.1", "targets": [ { - "expr": "saptune_solution_compliant", + "expr": "saptune_note_enabled", + "format": "time_series", + "instant": false, "interval": "", - "legendFormat": "{{ solutionName}}", + "legendFormat": "{{note_id}} - {{note_desc}}", "refId": "A" + }, + { + "expr": "node_uname_info", + "format": "time_series", + "interval": "", + "legendFormat": "", + "refId": "B" } ], "timeFrom": null, "timeShift": null, - "title": "Saptune solution compliant", + "title": "SAP NOTE", "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [] - } - } - }, { "id": "reduce", "options": { @@ -283,102 +218,17 @@ "excludeByName": {}, "indexByName": {}, "renameByName": { - "Field": "Solution name", - "Last (not null)": "Compliant" - } - } - } - ], - "type": "table" - }, - { - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "custom": { - "align": null, - "displayMode": "color-background", - "filterable": false - }, - "mappings": [ - { - "from": "", - "id": 0, - "text": "", - "to": "", - "type": 1 + "Field": "Saptune note ID ", + "Last": "Enabled", + "Last (not null)": "Status" } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "dark-green", - "value": 2 - } - ] } }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Value" - }, - "properties": [ - { - "id": "custom.width", - "value": 929 - } - ] - } - ] - }, - "gridPos": { - "h": 5, - "w": 14, - "x": 10, - "y": 7 - }, - "id": 2, - "options": { - "showHeader": true, - "sortBy": [ - { - "desc": false, - "displayName": "instance" - } - ] - }, - "pluginVersion": "7.3.1", - "repeat": "node", - "repeatDirection": "v", - "targets": [ - { - "expr": "saptune_meta_version\n", - "format": "table", - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "saptune version", - "transformations": [ { "id": "filterFieldsByName", "options": { "include": { - "names": [ - "Value", - "instance" - ] + "pattern": "" } } } @@ -386,6 +236,7 @@ "type": "table" } ], + "refresh": false, "schemaVersion": 26, "style": "dark", "tags": [], @@ -434,5 +285,5 @@ "timezone": "", "title": "Tuning", "uid": "HzFepKtMz", - "version": 4 + "version": 9 } From c9fa54153322a2a7e3f12d29eb0ed6eee9f2db5c Mon Sep 17 00:00:00 2001 From: dmaiocchi Date: Mon, 7 Dec 2020 14:46:02 +0100 Subject: [PATCH 2/4] Add HOSTNAME joint query --- .../grafana/dashboards/tuning.json | 120 +++++++++--------- 1 file changed, 57 insertions(+), 63 deletions(-) diff --git a/salt/monitoring_srv/grafana/dashboards/tuning.json b/salt/monitoring_srv/grafana/dashboards/tuning.json index 5e68ef372..462d244c4 100644 --- a/salt/monitoring_srv/grafana/dashboards/tuning.json +++ b/salt/monitoring_srv/grafana/dashboards/tuning.json @@ -16,7 +16,7 @@ "gnetId": null, "graphTooltip": 0, "id": 6, - "iteration": 1606995630740, + "iteration": 1607348370168, "links": [], "panels": [ { @@ -64,24 +64,21 @@ "x": 0, "y": 0 }, - "id": 4, + "id": 7, "options": { "frameIndex": 1, "showHeader": true, - "sortBy": [] + "sortBy": [ + { + "desc": true, + "displayName": "CURRENT PROFILE" + } + ] }, "pluginVersion": "7.3.1", "targets": [ { - "expr": "node_uname_info", - "format": "table", - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "A" - }, - { - "expr": "saptune_solution_enabled", + "expr": "label_replace(saptune_solution_enabled, \"instance\", \"$1\", \"instance\", \"([^:]*):.*\")\n* on (instance) group_left(nodename) label_replace(node_uname_info, \"instance\", \"$1\", \"instance\", \"([^:]*):.*\")", "format": "table", "instant": true, "interval": "", @@ -93,29 +90,19 @@ "timeShift": null, "title": "Saptune solution enabled", "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "nodename", - "solution_name" - ] - } - } - }, - { - "id": "concatenate", - "options": {} - }, { "id": "organize", "options": { - "excludeByName": {}, + "excludeByName": { + "Time": true, + "Value": true, + "instance": true, + "job": true + }, "indexByName": {}, "renameByName": { "nodename": "HOST", - "solution_name": "CURRENT PROFILE" + "solution_name": "Current Profile" } } } @@ -162,10 +149,35 @@ ] } }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "SAP NOTE DESC" + }, + "properties": [ + { + "id": "custom.width", + "value": 659 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "HOST" + }, + "properties": [ + { + "id": "custom.width", + "value": 316 + } + ] + } + ] }, "gridPos": { - "h": 17, + "h": 15, "w": 24, "x": 0, "y": 4 @@ -185,50 +197,32 @@ "pluginVersion": "7.3.1", "targets": [ { - "expr": "saptune_note_enabled", - "format": "time_series", - "instant": false, - "interval": "", - "legendFormat": "{{note_id}} - {{note_desc}}", - "refId": "A" - }, - { - "expr": "node_uname_info", - "format": "time_series", + "expr": "label_replace(saptune_note_enabled, \"instance\", \"$1\", \"instance\", \"([^:]*):.*\")\n* on (instance) group_left(nodename) label_replace(node_uname_info, \"instance\", \"$1\", \"instance\", \"([^:]*):.*\")", + "format": "table", + "instant": true, "interval": "", "legendFormat": "", - "refId": "B" + "refId": "A" } ], "timeFrom": null, "timeShift": null, "title": "SAP NOTE", "transformations": [ - { - "id": "reduce", - "options": { - "reducers": [ - "lastNotNull" - ] - } - }, { "id": "organize", "options": { - "excludeByName": {}, + "excludeByName": { + "Time": true, + "instance": true, + "job": true + }, "indexByName": {}, "renameByName": { - "Field": "Saptune note ID ", - "Last": "Enabled", - "Last (not null)": "Status" - } - } - }, - { - "id": "filterFieldsByName", - "options": { - "include": { - "pattern": "" + "Value": "STATUS", + "nodename": "HOST", + "note_desc": "SAP NOTE DESC", + "note_id": "SAP NOTE ID" } } } @@ -285,5 +279,5 @@ "timezone": "", "title": "Tuning", "uid": "HzFepKtMz", - "version": 9 + "version": 7 } From 1937b4a77ffa20b992fee99a1e18cb118ab32dd2 Mon Sep 17 00:00:00 2001 From: dmaiocchi Date: Thu, 10 Dec 2020 17:50:11 +0100 Subject: [PATCH 3/4] Fix some UI concerns --- .../grafana/dashboards/tuning.json | 75 ++++++++++++++----- 1 file changed, 58 insertions(+), 17 deletions(-) diff --git a/salt/monitoring_srv/grafana/dashboards/tuning.json b/salt/monitoring_srv/grafana/dashboards/tuning.json index 462d244c4..fed9e99e9 100644 --- a/salt/monitoring_srv/grafana/dashboards/tuning.json +++ b/salt/monitoring_srv/grafana/dashboards/tuning.json @@ -16,7 +16,7 @@ "gnetId": null, "graphTooltip": 0, "id": 6, - "iteration": 1607348370168, + "iteration": 1607618915268, "links": [], "panels": [ { @@ -101,7 +101,7 @@ }, "indexByName": {}, "renameByName": { - "nodename": "HOST", + "nodename": "Host", "solution_name": "Current Profile" } } @@ -114,12 +114,12 @@ "fieldConfig": { "defaults": { "color": { - "mode": "thresholds" + "mode": "palette-classic" }, "custom": { - "align": null, - "displayMode": "color-background", - "filterable": false + "align": "left", + "displayMode": "auto", + "filterable": true }, "mappings": [ { @@ -141,10 +141,6 @@ { "color": "rgb(255, 255, 255)", "value": 0 - }, - { - "color": "dark-green", - "value": 1 } ] } @@ -173,6 +169,42 @@ "value": 316 } ] + }, + { + "matcher": { + "id": "byName", + "options": "SAP Note ID" + }, + "properties": [ + { + "id": "custom.width", + "value": 183 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "SAP Note description" + }, + "properties": [ + { + "id": "custom.width", + "value": 996 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Host" + }, + "properties": [ + { + "id": "custom.width", + "value": 307 + } + ] } ] }, @@ -207,7 +239,7 @@ ], "timeFrom": null, "timeShift": null, - "title": "SAP NOTE", + "title": "SAP Note", "transformations": [ { "id": "organize", @@ -217,12 +249,21 @@ "instance": true, "job": true }, - "indexByName": {}, + "indexByName": { + "Time": 0, + "Value": 4, + "instance": 5, + "job": 6, + "nodename": 1, + "note_desc": 3, + "note_id": 2 + }, "renameByName": { - "Value": "STATUS", - "nodename": "HOST", - "note_desc": "SAP NOTE DESC", - "note_id": "SAP NOTE ID" + "Value": "Status", + "instance": "", + "nodename": "Host", + "note_desc": "SAP Note description", + "note_id": "SAP Note ID" } } } @@ -279,5 +320,5 @@ "timezone": "", "title": "Tuning", "uid": "HzFepKtMz", - "version": 7 + "version": 15 } From cace2c4687bc09498424ac13ede50c23feb070eb Mon Sep 17 00:00:00 2001 From: dmaiocchi Date: Fri, 11 Dec 2020 10:42:39 +0100 Subject: [PATCH 4/4] Update texts --- salt/monitoring_srv/grafana/dashboards/tuning.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/salt/monitoring_srv/grafana/dashboards/tuning.json b/salt/monitoring_srv/grafana/dashboards/tuning.json index fed9e99e9..897be7e49 100644 --- a/salt/monitoring_srv/grafana/dashboards/tuning.json +++ b/salt/monitoring_srv/grafana/dashboards/tuning.json @@ -16,7 +16,7 @@ "gnetId": null, "graphTooltip": 0, "id": 6, - "iteration": 1607618915268, + "iteration": 1607679721663, "links": [], "panels": [ { @@ -71,7 +71,7 @@ "sortBy": [ { "desc": true, - "displayName": "CURRENT PROFILE" + "displayName": "Current Profile" } ] }, @@ -88,7 +88,7 @@ ], "timeFrom": null, "timeShift": null, - "title": "Saptune solution enabled", + "title": "Applied profile", "transformations": [ { "id": "organize", @@ -102,7 +102,7 @@ "indexByName": {}, "renameByName": { "nodename": "Host", - "solution_name": "Current Profile" + "solution_name": "Profile" } } } @@ -239,7 +239,7 @@ ], "timeFrom": null, "timeShift": null, - "title": "SAP Note", + "title": "Applied SAP notes", "transformations": [ { "id": "organize", @@ -320,5 +320,5 @@ "timezone": "", "title": "Tuning", "uid": "HzFepKtMz", - "version": 15 + "version": 17 }