diff --git a/doc/TODO.md b/doc/TODO.md index 18c6888..c814b2d 100644 --- a/doc/TODO.md +++ b/doc/TODO.md @@ -18,9 +18,11 @@ - [] Container - [] Use best practice for dockerfiles, like run with user for non root. - [] K8 Deployment? + - [] Config file as a environment variables? secret in K8/OC? - [] Grafana. - [] Updated Grafana dashboard with new stats from XML + - [] Events/Message/Alarms from Virtualize? - /lseventlog - [] SVCi/Virtualize Metric - [] Logging level diff --git a/doc/examples/docker-podman-compose/.env b/doc/examples/docker-podman-compose/.env new file mode 100644 index 0000000..e066172 --- /dev/null +++ b/doc/examples/docker-podman-compose/.env @@ -0,0 +1,11 @@ +# Change to your's environment. +GRAFANA_USERNAME=admin +GRAFANA_PASSWORD=admin1234! +INFLUXDB_INIT_MODE=setup +INFLUXDB_INIT_USERNAME=admin +INFLUXDB_INIT_PASSWORD=admin1234! +INFLUXDB_INIT_ORG=test +INFLUXDB_INIT_BUCKET=svci +INFLUXDB_INIT_RETENTION=356d +# Remeber to use same token in svci.toml +INFLUXDB_INIT_ADMIN_TOKEN="hTHG-mwhRypjO8nZEmdzVKL4fM7kJH7989MC9JdgXacVHfBsks8AzeIwhqv-sXm76dphjO5pvqv5Fmsvw_zvGA==" \ No newline at end of file diff --git a/doc/examples/docker-podman-compose/docker-compose.yaml b/doc/examples/docker-podman-compose/docker-compose.yaml new file mode 100644 index 0000000..d573130 --- /dev/null +++ b/doc/examples/docker-podman-compose/docker-compose.yaml @@ -0,0 +1,62 @@ +services: + influxdb: + image: influxdb:latest + container_name: influxdb-sme + ports: + - 8086:8086 + - 8088:8088 + volumes: + - influxdb-storage:/var/lib/influxdb + environment: + # .env files automatically picked up if exist in same folder. + # PS: Password need to be some length. + # if you dont want to have secrets in env, use podman/docker secret create + # With the DOCKER_INFLUXDB_ Prefix this will then be picked up by influxdb container + - DOCKER_INFLUXDB_INIT_MODE=${INFLUXDB_INIT_MODE} + - DOCKER_INFLUXDB_INIT_USERNAME=${INFLUXDB_INIT_USERNAME} + - DOCKER_INFLUXDB_INIT_PASSWORD=${INFLUXDB_INIT_PASSWORD} + - DOCKER_INFLUXDB_INIT_BUCKET=${INFLUXDB_INIT_BUCKET} + - DOCKER_INFLUXDB_INIT_ORG=${INFLUXDB_INIT_ORG} + - DOCKER_INFLUXDB_INIT_RETENTION=${INFLUXDB_INIT_RETENTION} + - DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=${INFLUXDB_INIT_ADMIN_TOKEN} + #networks: + # - external_network + grafana: + image: grafana/grafana:latest + container_name: grafana-sme + ports: + - 3000:3000 + volumes: + - grafana-storage:/var/lib/grafana + - ./grafana-provisioning/:/etc/grafana/provisioning/ + depends_on: + - influxdb-sme + environment: + - GF_SECURITY_ADMIN_USER=${GRAFANA_USERNAME} + - GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_PASSWORD} + - DOCKER_INFLUXDB_INIT_MODE=${INFLUXDB_INIT_MODE} + - DOCKER_INFLUXDB_INIT_USERNAME=${INFLUXDB_INIT_USERNAME} + - DOCKER_INFLUXDB_INIT_PASSWORD=${INFLUXDB_INIT_PASSWORD} + - DOCKER_INFLUXDB_INIT_BUCKET=${INFLUXDB_INIT_BUCKET} + - DOCKER_INFLUXDB_INIT_ORG=${INFLUXDB_INIT_ORG} + - DOCKER_INFLUXDB_INIT_RETENTION=${INFLUXDB_INIT_RETENTION} + - DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=${INFLUXDB_INIT_ADMIN_TOKEN} + #networks: + # - external_network + svci: + image: ghcr.io/mnellemann/svci:latest + container_name: storage_metric_exporter-sme + restart: unless-stopped + #command: + volumes: + - ./svci-data:/opt/app/config/ + depends_on: + - grafana-sme + #networks: + # - external_network +#networks: +# external_network: +# external: true +volumes: + influxdb-storage: + grafana-storage: \ No newline at end of file diff --git a/doc/examples/docker-podman-compose/grafana-provisioning/dashboards/SVCi - IBM Storage - IO Stats.json b/doc/examples/docker-podman-compose/grafana-provisioning/dashboards/SVCi - IBM Storage - IO Stats.json new file mode 100644 index 0000000..35d3ccc --- /dev/null +++ b/doc/examples/docker-podman-compose/grafana-provisioning/dashboards/SVCi - IBM Storage - IO Stats.json @@ -0,0 +1,1420 @@ +{ + "__inputs": [ + { + "name": "DS_SVCI", + "label": "svci", + "description": "", + "type": "datasource", + "pluginId": "influxdb", + "pluginName": "InfluxDB" + } + ], + "__elements": {}, + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "9.2.10" + }, + { + "type": "datasource", + "id": "influxdb", + "name": "InfluxDB", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "table", + "name": "Table", + "version": "" + }, + { + "type": "panel", + "id": "text", + "name": "Text", + "version": "" + }, + { + "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", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "description": "https://git.data.coop/nellemann/svci/ - Metrics collected from IBM Spectrum Virtualize.", + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "liveNow": true, + "panels": [ + { + "datasource": { + "type": "influxdb", + "uid": "DS_SVCI" + }, + "gridPos": { + "h": 3, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 16, + "options": { + "code": { + "language": "plaintext", + "showLineNumbers": false, + "showMiniMap": false + }, + "content": "## Metrics collected from IBM Storage\n \nFor more information visit: [github.com/mnellemann/svci](https://github.com/mnellemann/svci)\n ", + "mode": "markdown" + }, + "pluginVersion": "9.2.10", + "targets": [ + { + "datasource": { + "type": "influxdb", + "uid": "DS_SVCI" + }, + "refId": "A" + } + ], + "transparent": true, + "type": "text" + }, + { + "datasource": { + "type": "influxdb", + "uid": "DS_SVCI" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "fixed" + }, + "custom": { + "align": "center", + "displayMode": "auto", + "filterable": false, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "string" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Time" + }, + "properties": [ + { + "id": "custom.hidden", + "value": true + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "name" + }, + "properties": [ + { + "id": "displayName", + "value": "Name" + } + ] + } + ] + }, + "gridPos": { + "h": 3, + "w": 24, + "x": 0, + "y": 3 + }, + "id": 17, + "options": { + "footer": { + "enablePagination": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true + }, + "pluginVersion": "9.2.10", + "targets": [ + { + "alias": "$col", + "datasource": { + "type": "influxdb", + "uid": "DS_SVCI" + }, + "groupBy": [ + { + "params": [ + "8h" + ], + "type": "time" + }, + { + "params": [ + "name" + ], + "type": "tag" + }, + { + "params": [ + "previous" + ], + "type": "fill" + } + ], + "limit": "1", + "measurement": "system", + "orderByTime": "DESC", + "policy": "default", + "refId": "A", + "resultFormat": "table", + "select": [ + [ + { + "params": [ + "location" + ], + "type": "field" + }, + { + "params": [], + "type": "last" + }, + { + "params": [ + "Location" + ], + "type": "alias" + } + ], + [ + { + "params": [ + "product_name" + ], + "type": "field" + }, + { + "params": [], + "type": "last" + }, + { + "params": [ + "Product" + ], + "type": "alias" + } + ], + [ + { + "params": [ + "code_level" + ], + "type": "field" + }, + { + "params": [], + "type": "last" + }, + { + "params": [ + "Code Level" + ], + "type": "alias" + } + ] + ], + "tags": [ + { + "key": "name", + "operator": "=~", + "value": "/^$system$/" + } + ] + } + ], + "title": "System Details", + "transparent": true, + "type": "table" + }, + { + "datasource": { + "type": "influxdb", + "uid": "DS_SVCI" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": 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 + } + ] + }, + "unit": "KBs" + }, + "overrides": [] + }, + "gridPos": { + "h": 16, + "w": 12, + "x": 0, + "y": 6 + }, + "id": 31, + "options": { + "legend": { + "calcs": [ + "mean" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "alias": "$tag_id ($tag_node)", + "datasource": { + "type": "influxdb", + "uid": "DS_SVCI" + }, + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "id" + ], + "type": "tag" + }, + { + "params": [ + "node" + ], + "type": "tag" + }, + { + "params": [ + "cluster" + ], + "type": "tag" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "key": "Q-810e43ff-efbe-4a06-ac74-6eebd78a3248-0", + "measurement": "stat_vdisk", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "rb" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + }, + { + "params": [], + "type": "non_negative_difference" + }, + { + "params": [ + " *2" + ], + "type": "math" + }, + { + "params": [ + "rx" + ], + "type": "alias" + } + ] + ], + "tags": [ + { + "key": "node", + "operator": "=~", + "value": "/^$node$/" + }, + { + "condition": "AND", + "key": "cluster", + "operator": "=~", + "value": "/^$system$/" + } + ] + } + ], + "title": "IO Stats - vDisks - Read", + "type": "timeseries" + }, + { + "datasource": { + "type": "influxdb", + "uid": "DS_SVCI" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": 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 + } + ] + }, + "unit": "KBs" + }, + "overrides": [] + }, + "gridPos": { + "h": 16, + "w": 12, + "x": 12, + "y": 6 + }, + "id": 34, + "options": { + "legend": { + "calcs": [ + "mean" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "alias": "$tag_id ($tag_node)", + "datasource": { + "type": "influxdb", + "uid": "DS_SVCI" + }, + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "id" + ], + "type": "tag" + }, + { + "params": [ + "node" + ], + "type": "tag" + }, + { + "params": [ + "cluster" + ], + "type": "tag" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "key": "Q-810e43ff-efbe-4a06-ac74-6eebd78a3248-0", + "measurement": "stat_vdisk", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "wb" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + }, + { + "params": [], + "type": "non_negative_difference" + }, + { + "params": [ + " *2" + ], + "type": "math" + }, + { + "params": [ + "tx" + ], + "type": "alias" + } + ] + ], + "tags": [ + { + "key": "node", + "operator": "=~", + "value": "/^$node$/" + }, + { + "condition": "AND", + "key": "cluster", + "operator": "=~", + "value": "/^$system$/" + } + ] + } + ], + "title": "IO Stats - vDisks - Write", + "type": "timeseries" + }, + { + "datasource": { + "type": "influxdb", + "uid": "DS_SVCI" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": 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 + } + ] + }, + "unit": "binBps" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 22 + }, + "id": 30, + "options": { + "legend": { + "calcs": [ + "mean" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "alias": "$tag_id ($tag_node)", + "datasource": { + "type": "influxdb", + "uid": "DS_SVCI" + }, + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "id" + ], + "type": "tag" + }, + { + "params": [ + "cluster" + ], + "type": "tag" + }, + { + "params": [ + "node" + ], + "type": "tag" + }, + { + "params": [ + "cluster" + ], + "type": "tag" + }, + { + "params": [ + "none" + ], + "type": "fill" + } + ], + "key": "Q-810e43ff-efbe-4a06-ac74-6eebd78a3248-0", + "measurement": "stat_port", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "hbr" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + }, + { + "params": [], + "type": "non_negative_difference" + }, + { + "params": [ + "rx" + ], + "type": "alias" + } + ] + ], + "tags": [ + { + "key": "node", + "operator": "=~", + "value": "/^$node$/" + }, + { + "condition": "AND", + "key": "cluster", + "operator": "=~", + "value": "/^$system$/" + } + ] + } + ], + "title": "IO Stats - Ports - Read", + "type": "timeseries" + }, + { + "datasource": { + "type": "influxdb", + "uid": "DS_SVCI" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": 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 + } + ] + }, + "unit": "binBps" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 22 + }, + "id": 33, + "options": { + "legend": { + "calcs": [ + "mean" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "alias": "$tag_id ($tag_node)", + "datasource": { + "type": "influxdb", + "uid": "DS_SVCI" + }, + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "id" + ], + "type": "tag" + }, + { + "params": [ + "cluster" + ], + "type": "tag" + }, + { + "params": [ + "node" + ], + "type": "tag" + }, + { + "params": [ + "cluster" + ], + "type": "tag" + }, + { + "params": [ + "none" + ], + "type": "fill" + } + ], + "key": "Q-810e43ff-efbe-4a06-ac74-6eebd78a3248-0", + "measurement": "stat_port", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "hbt" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + }, + { + "params": [], + "type": "non_negative_difference" + }, + { + "params": [ + "tx" + ], + "type": "alias" + } + ] + ], + "tags": [ + { + "key": "node", + "operator": "=~", + "value": "/^$node$/" + }, + { + "condition": "AND", + "key": "cluster", + "operator": "=~", + "value": "/^$system$/" + } + ] + } + ], + "title": "IO Stats - Ports - Write", + "type": "timeseries" + }, + { + "datasource": { + "type": "influxdb", + "uid": "DS_SVCI" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": 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 + } + ] + }, + "unit": "KBs" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 30 + }, + "id": 32, + "options": { + "legend": { + "calcs": [ + "lastNotNull", + "mean" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "alias": "$tag_id $col ($tag_node)", + "datasource": { + "type": "influxdb", + "uid": "DS_SVCI" + }, + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "id" + ], + "type": "tag" + }, + { + "params": [ + "node" + ], + "type": "tag" + }, + { + "params": [ + "cluster" + ], + "type": "tag" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "key": "Q-810e43ff-efbe-4a06-ac74-6eebd78a3248-0", + "measurement": "stat_mdisk", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "rb" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + }, + { + "params": [], + "type": "non_negative_difference" + }, + { + "params": [ + "*2" + ], + "type": "math" + }, + { + "params": [ + "rx" + ], + "type": "alias" + } + ], + [ + { + "params": [ + "wb" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + }, + { + "params": [], + "type": "non_negative_difference" + }, + { + "params": [ + " *2" + ], + "type": "math" + }, + { + "params": [ + "tx" + ], + "type": "alias" + } + ] + ], + "tags": [ + { + "key": "node", + "operator": "=~", + "value": "/^$node$/" + }, + { + "condition": "AND", + "key": "cluster", + "operator": "=~", + "value": "/^$system$/" + } + ] + } + ], + "title": "IO Stats - mDisks - Throughput", + "type": "timeseries" + }, + { + "datasource": { + "type": "influxdb", + "uid": "DS_SVCI" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": 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 + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 30 + }, + "id": 35, + "options": { + "legend": { + "calcs": [ + "mean" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "9.2.10", + "targets": [ + { + "alias": "$tag_id $col ($tag_node)", + "datasource": { + "type": "influxdb", + "uid": "DS_SVCI" + }, + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "id" + ], + "type": "tag" + }, + { + "params": [ + "node" + ], + "type": "tag" + }, + { + "params": [ + "cluster" + ], + "type": "tag" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "key": "Q-810e43ff-efbe-4a06-ac74-6eebd78a3248-0", + "measurement": "stat_mdisk", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "rq" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + }, + { + "params": [], + "type": "non_negative_difference" + }, + { + "params": [ + "rq" + ], + "type": "alias" + } + ] + ], + "tags": [ + { + "key": "node", + "operator": "=~", + "value": "/^$node$/" + }, + { + "condition": "AND", + "key": "cluster", + "operator": "=~", + "value": "/^$system$/" + } + ] + } + ], + "title": "IO Stats - mDisks - Response", + "type": "timeseries" + } + ], + "refresh": "30s", + "schemaVersion": 37, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "current": {}, + "datasource": { + "type": "influxdb", + "uid": "DS_SVCI" + }, + "definition": "SHOW TAG VALUES FROM \"system\" WITH KEY = \"name\" WHERE time > now() - 24h", + "hide": 0, + "includeAll": false, + "label": "System", + "multi": false, + "name": "system", + "options": [], + "query": "SHOW TAG VALUES FROM \"system\" WITH KEY = \"name\" WHERE time > now() - 24h", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "current": {}, + "datasource": { + "type": "influxdb", + "uid": "DS_SVCI" + }, + "definition": "SHOW TAG VALUES FROM \"node_stats\" WITH KEY = \"name\" WHERE \"system\" =~ /$system/ AND time > now() - 24h", + "description": "", + "hide": 0, + "includeAll": true, + "label": "Node", + "multi": true, + "name": "node", + "options": [], + "query": "SHOW TAG VALUES FROM \"node_stats\" WITH KEY = \"name\" WHERE \"system\" =~ /$system/ AND time > now() - 24h", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + } + ] + }, + "time": { + "from": "now-6h", + "to": "now-30s" + }, + "timepicker": { + "nowDelay": "30s", + "refresh_intervals": [ + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ] + }, + "timezone": "", + "title": "SVCi - IBM Storage - IO Stats", + "uid": "xnCHdCYIz", + "version": 13, + "weekStart": "" +} \ No newline at end of file diff --git a/doc/examples/docker-podman-compose/grafana-provisioning/dashboards/SVCi - IBM Storage - Overview.json b/doc/examples/docker-podman-compose/grafana-provisioning/dashboards/SVCi - IBM Storage - Overview.json new file mode 100644 index 0000000..cbc6492 --- /dev/null +++ b/doc/examples/docker-podman-compose/grafana-provisioning/dashboards/SVCi - IBM Storage - Overview.json @@ -0,0 +1,4147 @@ +{ + "__inputs": [ + { + "name": "DS_SVCI", + "label": "svci", + "description": "", + "type": "datasource", + "pluginId": "influxdb", + "pluginName": "InfluxDB" + } + ], + "__elements": {}, + "__requires": [ + { + "type": "panel", + "id": "bargauge", + "name": "Bar gauge", + "version": "" + }, + { + "type": "panel", + "id": "gauge", + "name": "Gauge", + "version": "" + }, + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "9.2.10" + }, + { + "type": "datasource", + "id": "influxdb", + "name": "InfluxDB", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "table", + "name": "Table", + "version": "" + }, + { + "type": "panel", + "id": "text", + "name": "Text", + "version": "" + }, + { + "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", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "description": "https://git.data.coop/nellemann/svci/ - Metrics collected from IBM Spectrum Virtualize.", + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "liveNow": true, + "panels": [ + { + "datasource": { + "type": "influxdb", + "uid": "DS_SVCI" + }, + "gridPos": { + "h": 3, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 16, + "options": { + "code": { + "language": "plaintext", + "showLineNumbers": false, + "showMiniMap": false + }, + "content": "## Metrics collected from IBM Storage\n \nFor more information visit: [github.com/mnellemann/svci](https://github.com/mnellemann/svci)\n ", + "mode": "markdown" + }, + "pluginVersion": "9.2.10", + "targets": [ + { + "datasource": { + "type": "influxdb", + "uid": "DS_SVCI" + }, + "refId": "A" + } + ], + "transparent": true, + "type": "text" + }, + { + "datasource": { + "type": "influxdb", + "uid": "DS_SVCI" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "fixed" + }, + "custom": { + "align": "center", + "displayMode": "auto", + "filterable": false, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "string" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Time" + }, + "properties": [ + { + "id": "custom.hidden", + "value": true + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "name" + }, + "properties": [ + { + "id": "displayName", + "value": "Name" + } + ] + } + ] + }, + "gridPos": { + "h": 3, + "w": 24, + "x": 0, + "y": 3 + }, + "id": 17, + "options": { + "footer": { + "enablePagination": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true + }, + "pluginVersion": "9.2.10", + "targets": [ + { + "alias": "$col", + "datasource": { + "type": "influxdb", + "uid": "DS_SVCI" + }, + "groupBy": [ + { + "params": [ + "8h" + ], + "type": "time" + }, + { + "params": [ + "name" + ], + "type": "tag" + }, + { + "params": [ + "previous" + ], + "type": "fill" + } + ], + "limit": "1", + "measurement": "system", + "orderByTime": "DESC", + "policy": "default", + "refId": "A", + "resultFormat": "table", + "select": [ + [ + { + "params": [ + "location" + ], + "type": "field" + }, + { + "params": [], + "type": "last" + }, + { + "params": [ + "Location" + ], + "type": "alias" + } + ], + [ + { + "params": [ + "product_name" + ], + "type": "field" + }, + { + "params": [], + "type": "last" + }, + { + "params": [ + "Product" + ], + "type": "alias" + } + ], + [ + { + "params": [ + "code_level" + ], + "type": "field" + }, + { + "params": [], + "type": "last" + }, + { + "params": [ + "Code Level" + ], + "type": "alias" + } + ] + ], + "tags": [ + { + "key": "name", + "operator": "=~", + "value": "/^$system$/" + } + ] + } + ], + "title": "System Details", + "transparent": true, + "type": "table" + }, + { + "datasource": { + "type": "influxdb", + "uid": "DS_SVCI" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": 3600000, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "MBs" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 6 + }, + "id": 13, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "alias": "$tag_system - $tag_name : $col", + "datasource": { + "type": "influxdb", + "uid": "DS_SVCI" + }, + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "system" + ], + "type": "tag" + }, + { + "params": [ + "name" + ], + "type": "tag" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "node_stats", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "fc_mb" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + }, + { + "params": [ + 10 + ], + "type": "moving_average" + }, + { + "params": [ + "FC" + ], + "type": "alias" + } + ], + [ + { + "params": [ + "iscsi_mb" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + }, + { + "params": [ + 10 + ], + "type": "moving_average" + }, + { + "params": [ + "iSCSI" + ], + "type": "alias" + } + ] + ], + "tags": [ + { + "key": "system", + "operator": "=~", + "value": "/^$system$/" + }, + { + "condition": "AND", + "key": "name", + "operator": "=~", + "value": "/^$node$/" + } + ] + } + ], + "title": "Frontend Throughput", + "type": "timeseries" + }, + { + "datasource": { + "type": "influxdb", + "uid": "DS_SVCI" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": 3600000, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "iops" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 6 + }, + "id": 5, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "alias": "$tag_system - $tag_name : $col", + "datasource": { + "type": "influxdb", + "uid": "DS_SVCI" + }, + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "system" + ], + "type": "tag" + }, + { + "params": [ + "name" + ], + "type": "tag" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "node_stats", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "fc_io" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + }, + { + "params": [ + 10 + ], + "type": "moving_average" + }, + { + "params": [ + "FC" + ], + "type": "alias" + } + ], + [ + { + "params": [ + "iscsi_io" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + }, + { + "params": [ + "iSCSI" + ], + "type": "alias" + } + ] + ], + "tags": [ + { + "key": "system", + "operator": "=~", + "value": "/^$system$/" + }, + { + "condition": "AND", + "key": "name", + "operator": "=~", + "value": "/^$node$/" + } + ] + } + ], + "title": "Frontend Operations", + "type": "timeseries" + }, + { + "datasource": { + "type": "influxdb", + "uid": "DS_SVCI" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": 3600000, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "decmbytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 0, + "y": 14 + }, + "id": 26, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "alias": "$tag_system - $tag_name : $col", + "datasource": { + "type": "influxdb", + "uid": "DS_SVCI" + }, + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "system" + ], + "type": "tag" + }, + { + "params": [ + "name" + ], + "type": "tag" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "node_stats", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "drive_r_mb" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + }, + { + "params": [ + 10 + ], + "type": "moving_average" + }, + { + "params": [ + "Read" + ], + "type": "alias" + } + ], + [ + { + "params": [ + "drive_w_mb" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + }, + { + "params": [ + 10 + ], + "type": "moving_average" + }, + { + "params": [ + "Write" + ], + "type": "alias" + } + ] + ], + "tags": [ + { + "key": "system", + "operator": "=~", + "value": "/^$system$/" + }, + { + "condition": "AND", + "key": "name", + "operator": "=~", + "value": "/^$node$/" + } + ] + } + ], + "title": "Drives Throughput", + "type": "timeseries" + }, + { + "datasource": { + "type": "influxdb", + "uid": "DS_SVCI" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": 3600000, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "iops" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 8, + "y": 14 + }, + "id": 21, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "alias": "$tag_system - $tag_name : $col", + "datasource": { + "type": "influxdb", + "uid": "DS_SVCI" + }, + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "system" + ], + "type": "tag" + }, + { + "params": [ + "name" + ], + "type": "tag" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "node_stats", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "drive_r_io" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + }, + { + "params": [ + 10 + ], + "type": "moving_average" + }, + { + "params": [ + "Read" + ], + "type": "alias" + } + ], + [ + { + "params": [ + "drive_w_io" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + }, + { + "params": [ + 10 + ], + "type": "moving_average" + }, + { + "params": [ + "Write" + ], + "type": "alias" + } + ] + ], + "tags": [ + { + "key": "system", + "operator": "=~", + "value": "/^$system$/" + }, + { + "condition": "AND", + "key": "name", + "operator": "=~", + "value": "/^$node$/" + } + ] + } + ], + "title": "Drives Operations", + "type": "timeseries" + }, + { + "datasource": { + "type": "influxdb", + "uid": "DS_SVCI" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": 3600000, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 16, + "y": 14 + }, + "id": 25, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "alias": "$tag_system - $tag_name : $col", + "datasource": { + "type": "influxdb", + "uid": "DS_SVCI" + }, + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "system" + ], + "type": "tag" + }, + { + "params": [ + "name" + ], + "type": "tag" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "node_stats", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "drive_r_ms" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + }, + { + "params": [ + 10 + ], + "type": "moving_average" + }, + { + "params": [ + "Read" + ], + "type": "alias" + } + ], + [ + { + "params": [ + "drive_w_ms" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + }, + { + "params": [ + 10 + ], + "type": "moving_average" + }, + { + "params": [ + "Write" + ], + "type": "alias" + } + ] + ], + "tags": [ + { + "key": "system", + "operator": "=~", + "value": "/^$system$/" + }, + { + "condition": "AND", + "key": "name", + "operator": "=~", + "value": "/^$node$/" + } + ] + } + ], + "title": "Drives Latency (ms)", + "type": "timeseries" + }, + { + "datasource": { + "type": "influxdb", + "uid": "DS_SVCI" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": 3600000, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 1, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 0, + "y": 22 + }, + "id": 2, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "alias": "$tag_system - $tag_name : $col", + "datasource": { + "type": "influxdb", + "uid": "DS_SVCI" + }, + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "system" + ], + "type": "tag" + }, + { + "params": [ + "name" + ], + "type": "tag" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "node_stats", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "cpu_pc" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + }, + { + "params": [ + 10 + ], + "type": "moving_average" + }, + { + "params": [ + "System" + ], + "type": "alias" + } + ], + [ + { + "params": [ + "compression_cpu_pc" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + }, + { + "params": [ + 10 + ], + "type": "moving_average" + }, + { + "params": [ + "Compression" + ], + "type": "alias" + } + ] + ], + "tags": [ + { + "key": "system", + "operator": "=~", + "value": "/^$system$/" + }, + { + "condition": "AND", + "key": "name", + "operator": "=~", + "value": "/^$node$/" + } + ] + } + ], + "title": "Processor Load", + "type": "timeseries" + }, + { + "datasource": { + "type": "influxdb", + "uid": "DS_SVCI" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "hue", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": 3600000, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 6, + "y": 22 + }, + "id": 11, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "alias": "$tag_system - $tag_name : $col", + "datasource": { + "type": "influxdb", + "uid": "DS_SVCI" + }, + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "system" + ], + "type": "tag" + }, + { + "params": [ + "name" + ], + "type": "tag" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "node_stats", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "total_cache_pc" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + }, + { + "params": [ + 10 + ], + "type": "moving_average" + }, + { + "params": [ + "Total" + ], + "type": "alias" + } + ], + [ + { + "params": [ + "write_cache_pc" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + }, + { + "params": [ + 10 + ], + "type": "moving_average" + }, + { + "params": [ + "Write" + ], + "type": "alias" + } + ] + ], + "tags": [ + { + "key": "system", + "operator": "=~", + "value": "/^$system$/" + }, + { + "condition": "AND", + "key": "name", + "operator": "=~", + "value": "/^$node$/" + } + ] + } + ], + "title": "Cache Usage", + "type": "timeseries" + }, + { + "datasource": { + "type": "influxdb", + "uid": "DS_SVCI" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-BlYlRd", + "seriesBy": "last" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 12, + "gradientMode": "hue", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": 3600000, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "watt" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 12, + "y": 22 + }, + "id": 9, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "alias": "$tag_system - $tag_id", + "datasource": { + "type": "influxdb", + "uid": "DS_SVCI" + }, + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "system" + ], + "type": "tag" + }, + { + "params": [ + "id" + ], + "type": "tag" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "enclosure_stats", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "power_w" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + }, + { + "params": [ + "Watt" + ], + "type": "alias" + } + ] + ], + "tags": [ + { + "key": "system", + "operator": "=~", + "value": "/^$system$/" + } + ] + } + ], + "title": "Enclosure Power", + "type": "timeseries" + }, + { + "datasource": { + "type": "influxdb", + "uid": "DS_SVCI" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "celsius" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 18, + "y": 22 + }, + "id": 10, + "options": { + "displayMode": "lcd", + "minVizHeight": 10, + "minVizWidth": 0, + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showUnfilled": true + }, + "pluginVersion": "9.2.10", + "targets": [ + { + "alias": "$tag_system - $tag_id", + "datasource": { + "type": "influxdb", + "uid": "DS_SVCI" + }, + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "system" + ], + "type": "tag" + }, + { + "params": [ + "id" + ], + "type": "tag" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "enclosure_stats", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "temp_c" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + }, + { + "params": [ + "Temp" + ], + "type": "alias" + } + ] + ], + "tags": [ + { + "key": "system", + "operator": "=~", + "value": "/^$system$/" + } + ] + } + ], + "title": "Enclosure Temperature", + "type": "bargauge" + }, + { + "datasource": { + "type": "influxdb", + "uid": "DS_SVCI" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": 3600000, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "decmbytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 0, + "y": 30 + }, + "id": 22, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "alias": "$tag_system - $tag_name : $col", + "datasource": { + "type": "influxdb", + "uid": "DS_SVCI" + }, + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "system" + ], + "type": "tag" + }, + { + "params": [ + "name" + ], + "type": "tag" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "node_stats", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "vdisk_r_mb" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + }, + { + "params": [ + 10 + ], + "type": "moving_average" + }, + { + "params": [ + "Read" + ], + "type": "alias" + } + ], + [ + { + "params": [ + "vdisk_w_mb" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + }, + { + "params": [ + 10 + ], + "type": "moving_average" + }, + { + "params": [ + "Write" + ], + "type": "alias" + } + ] + ], + "tags": [ + { + "key": "system", + "operator": "=~", + "value": "/^$system$/" + }, + { + "condition": "AND", + "key": "name", + "operator": "=~", + "value": "/^$node$/" + } + ] + } + ], + "title": "VDisk Throughput", + "type": "timeseries" + }, + { + "datasource": { + "type": "influxdb", + "uid": "DS_SVCI" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": 3600000, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "iops" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 8, + "y": 30 + }, + "id": 4, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "alias": "$tag_system - $tag_name : $col", + "datasource": { + "type": "influxdb", + "uid": "DS_SVCI" + }, + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "system" + ], + "type": "tag" + }, + { + "params": [ + "name" + ], + "type": "tag" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "node_stats", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "vdisk_r_io" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + }, + { + "params": [ + 10 + ], + "type": "moving_average" + }, + { + "params": [ + "Read" + ], + "type": "alias" + } + ], + [ + { + "params": [ + "vdisk_w_io" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + }, + { + "params": [ + 10 + ], + "type": "moving_average" + }, + { + "params": [ + "Write" + ], + "type": "alias" + } + ] + ], + "tags": [ + { + "key": "system", + "operator": "=~", + "value": "/^$system$/" + }, + { + "condition": "AND", + "key": "name", + "operator": "=~", + "value": "/^$node$/" + } + ] + } + ], + "title": "VDisk Operations", + "type": "timeseries" + }, + { + "datasource": { + "type": "influxdb", + "uid": "DS_SVCI" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": 3600000, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 16, + "y": 30 + }, + "id": 7, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "alias": "$tag_system - $tag_name : $col", + "datasource": { + "type": "influxdb", + "uid": "DS_SVCI" + }, + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "system" + ], + "type": "tag" + }, + { + "params": [ + "name" + ], + "type": "tag" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "node_stats", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "vdisk_r_ms" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + }, + { + "params": [ + 10 + ], + "type": "moving_average" + }, + { + "params": [ + "Read" + ], + "type": "alias" + } + ], + [ + { + "params": [ + "vdisk_w_ms" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + }, + { + "params": [ + 10 + ], + "type": "moving_average" + }, + { + "params": [ + "Write" + ], + "type": "alias" + } + ] + ], + "tags": [ + { + "key": "system", + "operator": "=~", + "value": "/^$system$/" + }, + { + "condition": "AND", + "key": "name", + "operator": "=~", + "value": "/^$node$/" + } + ] + } + ], + "title": "VDisk Latency (ms)", + "type": "timeseries" + }, + { + "datasource": { + "type": "influxdb", + "uid": "DS_SVCI" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": 3600000, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "decmbytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 0, + "y": 38 + }, + "id": 23, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "alias": "$tag_system - $tag_name : $col", + "datasource": { + "type": "influxdb", + "uid": "DS_SVCI" + }, + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "system" + ], + "type": "tag" + }, + { + "params": [ + "name" + ], + "type": "tag" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "node_stats", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "mdisk_r_mb" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + }, + { + "params": [ + 10 + ], + "type": "moving_average" + }, + { + "params": [ + "Read" + ], + "type": "alias" + } + ], + [ + { + "params": [ + "mdisk_w_mb" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + }, + { + "params": [ + 10 + ], + "type": "moving_average" + }, + { + "params": [ + "Write" + ], + "type": "alias" + } + ] + ], + "tags": [ + { + "key": "system", + "operator": "=~", + "value": "/^$system$/" + }, + { + "condition": "AND", + "key": "name", + "operator": "=~", + "value": "/^$node$/" + } + ] + } + ], + "title": "MDisk Throughput", + "type": "timeseries" + }, + { + "datasource": { + "type": "influxdb", + "uid": "DS_SVCI" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": 3600000, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "iops" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 8, + "y": 38 + }, + "id": 24, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "alias": "$tag_system - $tag_name : $col", + "datasource": { + "type": "influxdb", + "uid": "DS_SVCI" + }, + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "system" + ], + "type": "tag" + }, + { + "params": [ + "name" + ], + "type": "tag" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "node_stats", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "mdisk_r_io" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + }, + { + "params": [ + 10 + ], + "type": "moving_average" + }, + { + "params": [ + "Read" + ], + "type": "alias" + } + ], + [ + { + "params": [ + "mdisk_w_io" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + }, + { + "params": [ + 10 + ], + "type": "moving_average" + }, + { + "params": [ + "Write" + ], + "type": "alias" + } + ] + ], + "tags": [ + { + "key": "system", + "operator": "=~", + "value": "/^$system$/" + }, + { + "condition": "AND", + "key": "name", + "operator": "=~", + "value": "/^$node$/" + } + ] + } + ], + "title": "MDisk Operations", + "type": "timeseries" + }, + { + "datasource": { + "type": "influxdb", + "uid": "DS_SVCI" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": 3600000, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 16, + "y": 38 + }, + "id": 20, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "alias": "$tag_system - $tag_name : $col", + "datasource": { + "type": "influxdb", + "uid": "DS_SVCI" + }, + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "system" + ], + "type": "tag" + }, + { + "params": [ + "name" + ], + "type": "tag" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "node_stats", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "mdisk_r_ms" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + }, + { + "params": [ + 10 + ], + "type": "moving_average" + }, + { + "params": [ + "Read" + ], + "type": "alias" + } + ], + [ + { + "params": [ + "mdisk_w_ms" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + }, + { + "params": [ + 10 + ], + "type": "moving_average" + }, + { + "params": [ + "Write" + ], + "type": "alias" + } + ] + ], + "tags": [ + { + "key": "system", + "operator": "=~", + "value": "/^$system$/" + }, + { + "condition": "AND", + "key": "name", + "operator": "=~", + "value": "/^$node$/" + } + ] + } + ], + "title": "MDisk Latency (ms)", + "type": "timeseries" + }, + { + "datasource": { + "type": "influxdb", + "uid": "DS_SVCI" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": 3600000, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "MBs" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 0, + "y": 46 + }, + "id": 14, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "alias": "$tag_system - $tag_name : $col", + "datasource": { + "type": "influxdb", + "uid": "DS_SVCI" + }, + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "system" + ], + "type": "tag" + }, + { + "params": [ + "name" + ], + "type": "tag" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "node_stats", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "sas_mb" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + }, + { + "params": [ + 10 + ], + "type": "moving_average" + }, + { + "params": [ + "SAS" + ], + "type": "alias" + } + ] + ], + "tags": [ + { + "key": "system", + "operator": "=~", + "value": "/^$system$/" + }, + { + "condition": "AND", + "key": "name", + "operator": "=~", + "value": "/^$node$/" + } + ] + } + ], + "title": "SAS Throughput", + "type": "timeseries" + }, + { + "datasource": { + "type": "influxdb", + "uid": "DS_SVCI" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": 3600000, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "decmbytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 8, + "y": 46 + }, + "id": 6, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "alias": "$tag_system - $tag_name : $col", + "datasource": { + "type": "influxdb", + "uid": "DS_SVCI" + }, + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "system" + ], + "type": "tag" + }, + { + "params": [ + "name" + ], + "type": "tag" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "node_stats", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "cloud_down_mb" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + }, + { + "params": [ + 10 + ], + "type": "moving_average" + }, + { + "params": [ + "Read" + ], + "type": "alias" + } + ], + [ + { + "params": [ + "cloud_up_mb" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + }, + { + "params": [ + 10 + ], + "type": "moving_average" + }, + { + "params": [ + "Write" + ], + "type": "alias" + } + ] + ], + "tags": [ + { + "key": "system", + "operator": "=~", + "value": "/^$system$/" + }, + { + "condition": "AND", + "key": "name", + "operator": "=~", + "value": "/^$node$/" + } + ] + } + ], + "title": "Cloud Throughput", + "type": "timeseries" + }, + { + "datasource": { + "type": "influxdb", + "uid": "DS_SVCI" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": 3600000, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "MBs" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 16, + "y": 46 + }, + "id": 29, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "alias": "$tag_system - $tag_name : $col", + "datasource": { + "type": "influxdb", + "uid": "DS_SVCI" + }, + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "system" + ], + "type": "tag" + }, + { + "params": [ + "name" + ], + "type": "tag" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "node_stats", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "iplink_mb" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + }, + { + "params": [ + 10 + ], + "type": "moving_average" + }, + { + "params": [ + "MB" + ], + "type": "alias" + } + ], + [ + { + "params": [ + "iplink_comp_mb" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + }, + { + "params": [ + 10 + ], + "type": "moving_average" + }, + { + "params": [ + "MB" + ], + "type": "alias" + } + ] + ], + "tags": [ + { + "key": "system", + "operator": "=~", + "value": "/^$system$/" + }, + { + "condition": "AND", + "key": "name", + "operator": "=~", + "value": "/^$node$/" + } + ] + } + ], + "title": "IPLink Troughtput", + "type": "timeseries" + }, + { + "datasource": { + "type": "influxdb", + "uid": "DS_SVCI" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": 3600000, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "iops" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 0, + "y": 54 + }, + "id": 12, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "alias": "$tag_system - $tag_name : $col", + "datasource": { + "type": "influxdb", + "uid": "DS_SVCI" + }, + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "system" + ], + "type": "tag" + }, + { + "params": [ + "name" + ], + "type": "tag" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "node_stats", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "sas_io" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + }, + { + "params": [ + 10 + ], + "type": "moving_average" + }, + { + "params": [ + "SAS" + ], + "type": "alias" + } + ] + ], + "tags": [ + { + "key": "system", + "operator": "=~", + "value": "/^$system$/" + }, + { + "condition": "AND", + "key": "name", + "operator": "=~", + "value": "/^$node$/" + } + ] + } + ], + "title": "SAS Operations", + "type": "timeseries" + }, + { + "datasource": { + "type": "influxdb", + "uid": "DS_SVCI" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": 3600000, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 8, + "y": 54 + }, + "id": 27, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "alias": "$tag_system - $tag_name : $col", + "datasource": { + "type": "influxdb", + "uid": "DS_SVCI" + }, + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "system" + ], + "type": "tag" + }, + { + "params": [ + "name" + ], + "type": "tag" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "node_stats", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "cloud_down_ms" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + }, + { + "params": [ + 10 + ], + "type": "moving_average" + }, + { + "params": [ + "Read" + ], + "type": "alias" + } + ], + [ + { + "params": [ + "cloud_up_ms" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + }, + { + "params": [ + 10 + ], + "type": "moving_average" + }, + { + "params": [ + "Up" + ], + "type": "alias" + } + ] + ], + "tags": [ + { + "key": "system", + "operator": "=~", + "value": "/^$system$/" + }, + { + "condition": "AND", + "key": "name", + "operator": "=~", + "value": "/^$node$/" + } + ] + } + ], + "title": "Cloud Latency (ms)", + "type": "timeseries" + }, + { + "datasource": { + "type": "influxdb", + "uid": "DS_SVCI" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": 3600000, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "iops" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 16, + "y": 54 + }, + "id": 28, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "alias": "$tag_system - $tag_name : $col", + "datasource": { + "type": "influxdb", + "uid": "DS_SVCI" + }, + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "system" + ], + "type": "tag" + }, + { + "params": [ + "name" + ], + "type": "tag" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "node_stats", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "iplink_io" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + }, + { + "params": [ + 10 + ], + "type": "moving_average" + }, + { + "params": [ + "Read" + ], + "type": "alias" + } + ] + ], + "tags": [ + { + "key": "system", + "operator": "=~", + "value": "/^$system$/" + }, + { + "condition": "AND", + "key": "name", + "operator": "=~", + "value": "/^$node$/" + } + ] + } + ], + "title": "IPLink Operations", + "type": "timeseries" + }, + { + "datasource": { + "type": "influxdb", + "uid": "DS_SVCI" + }, + "description": "", + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 62 + }, + "id": 19, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "9.2.10", + "repeat": "system", + "repeatDirection": "h", + "targets": [ + { + "alias": "$tag_system - $tag_name", + "datasource": { + "type": "influxdb", + "uid": "DS_SVCI" + }, + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "system" + ], + "type": "tag" + }, + { + "params": [ + "name" + ], + "type": "tag" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "m_disk_groups", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "vdisk_count" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + }, + { + "params": [ + "V Disks" + ], + "type": "alias" + } + ] + ], + "tags": [ + { + "key": "system", + "operator": "=~", + "value": "/^$system$/" + } + ] + } + ], + "title": "Volumes / Pool", + "type": "gauge" + } + ], + "refresh": "30s", + "schemaVersion": 37, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "current": {}, + "datasource": { + "type": "influxdb", + "uid": "DS_SVCI" + }, + "definition": "SHOW TAG VALUES FROM \"system\" WITH KEY = \"name\" WHERE time > now() - 24h", + "hide": 0, + "includeAll": false, + "label": "System", + "multi": false, + "name": "system", + "options": [], + "query": "SHOW TAG VALUES FROM \"system\" WITH KEY = \"name\" WHERE time > now() - 24h", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "current": {}, + "datasource": { + "type": "influxdb", + "uid": "DS_SVCI" + }, + "definition": "SHOW TAG VALUES FROM \"node_stats\" WITH KEY = \"name\" WHERE \"system\" =~ /$system/ AND time > now() - 24h", + "description": "", + "hide": 0, + "includeAll": true, + "label": "Node", + "multi": true, + "name": "node", + "options": [], + "query": "SHOW TAG VALUES FROM \"node_stats\" WITH KEY = \"name\" WHERE \"system\" =~ /$system/ AND time > now() - 24h", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + } + ] + }, + "time": { + "from": "now-6h", + "to": "now-30s" + }, + "timepicker": { + "nowDelay": "30s", + "refresh_intervals": [ + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ] + }, + "timezone": "", + "title": "SVCi - IBM Storage - Overview", + "uid": "7R8LbzKV3", + "version": 10, + "weekStart": "" +} \ No newline at end of file diff --git a/doc/examples/docker-podman-compose/grafana-provisioning/dashboards/dashboard.yml b/doc/examples/docker-podman-compose/grafana-provisioning/dashboards/dashboard.yml new file mode 100644 index 0000000..d135e24 --- /dev/null +++ b/doc/examples/docker-podman-compose/grafana-provisioning/dashboards/dashboard.yml @@ -0,0 +1,12 @@ +apiVersion: 1 +providers: +- name: Dashboard-provision + folder: '' + type: file + disableDeletion: false + #updateIntervalSeconds: 10 + editable: true + allowUiUpdates: true + datasource: DS_SVCI + options: + path: /etc/grafana/provisioning/dashboards \ No newline at end of file diff --git a/doc/examples/docker-podman-compose/grafana-provisioning/datasources/datasource.yml b/doc/examples/docker-podman-compose/grafana-provisioning/datasources/datasource.yml new file mode 100644 index 0000000..d7f5340 --- /dev/null +++ b/doc/examples/docker-podman-compose/grafana-provisioning/datasources/datasource.yml @@ -0,0 +1,16 @@ +apiVersion: 1 +datasources: + - name: DS_SVCI + type: influxdb + access: proxy + url: http://influxdb:8086 + jsonData: + dbName: $DOCKER_INFLUXDB_INIT_BUCKET + defaultBucket: $DOCKER_INFLUXDB_INIT_BUCKET + httpHeaderName1: 'Authorization' + httpMode: GET + organization: $DOCKER_INFLUXDB_INIT_ORG + version: InfluxQL + secureJsonData: + httpHeaderValue1: 'Token $DOCKER_INFLUXDB_INIT_ADMIN_TOKEN' + isDefault: true \ No newline at end of file diff --git a/doc/examples/docker-podman-compose/readme-compose.md b/doc/examples/docker-podman-compose/readme-compose.md new file mode 100644 index 0000000..11a2c08 --- /dev/null +++ b/doc/examples/docker-podman-compose/readme-compose.md @@ -0,0 +1 @@ +-- See main readme-docker-compose \ No newline at end of file diff --git a/doc/examples/docker-podman-compose/svci-data/svci.toml b/doc/examples/docker-podman-compose/svci-data/svci.toml new file mode 100644 index 0000000..0587182 --- /dev/null +++ b/doc/examples/docker-podman-compose/svci-data/svci.toml @@ -0,0 +1,20 @@ +# InfluxDB v2.x example +# Remember to use same values in .env file +[influx] +url = "http://influxdb:8086" +org = "test" +token = "hTHG-mwhRypjO8nZEmdzVKL4fM7kJH7989MC9JdgXacVHfBsks8AzeIwhqv-sXm76dphjO5pvqv5Fmsvw_zvGA==" +bucket = "svci" + +### +### Define one or more SVC's to query for metrics +### Each entry must be named [svc.] +### Please Use a USER that have the monitor role! +### + +[svc.svc02] +hostname = "10.33.7.56" +username = "monitor" +password = "superduperpassword" +refresh = 30 # How often to query SVC for data - in seconds +trust = true # Ignore SSL cert. errors (due to default self-signed cert.) diff --git a/doc/readme-docker-compose.md b/doc/readme-docker-compose.md new file mode 100644 index 0000000..0eaa9bb --- /dev/null +++ b/doc/readme-docker-compose.md @@ -0,0 +1,185 @@ +# Running the SVCi as Container in Compose + +Start SVCI, InfluxDB and Grafana as container with Podman/Docker Compose. +This will Create 3 containers, svci, Influxdb, and grafana. deployment will also create influx api key, and create a "bucket" for our data. (retention 365days) and same for Grafana, create the datasource against influxdb and import the grafana dashboards. (PS, the dashboards are using the DS_SVCI as the datasource) + + +Full example is located under [examples/docker-podman-compose](examples/docker-podman-compose) folder. +To spinn up the stack you only need to change the IP,username and password for you storage device in the svci.toml file. located under [svci-data](examples/docker-podman-compose/svci-data/svci.toml) + +1. Cd into the folder examples/docker-podman-compose +2. `docker-compose up -d` or `podman-compose up -d` this will start up the system in background. +3. check status `podman-compose ps` + + ```yaml + using podman version: 4.4.1 + podman ps -a --filter label=io.podman.compose.project=virtualize-exporter-compose + CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES + 4cb391753d12 docker.io/library/influxdb:latest influxd 12 minutes ago Up 12 minutes 0.0.0.0:8086->8086/tcp, 0.0.0.0:8088->8088/tcp influxdb-sme + 4a078e9b6827 docker.io/grafana/grafana:latest 12 minutes ago Up 12 minutes 0.0.0.0:3000->3000/tcp grafana-sme + 92ee4496b728 ghcr.io/mnellemann/svci:latest java -jar /opt/ap... 12 minutes ago Up 12 minutes storage_metric_exporter-sme + exit code: 0 + ``` + PS: this will create a default network with a bridge for access out. + + ```shell + # podman network ls + NETWORK ID NAME DRIVER + 2f259bab93aa podman bridge + 41d9b210dfbf virtualize-exporter-compose_default bridge + ``` + +4. Using the default ports for grafana and influx, use the http://ip:3000 for grafana and http://ip:8086 for influxdb. password is locate din the .env file. +5. If you want to shutdown the pod and remove the data use `podman-compose down --volumes` + +------- + +Example of the podman compose file. +```yaml +services: + influxdb: + image: influxdb:latest + container_name: influxdb-sme + ports: + - 8086:8086 + - 8088:8088 + volumes: + - influxdb-storage:/var/lib/influxdb + environment: + # .env files automatically picked up if exist in same folder. + # PS: Password need to be some length. + # if you dont want to have secrets in env, use podman/docker secret create + # With the DOCKER_INFLUXDB_ Prefix this will then be picked up by influxdb container + - DOCKER_INFLUXDB_INIT_MODE=${INFLUXDB_INIT_MODE} + - DOCKER_INFLUXDB_INIT_USERNAME=${INFLUXDB_INIT_USERNAME} + - DOCKER_INFLUXDB_INIT_PASSWORD=${INFLUXDB_INIT_PASSWORD} + - DOCKER_INFLUXDB_INIT_BUCKET=${INFLUXDB_INIT_BUCKET} + - DOCKER_INFLUXDB_INIT_ORG=${INFLUXDB_INIT_ORG} + - DOCKER_INFLUXDB_INIT_RETENTION=${INFLUXDB_INIT_RETENTION} + - DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=${INFLUXDB_INIT_ADMIN_TOKEN} + #networks: + # - external_network + grafana: + image: grafana/grafana:latest + container_name: grafana-sme + ports: + - 3000:3000 + volumes: + - grafana-storage:/var/lib/grafana + - ./grafana-provisioning/:/etc/grafana/provisioning/ + depends_on: + - influxdb-sme + environment: + - GF_SECURITY_ADMIN_USER=${GRAFANA_USERNAME} + - GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_PASSWORD} + - DOCKER_INFLUXDB_INIT_MODE=${INFLUXDB_INIT_MODE} + - DOCKER_INFLUXDB_INIT_USERNAME=${INFLUXDB_INIT_USERNAME} + - DOCKER_INFLUXDB_INIT_PASSWORD=${INFLUXDB_INIT_PASSWORD} + - DOCKER_INFLUXDB_INIT_BUCKET=${INFLUXDB_INIT_BUCKET} + - DOCKER_INFLUXDB_INIT_ORG=${INFLUXDB_INIT_ORG} + - DOCKER_INFLUXDB_INIT_RETENTION=${INFLUXDB_INIT_RETENTION} + - DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=${INFLUXDB_INIT_ADMIN_TOKEN} + #networks: + # - external_network + svci: + image: ghcr.io/mnellemann/svci:latest + container_name: storage_metric_exporter-sme + restart: unless-stopped + #command: + volumes: + - ./svci-data:/opt/app/config/ + depends_on: + - grafana-sme + #networks: + # - external_network +#networks: +# external_network: +# external: true +volumes: + influxdb-storage: + grafana-storage: +``` + + +Using .env file to get config into the containers. +.env file + +``` +# Change to your's environment. +GRAFANA_USERNAME=admin +GRAFANA_PASSWORD=admin1234! +INFLUXDB_INIT_MODE=setup +INFLUXDB_INIT_USERNAME=admin +INFLUXDB_INIT_PASSWORD=admin1234! +INFLUXDB_INIT_ORG=test +INFLUXDB_INIT_BUCKET=svci +INFLUXDB_INIT_RETENTION=356d +# Remeber to use same token in svci.toml +INFLUXDB_INIT_ADMIN_TOKEN="hTHG-mwhRypjO8nZEmdzVKL4fM7kJH7989MC9JdgXacVHfBsks8AzeIwhqv-sXm76dphjO5pvqv5Fmsvw_zvGA==" +``` + + + +## Manually Creating the influxdb source. + +When creating the influxdb source in grafana, we need the influxdb token you created earlier: default is uses this one: +`Token hTHG-mwhRypjO8nZEmdzVKL4fM7kJH7989MC9JdgXacVHfBsks8AzeIwhqv-sXm76dphjO5pvqv5Fmsvw_zvGA==` + +Go to Grafana webpage: +1. Click Add data source. +2. Select InfluxDB from the list of available data sources. +3. On the Data Source configuration page, enter a name for your InfluxDB data source. +4. Under Query Language, InfluxQL +5. Configure Grafana to use + - a. Under HTTP, enter the following: + URL: Your InfluxDB URL.(http://influxdb:8086) + - b. Under InfluxDB Details, enter the following: + Default bucket : your InfluxDB bucket (svci) + HTTP Method: Select GET + - c. Provide a Min time interval (default is 10s). + - d. Create Custom HTTP Headers where Header=Authorization and Value=Token [ make sure that you are adding space between Token word and your token of InfluxDB] + like: `Token hTHG-mwhRypjO8nZEmdzVKL4fM7kJH7989MC9JdgXacVHfBsks8AzeIwhqv-sXm76dphjO5pvqv5Fmsvw_zvGA==` +6. Press Save and test, + + +## Troubelshooting + +If you have issue creating the network, try manually +``` +docker network create external_network +``` + +To get the DNS to work internally between containers and running podman, you will need to install podman-plugin + + +``` +yum install podman-plugin +podman network create virtualize-exporter-compose +``` +When I ran yum install podman-plugins it included the dnsmasq for DNS resolution inside the podman network. +Check that `"dns_enabled": true,` + +```bash +# podman network inspect virtualize-exporter-compose +[ + { + "name": "virtualize-exporter-compose", + "id": "572fd022aabfc7b2a338210218c3dcb541ca3d4e9ef9780850d26052c0eb4131", + "driver": "bridge", + "network_interface": "cni-podman1", + "created": "2024-06-17T17:05:40.330948421+02:00", + "subnets": [ + { + "subnet": "10.89.0.0/24", + "gateway": "10.89.0.1" + } + ], + "ipv6_enabled": false, + "internal": false, + "dns_enabled": true, + "ipam_options": { + "driver": "host-local" + } + } +] +``` \ No newline at end of file