From cda5a6a0e577e334b665656ed98d832228587e08 Mon Sep 17 00:00:00 2001 From: svenkataramanasam Date: Sun, 23 Feb 2025 00:43:16 -0500 Subject: [PATCH 1/2] Adding Graphana dashboard to cover the following metrics NumSnapshotDeletes - Number of snapshot delete request received from client NumSnapshotDeleted - Number of snapshot in SNAPSHOT_DELETED status in snapshotInfoTable in OMDB NumSnapshotPurges - Number of snapshot purged from snapshotInfoTable NumSnapshotCreates - Number of snapshot create request received from client NumSnapshotActive - Number of snapshot in SNAPSHOT_ACTIVE status in snapshotInfoTable in OMDB --- .../dashboards/Ozone - OM Snapshot.json | 551 ++++++++++++++++++ 1 file changed, 551 insertions(+) create mode 100644 hadoop-ozone/dist/src/main/compose/common/grafana/dashboards/Ozone - OM Snapshot.json diff --git a/hadoop-ozone/dist/src/main/compose/common/grafana/dashboards/Ozone - OM Snapshot.json b/hadoop-ozone/dist/src/main/compose/common/grafana/dashboards/Ozone - OM Snapshot.json new file mode 100644 index 000000000000..8bd9e1e4fba3 --- /dev/null +++ b/hadoop-ozone/dist/src/main/compose/common/grafana/dashboards/Ozone - OM Snapshot.json @@ -0,0 +1,551 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": 10, + "links": [], + "panels": [ + { + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 8, + "title": "Snapshot Active Metrics", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "bea0bb1j1v3eof" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "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 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 1 + }, + "id": 3, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "bea0bb1j1v3eof" + }, + "editorMode": "code", + "expr": "om_metrics_num_snapshot_active{instance=~\".*:9874\"}", + "instant": false, + "legendFormat": "OM {{instance}}", + "range": true, + "refId": "A" + } + ], + "title": "NumSnapshotActive", + "type": "timeseries" + }, + { + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 9 + }, + "id": 7, + "title": "Snapshot Create Metrics", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "bea0bb1j1v3eof" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "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 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 10 + }, + "id": 5, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "bea0bb1j1v3eof" + }, + "editorMode": "code", + "expr": "om_metrics_num_snapshot_creates{instance=~\".*:9874\"}", + "instant": false, + "legendFormat": "OM {{instance}}", + "range": true, + "refId": "A" + } + ], + "title": "NumSnapshotCreates", + "type": "timeseries" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 18 + }, + "id": 6, + "panels": [], + "title": "Snapshot Delete Metrics", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "bea0bb1j1v3eof" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "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 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 19 + }, + "id": 4, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "bea0bb1j1v3eof" + }, + "editorMode": "code", + "expr": "om_metrics_num_snapshot_purges{instance=~\".*9874\"}", + "instant": false, + "legendFormat": "OM {{instance}}", + "range": true, + "refId": "A" + } + ], + "title": "NumSnapshotPurges", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "bea0bb1j1v3eof" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "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 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 19 + }, + "id": 2, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "bea0bb1j1v3eof" + }, + "editorMode": "code", + "expr": "om_metrics_num_snapshot_deletes", + "instant": false, + "legendFormat": "OM {{instance}}", + "range": true, + "refId": "A" + } + ], + "title": "NumSnapshotDeletes", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "bea0bb1j1v3eof" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "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 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 27 + }, + "id": 1, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "bea0bb1j1v3eof" + }, + "editorMode": "code", + "exemplar": false, + "expr": "om_metrics_num_snapshot_deleted{instance=~\".*:9874\"}", + "instant": false, + "legendFormat": "OM {{instance}}", + "range": true, + "refId": "A" + } + ], + "title": "NumSnapshotDeleted", + "type": "timeseries" + } + ], + "schemaVersion": 39, + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-15m", + "to": "now" + }, + "timepicker": {}, + "timezone": "browser", + "title": "Test", + "uid": "aedw8g8jvx4hsf", + "version": 17, + "weekStart": "" +} \ No newline at end of file From 51dd61c07b66f7ceb0a25bfb648ad02dbe99edae Mon Sep 17 00:00:00 2001 From: svenkataramanasam Date: Wed, 26 Feb 2025 13:33:57 -0500 Subject: [PATCH 2/2] 1. Removed the uid field 2. Changed the title from Test to "Ozone - OM Snapshot Metrics" --- .../dashboards/Ozone - OM Snapshot.json | 38 +++++++------------ 1 file changed, 13 insertions(+), 25 deletions(-) diff --git a/hadoop-ozone/dist/src/main/compose/common/grafana/dashboards/Ozone - OM Snapshot.json b/hadoop-ozone/dist/src/main/compose/common/grafana/dashboards/Ozone - OM Snapshot.json index 8bd9e1e4fba3..3bca5e903af5 100644 --- a/hadoop-ozone/dist/src/main/compose/common/grafana/dashboards/Ozone - OM Snapshot.json +++ b/hadoop-ozone/dist/src/main/compose/common/grafana/dashboards/Ozone - OM Snapshot.json @@ -4,8 +4,7 @@ { "builtIn": 1, "datasource": { - "type": "grafana", - "uid": "-- Grafana --" + "type": "grafana" }, "enable": true, "hide": true, @@ -34,8 +33,7 @@ }, { "datasource": { - "type": "prometheus", - "uid": "bea0bb1j1v3eof" + "type": "prometheus" }, "fieldConfig": { "defaults": { @@ -113,8 +111,7 @@ "targets": [ { "datasource": { - "type": "prometheus", - "uid": "bea0bb1j1v3eof" + "type": "prometheus" }, "editorMode": "code", "expr": "om_metrics_num_snapshot_active{instance=~\".*:9874\"}", @@ -140,8 +137,7 @@ }, { "datasource": { - "type": "prometheus", - "uid": "bea0bb1j1v3eof" + "type": "prometheus" }, "fieldConfig": { "defaults": { @@ -219,8 +215,7 @@ "targets": [ { "datasource": { - "type": "prometheus", - "uid": "bea0bb1j1v3eof" + "type": "prometheus" }, "editorMode": "code", "expr": "om_metrics_num_snapshot_creates{instance=~\".*:9874\"}", @@ -248,8 +243,7 @@ }, { "datasource": { - "type": "prometheus", - "uid": "bea0bb1j1v3eof" + "type": "prometheus" }, "fieldConfig": { "defaults": { @@ -327,8 +321,7 @@ "targets": [ { "datasource": { - "type": "prometheus", - "uid": "bea0bb1j1v3eof" + "type": "prometheus" }, "editorMode": "code", "expr": "om_metrics_num_snapshot_purges{instance=~\".*9874\"}", @@ -343,8 +336,7 @@ }, { "datasource": { - "type": "prometheus", - "uid": "bea0bb1j1v3eof" + "type": "prometheus" }, "fieldConfig": { "defaults": { @@ -422,8 +414,7 @@ "targets": [ { "datasource": { - "type": "prometheus", - "uid": "bea0bb1j1v3eof" + "type": "prometheus" }, "editorMode": "code", "expr": "om_metrics_num_snapshot_deletes", @@ -438,8 +429,7 @@ }, { "datasource": { - "type": "prometheus", - "uid": "bea0bb1j1v3eof" + "type": "prometheus" }, "fieldConfig": { "defaults": { @@ -517,8 +507,7 @@ "targets": [ { "datasource": { - "type": "prometheus", - "uid": "bea0bb1j1v3eof" + "type": "prometheus" }, "editorMode": "code", "exemplar": false, @@ -544,8 +533,7 @@ }, "timepicker": {}, "timezone": "browser", - "title": "Test", - "uid": "aedw8g8jvx4hsf", - "version": 17, + "title": "Ozone - OM Snapshot Metrics", + "version": 19, "weekStart": "" } \ No newline at end of file