From f44b24d89aca9e578f4b60474c3ebe90ea1b8cd0 Mon Sep 17 00:00:00 2001 From: Rambabu Bolla Date: Mon, 7 Oct 2024 04:20:31 +0000 Subject: [PATCH] Create a Grafana dashaboard for LIO metrics --- kubernetes/cray-sysmgmt-health/Chart.yaml | 2 +- .../dashboards_json/iscsi/iscsi.json | 351 ++++++++++++++++++ .../templates/grafana/configmap.yaml | 13 + 3 files changed, 365 insertions(+), 1 deletion(-) create mode 100644 kubernetes/cray-sysmgmt-health/dashboards_json/iscsi/iscsi.json diff --git a/kubernetes/cray-sysmgmt-health/Chart.yaml b/kubernetes/cray-sysmgmt-health/Chart.yaml index 7ba5131..5058194 100644 --- a/kubernetes/cray-sysmgmt-health/Chart.yaml +++ b/kubernetes/cray-sysmgmt-health/Chart.yaml @@ -23,7 +23,7 @@ # apiVersion: v2 name: cray-sysmgmt-health -version: 1.0.15 +version: 1.0.16 description: An extension of the official prometheus-operator helm chart for monitoring keywords: - sysmgmt-health diff --git a/kubernetes/cray-sysmgmt-health/dashboards_json/iscsi/iscsi.json b/kubernetes/cray-sysmgmt-health/dashboards_json/iscsi/iscsi.json new file mode 100644 index 0000000..9f703fa --- /dev/null +++ b/kubernetes/cray-sysmgmt-health/dashboards_json/iscsi/iscsi.json @@ -0,0 +1,351 @@ +{ + "__inputs": [ + { + "name": "DS_PROMETHEUS", + "label": "victorismetrics", + "description": "", + "type": "datasource", + "pluginId": "prometheus", + "pluginName": "Prometheus" + } + ], + "__elements": {}, + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "11.0.0" + }, + { + "type": "datasource", + "id": "prometheus", + "name": "Prometheus", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "timeseries", + "name": "Time series", + "version": "" + } + ], + "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": null, + "links": [], + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "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": 10, + "w": 12, + "x": 0, + "y": 0 + }, + "id": 2, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "maxHeight": 600, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "sum by (lun) (iscsi_read_rate {instance=\"$node:9100\", lun=~\"lun.*\"})", + "instant": false, + "legendFormat": "{{lun}}", + "range": true, + "refId": "A" + } + ], + "title": "Lun Read Rate", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "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": [ + { + "matcher": { + "id": "byName", + "options": "lun_3" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "semi-dark-purple", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 0 + }, + "id": 1, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "maxHeight": 600, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum by (instance) (iscsi_read_rate {instance=\"$node:9100\"})", + "format": "time_series", + "hide": false, + "instant": false, + "legendFormat": "$nodename", + "range": true, + "refId": "A" + } + ], + "title": "Aggregate Lun read rate", + "type": "timeseries" + } + ], + "schemaVersion": 39, + "tags": [], + "templating": { + "list": [ + { + "current": {}, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "definition": "label_values(node_uname_info,nodename)", + "hide": 0, + "includeAll": false, + "label": "nodename", + "multi": false, + "name": "nodename", + "options": [], + "query": { + "qryType": 1, + "query": "label_values(node_uname_info,nodename)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "current": {}, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "definition": "label_values(node_uname_info{nodename=\"$nodename\"},instance)", + "hide": 2, + "includeAll": false, + "multi": false, + "name": "node", + "options": [], + "query": { + "qryType": 1, + "query": "label_values(node_uname_info{nodename=\"$nodename\"},instance)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, + "refresh": 1, + "regex": "/([^:]+):.*/", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "current": { + "selected": false, + "text": "victorismetrics", + "value": "P1EB0681B67ED710F" + }, + "hide": 2, + "includeAll": false, + "label": "prometheus", + "multi": false, + "name": "DS_PROMETHEUS", + "options": [], + "query": "prometheus", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + } + ] + }, + "time": { + "from": "now-24h", + "to": "now" + }, + "timeRangeUpdatedDuringEditOrView": false, + "timepicker": {}, + "timezone": "browser", + "title": "ISCSI", + "uid": "cdyrar4wc0dfkf", + "version": 4, + "weekStart": "" +} \ No newline at end of file diff --git a/kubernetes/cray-sysmgmt-health/templates/grafana/configmap.yaml b/kubernetes/cray-sysmgmt-health/templates/grafana/configmap.yaml index 6a1787e..a109c50 100644 --- a/kubernetes/cray-sysmgmt-health/templates/grafana/configmap.yaml +++ b/kubernetes/cray-sysmgmt-health/templates/grafana/configmap.yaml @@ -867,3 +867,16 @@ data: fluentbit.json: |- {{- .Files.Get "dashboards_json/fluentbit/fluentbit.json" | nindent 4 }} --- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "cray-sysmgmt-health.fullname" . }}-iscsi + namespace: {{ .Release.Namespace }} + labels: + {{- if (index $.Values "victoria-metrics-k8s-stack" "grafana" "sidecar" "dashboards" "label") }} + {{ (index $.Values "victoria-metrics-k8s-stack" "grafana" "sidecar" "dashboards" "label") }}: "1" + {{- end }} +data: + iscsi.json: |- + {{- .Files.Get "dashboards_json/iscsi/iscsi.json" | nindent 4 }} +---