Improve logging for empty metrics and update example dashboards.

This commit is contained in:
Mark Nellemann 2021-06-11 02:12:02 +02:00
parent a24401aa8a
commit 005bf3d83f
6 changed files with 1040 additions and 772 deletions

View File

@ -53,7 +53,7 @@ Install InfluxDB on an *LPAR* or other server, which is network accessible by th
### Grafana Configuration ### Grafana Configuration
- Configure Grafana to use InfluxDB as a new datasource - Configure Grafana to use InfluxDB as a new datasource
- set *Min time interval* to *30s* or *1m* depending on your HMCi *refresh* setting. - **NOTE:** set *Min time interval* to *30s* or *1m* depending on your HMCi *refresh* setting.
- Import example dashboards from the *doc/* folder into Grafana as a starting point and get creative making your own cool dashboards :) - Import example dashboards from the *doc/* folder into Grafana as a starting point and get creative making your own cool dashboards :)
## Notes ## Notes
@ -87,10 +87,9 @@ ALTER RETENTION POLICY "autogen" ON "hmci" DURATION 90d
Below are screenshots of the provided Grafana dashboards (found in the **doc/** folder), which can be used as a starting point. Below are screenshots of the provided Grafana dashboards (found in the **doc/** folder), which can be used as a starting point.
- [hmci-resources.png](https://bitbucket.org/mnellemann/hmci/downloads/hmci-resources.png) - [hmci-systems.png](https://bitbucket.org/mnellemann/hmci/downloads/hmci-systems-dashboard.png)
- [hmci-energy.png](https://bitbucket.org/mnellemann/hmci/downloads/hmci-energy.png) - [hmci-vois.png](https://bitbucket.org/mnellemann/hmci/downloads/hmci-vios-dashboard.png)
- [hmci-vois.png](https://bitbucket.org/mnellemann/hmci/downloads/hmci-vios.png) - [hmci-lpars](https://bitbucket.org/mnellemann/hmci/downloads/hmci-lpars-dashboard.png)
- [hmci-lpars](https://bitbucket.org/mnellemann/hmci/downloads/hmci-lpars.png)
## Known problems ## Known problems

View File

@ -1,8 +1,8 @@
{ {
"__inputs": [ "__inputs": [
{ {
"name": "DS_INFLUXDB", "name": "DS_INFLUXDB-HMCI",
"label": "InfluxDB", "label": "InfluxDB-hmci",
"description": "", "description": "",
"type": "datasource", "type": "datasource",
"pluginId": "influxdb", "pluginId": "influxdb",
@ -14,12 +14,12 @@
"type": "grafana", "type": "grafana",
"id": "grafana", "id": "grafana",
"name": "Grafana", "name": "Grafana",
"version": "7.4.2" "version": "8.0.0"
}, },
{ {
"type": "panel", "type": "panel",
"id": "graph", "id": "graph",
"name": "Graph", "name": "Graph (old)",
"version": "" "version": ""
}, },
{ {
@ -53,7 +53,7 @@
"gnetId": null, "gnetId": null,
"graphTooltip": 0, "graphTooltip": 0,
"id": null, "id": null,
"iteration": 1617197417499, "iteration": 1623356314349,
"links": [], "links": [],
"panels": [ "panels": [
{ {
@ -61,11 +61,10 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "${DS_INFLUXDB}", "datasource": "${DS_INFLUXDB-HMCI}",
"description": "", "description": "",
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
"custom": {},
"links": [], "links": [],
"unit": "watt" "unit": "watt"
}, },
@ -97,7 +96,7 @@
"alertThreshold": true "alertThreshold": true
}, },
"percentage": false, "percentage": false,
"pluginVersion": "7.4.2", "pluginVersion": "8.0.0",
"pointradius": 2, "pointradius": 2,
"points": false, "points": false,
"renderer": "flot", "renderer": "flot",
@ -200,10 +199,9 @@
} }
}, },
{ {
"datasource": "${DS_INFLUXDB}", "datasource": "${DS_INFLUXDB-HMCI}",
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
"custom": {},
"mappings": [], "mappings": [],
"thresholds": { "thresholds": {
"mode": "absolute", "mode": "absolute",
@ -248,7 +246,7 @@
"text": {}, "text": {},
"textMode": "auto" "textMode": "auto"
}, },
"pluginVersion": "7.4.2", "pluginVersion": "8.0.0",
"targets": [ "targets": [
{ {
"alias": "$tag_servername", "alias": "$tag_servername",
@ -307,7 +305,7 @@
}, },
{ {
"collapsed": false, "collapsed": false,
"datasource": "${DS_INFLUXDB}", "datasource": "${DS_INFLUXDB-HMCI}",
"gridPos": { "gridPos": {
"h": 1, "h": 1,
"w": 24, "w": 24,
@ -321,14 +319,13 @@
"type": "row" "type": "row"
}, },
{ {
"datasource": "${DS_INFLUXDB}", "datasource": "${DS_INFLUXDB-HMCI}",
"description": "Inlet air temperature.", "description": "Inlet air temperature.",
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
"color": { "color": {
"mode": "thresholds" "mode": "thresholds"
}, },
"custom": {},
"links": [], "links": [],
"mappings": [], "mappings": [],
"thresholds": { "thresholds": {
@ -374,7 +371,7 @@
"text": {}, "text": {},
"textMode": "auto" "textMode": "auto"
}, },
"pluginVersion": "7.4.2", "pluginVersion": "8.0.0",
"targets": [ "targets": [
{ {
"alias": "$tag_servername - $tag_name", "alias": "$tag_servername - $tag_name",
@ -436,16 +433,11 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "${DS_INFLUXDB}", "datasource": "${DS_INFLUXDB-HMCI}",
"description": "", "description": "",
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
"custom": {},
"links": [], "links": [],
"thresholds": {
"mode": "absolute",
"steps": []
},
"unit": "celsius" "unit": "celsius"
}, },
"overrides": [] "overrides": []
@ -478,7 +470,7 @@
"alertThreshold": true "alertThreshold": true
}, },
"percentage": false, "percentage": false,
"pluginVersion": "7.4.2", "pluginVersion": "8.0.0",
"pointradius": 2, "pointradius": 2,
"points": false, "points": false,
"renderer": "flot", "renderer": "flot",
@ -645,7 +637,7 @@
} }
], ],
"refresh": "1m", "refresh": "1m",
"schemaVersion": 27, "schemaVersion": 30,
"style": "dark", "style": "dark",
"tags": [ "tags": [
"POWER" "POWER"
@ -655,7 +647,7 @@
{ {
"allValue": null, "allValue": null,
"current": {}, "current": {},
"datasource": "${DS_INFLUXDB}", "datasource": "${DS_INFLUXDB-HMCI}",
"definition": "SHOW TAG VALUES FROM \"server_processor\" WITH KEY = \"servername\" WHERE time > now() - 24h", "definition": "SHOW TAG VALUES FROM \"server_processor\" WITH KEY = \"servername\" WHERE time > now() - 24h",
"description": null, "description": null,
"error": null, "error": null,
@ -671,7 +663,6 @@
"skipUrlSync": false, "skipUrlSync": false,
"sort": 0, "sort": 0,
"tagValuesQuery": "", "tagValuesQuery": "",
"tags": [],
"tagsQuery": "", "tagsQuery": "",
"type": "query", "type": "query",
"useTags": false "useTags": false
@ -698,5 +689,5 @@
"timezone": "", "timezone": "",
"title": "IBM Power - HMCi - System Energy", "title": "IBM Power - HMCi - System Energy",
"uid": "oHcrgD1Mk", "uid": "oHcrgD1Mk",
"version": 20 "version": 2
} }

View File

@ -1,8 +1,8 @@
{ {
"__inputs": [ "__inputs": [
{ {
"name": "DS_INFLUXDB", "name": "DS_INFLUXDB-HMCI",
"label": "InfluxDB", "label": "InfluxDB-hmci",
"description": "", "description": "",
"type": "datasource", "type": "datasource",
"pluginId": "influxdb", "pluginId": "influxdb",
@ -20,12 +20,12 @@
"type": "grafana", "type": "grafana",
"id": "grafana", "id": "grafana",
"name": "Grafana", "name": "Grafana",
"version": "7.4.2" "version": "8.0.0"
}, },
{ {
"type": "panel", "type": "panel",
"id": "graph", "id": "graph",
"name": "Graph", "name": "Graph (old)",
"version": "" "version": ""
}, },
{ {
@ -60,11 +60,11 @@
"gnetId": 1465, "gnetId": 1465,
"graphTooltip": 0, "graphTooltip": 0,
"id": null, "id": null,
"iteration": 1617197467456, "iteration": 1623369402365,
"links": [], "links": [],
"panels": [ "panels": [
{ {
"datasource": "${DS_INFLUXDB}", "datasource": "${DS_INFLUXDB-HMCI}",
"description": "", "description": "",
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@ -92,7 +92,7 @@
{ {
"matcher": { "matcher": {
"id": "byName", "id": "byName",
"options": "lparname" "options": "Name"
}, },
"properties": [ "properties": [
{ {
@ -104,18 +104,34 @@
{ {
"matcher": { "matcher": {
"id": "byName", "id": "byName",
"options": "affinityScore" "options": "Affinity Score"
}, },
"properties": [ "properties": [
{ {
"id": "color", "id": "color",
"value": { "value": {
"mode": "thresholds" "mode": "continuous-RdYlGr"
} }
}, },
{ {
"id": "unit", "id": "unit",
"value": "percent" "value": "percent"
},
{
"id": "custom.displayMode",
"value": "basic"
}
]
},
{
"matcher": {
"id": "byName",
"options": "ID"
},
"properties": [
{
"id": "custom.width",
"value": 330
} }
] ]
} }
@ -132,7 +148,7 @@
"showHeader": true, "showHeader": true,
"sortBy": [] "sortBy": []
}, },
"pluginVersion": "7.4.2", "pluginVersion": "8.0.0",
"targets": [ "targets": [
{ {
"alias": "Read", "alias": "Read",
@ -199,17 +215,51 @@
], ],
"timeFrom": null, "timeFrom": null,
"timeShift": null, "timeShift": null,
"title": "", "transformations": [
{
"id": "organize",
"options": {
"excludeByName": {
"Time": true
},
"indexByName": {
"Time": 0,
"affinityScore": 4,
"id": 1,
"viosname": 2,
"viosstate": 3
},
"renameByName": {
"affinityScore": "Affinity Score",
"id": "ID",
"viosname": "Name",
"viosstate": "State"
}
}
},
{
"id": "sortBy",
"options": {
"fields": {},
"sort": [
{
"field": "Name"
}
]
}
}
],
"type": "table" "type": "table"
}, },
{ {
"datasource": "${DS_INFLUXDB}", "datasource": "${DS_INFLUXDB-HMCI}",
"description": "", "description": "",
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
"custom": {},
"links": [], "links": [],
"mappings": [], "mappings": [],
"max": 100,
"min": 0,
"thresholds": { "thresholds": {
"mode": "absolute", "mode": "absolute",
"steps": [ "steps": [
@ -238,7 +288,7 @@
"options": { "options": {
"reduceOptions": { "reduceOptions": {
"calcs": [ "calcs": [
"mean" "lastNotNull"
], ],
"fields": "", "fields": "",
"values": false "values": false
@ -247,7 +297,7 @@
"showThresholdMarkers": true, "showThresholdMarkers": true,
"text": {} "text": {}
}, },
"pluginVersion": "7.4.2", "pluginVersion": "8.0.0",
"targets": [ "targets": [
{ {
"alias": "$tag_viosname", "alias": "$tag_viosname",
@ -288,7 +338,7 @@
}, },
{ {
"params": [], "params": [],
"type": "mean" "type": "last"
} }
] ]
], ],
@ -318,19 +368,18 @@
"content": "", "content": "",
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "${DS_INFLUXDB}", "datasource": "${DS_INFLUXDB-HMCI}",
"description": "", "description": "",
"editable": true, "editable": true,
"error": false, "error": false,
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
"custom": {},
"links": [] "links": []
}, },
"overrides": [] "overrides": []
}, },
"fill": 2, "fill": 1,
"fillGradient": 2, "fillGradient": 0,
"grid": {}, "grid": {},
"gridPos": { "gridPos": {
"h": 9, "h": 9,
@ -352,7 +401,7 @@
"values": false "values": false
}, },
"lines": true, "lines": true,
"linewidth": 2, "linewidth": 1,
"links": [], "links": [],
"mode": "", "mode": "",
"nullPointMode": "connected", "nullPointMode": "connected",
@ -360,7 +409,7 @@
"alertThreshold": true "alertThreshold": true
}, },
"percentage": false, "percentage": false,
"pluginVersion": "7.4.2", "pluginVersion": "8.0.0",
"pointradius": 5, "pointradius": 5,
"points": false, "points": false,
"renderer": "flot", "renderer": "flot",
@ -371,7 +420,7 @@
"style": {}, "style": {},
"targets": [ "targets": [
{ {
"alias": "$tag_viosname", "alias": "$tag_viosname - $col",
"dsType": "influxdb", "dsType": "influxdb",
"groupBy": [ "groupBy": [
{ {
@ -410,6 +459,12 @@
{ {
"params": [], "params": [],
"type": "mean" "type": "mean"
},
{
"params": [
"utilized"
],
"type": "alias"
} }
] ]
], ],
@ -478,13 +533,12 @@
"content": "", "content": "",
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "${DS_INFLUXDB}", "datasource": "${DS_INFLUXDB-HMCI}",
"description": "", "description": "",
"editable": true, "editable": true,
"error": false, "error": false,
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
"custom": {},
"links": [] "links": []
}, },
"overrides": [] "overrides": []
@ -493,23 +547,23 @@
"fillGradient": 1, "fillGradient": 1,
"grid": {}, "grid": {},
"gridPos": { "gridPos": {
"h": 9, "h": 18,
"w": 24, "w": 12,
"x": 0, "x": 0,
"y": 14 "y": 14
}, },
"hiddenSeries": false, "hiddenSeries": false,
"id": 18, "id": 18,
"legend": { "legend": {
"alignAsTable": true, "alignAsTable": false,
"avg": true, "avg": false,
"current": false, "current": false,
"max": true, "max": false,
"min": false, "min": false,
"rightSide": false, "rightSide": false,
"show": false, "show": true,
"total": false, "total": false,
"values": true "values": false
}, },
"lines": true, "lines": true,
"linewidth": 1, "linewidth": 1,
@ -520,7 +574,7 @@
"alertThreshold": true "alertThreshold": true
}, },
"percentage": false, "percentage": false,
"pluginVersion": "7.4.2", "pluginVersion": "8.0.0",
"pointradius": 5, "pointradius": 5,
"points": false, "points": false,
"renderer": "flot", "renderer": "flot",
@ -725,13 +779,12 @@
"content": "", "content": "",
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "${DS_INFLUXDB}", "datasource": "${DS_INFLUXDB-HMCI}",
"description": "", "description": "",
"editable": true, "editable": true,
"error": false, "error": false,
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
"custom": {},
"links": [] "links": []
}, },
"overrides": [] "overrides": []
@ -740,23 +793,23 @@
"fillGradient": 1, "fillGradient": 1,
"grid": {}, "grid": {},
"gridPos": { "gridPos": {
"h": 9, "h": 18,
"w": 24, "w": 12,
"x": 0, "x": 12,
"y": 23 "y": 14
}, },
"hiddenSeries": false, "hiddenSeries": false,
"id": 17, "id": 17,
"legend": { "legend": {
"alignAsTable": true, "alignAsTable": false,
"avg": true, "avg": false,
"current": false, "current": false,
"max": true, "max": false,
"min": true, "min": false,
"rightSide": false, "rightSide": false,
"show": false, "show": true,
"total": false, "total": false,
"values": true "values": false
}, },
"lines": true, "lines": true,
"linewidth": 1, "linewidth": 1,
@ -767,7 +820,7 @@
"alertThreshold": true "alertThreshold": true
}, },
"percentage": false, "percentage": false,
"pluginVersion": "7.4.2", "pluginVersion": "8.0.0",
"pointradius": 5, "pointradius": 5,
"points": false, "points": false,
"renderer": "flot", "renderer": "flot",
@ -995,7 +1048,7 @@
} }
], ],
"refresh": "1m", "refresh": "1m",
"schemaVersion": 27, "schemaVersion": 30,
"style": "dark", "style": "dark",
"tags": [ "tags": [
"Power", "Power",
@ -1008,7 +1061,7 @@
"allFormat": "regex values", "allFormat": "regex values",
"allValue": null, "allValue": null,
"current": {}, "current": {},
"datasource": "${DS_INFLUXDB}", "datasource": "${DS_INFLUXDB-HMCI}",
"definition": "SHOW TAG VALUES FROM \"server_processor\" WITH KEY = \"servername\" WHERE time > now() - 24h", "definition": "SHOW TAG VALUES FROM \"server_processor\" WITH KEY = \"servername\" WHERE time > now() - 24h",
"description": null, "description": null,
"error": null, "error": null,
@ -1026,7 +1079,6 @@
"skipUrlSync": false, "skipUrlSync": false,
"sort": 0, "sort": 0,
"tagValuesQuery": null, "tagValuesQuery": null,
"tags": [],
"tagsQuery": null, "tagsQuery": null,
"type": "query", "type": "query",
"useTags": false "useTags": false
@ -1035,7 +1087,7 @@
"allFormat": "regex values", "allFormat": "regex values",
"allValue": null, "allValue": null,
"current": {}, "current": {},
"datasource": "${DS_INFLUXDB}", "datasource": "${DS_INFLUXDB-HMCI}",
"definition": "SHOW TAG VALUES FROM \"vios_details\" WITH KEY = \"viosname\" WHERE servername =~ /$ServerName/ AND time > now() - 24h", "definition": "SHOW TAG VALUES FROM \"vios_details\" WITH KEY = \"viosname\" WHERE servername =~ /$ServerName/ AND time > now() - 24h",
"description": null, "description": null,
"error": null, "error": null,
@ -1053,7 +1105,6 @@
"skipUrlSync": false, "skipUrlSync": false,
"sort": 0, "sort": 0,
"tagValuesQuery": null, "tagValuesQuery": null,
"tags": [],
"tagsQuery": null, "tagsQuery": null,
"type": "query", "type": "query",
"useTags": false "useTags": false
@ -1092,5 +1143,5 @@
"timezone": "browser", "timezone": "browser",
"title": "IBM Power - HMCi - Virtual I/O Servers", "title": "IBM Power - HMCi - Virtual I/O Servers",
"uid": "DDNEv5vGz", "uid": "DDNEv5vGz",
"version": 18 "version": 4
} }

View File

@ -1,3 +1,3 @@
id = hmci id = hmci
group = biz.nellemann.hmci group = biz.nellemann.hmci
version = 1.2.1 version = 1.2.2