Cleanup and dashboard fixes and improvements.
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/tag Build is passing Details

This commit is contained in:
Mark Nellemann 2023-03-21 14:57:00 +01:00
parent 6699566fba
commit 2967f6ef75
15 changed files with 455 additions and 353 deletions

View File

@ -2,40 +2,35 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
## [1.4.2] - 2023-01-05 ## 1.4.3 - 2023-03-21
- Fix and improve processor utilization dashboards.
- Minor code cleanup.
## 1.4.2 - 2023-01-05
- Fix error in SR-IOV port type being null. - Fix error in SR-IOV port type being null.
## [1.4.1] - 2022-12-15 ## 1.4.1 - 2022-12-15
- Retrieve multiple PCM samples and keep track of processing. - Retrieve multiple PCM samples and keep track of processing.
- Rename VIOS metric 'vFC' (storage adapter) to 'virtual'. - Rename VIOS metric 'vFC' (storage adapter) to 'virtual'.
## [1.4.0] - 2022-12-01 ## 1.4.0 - 2022-12-01
- Rewrite of toml+xml+json de-serialization code (uses jackson now). - Rewrite of toml+xml+json de-serialization code (uses jackson now).
- Changes to configuration file format - please look at [doc/hmci.toml](doc/hmci.toml) as example. - Changes to configuration file format - please look at [doc/hmci.toml](doc/hmci.toml) as example.
- Logging (write to file) JSON output from HMC is currently not possible. - Logging (write to file) JSON output from HMC is currently not possible.
## [1.3.3] - 2022-09-20 ## 1.3.3 - 2022-09-20
- Default configuration location on Windows platform. - Default configuration location on Windows platform.
- Process LPAR SR-IOV logical network ports data - Process LPAR SR-IOV logical network ports data
- Update default dashboards - Update default dashboards
- Update documentation - Update documentation
## [1.3.0] - 2022-02-04 ## 1.3.0 - 2022-02-04
- Correct use of InfluxDB batch writing. - Correct use of InfluxDB batch writing.
## [1.2.8] - 2022-02-28 ## 1.2.8 - 2022-02-28
- Sort measurement tags before writing to InfluxDB. - Sort measurement tags before writing to InfluxDB.
- Update 3rd party dependencies. - Update 3rd party dependencies.
## [1.2.7] - 2022-02-24 ## 1.2.7 - 2022-02-24
- Options to include/exclude Managed Systems and/or Logical Partitions. - Options to include/exclude Managed Systems and/or Logical Partitions.
[1.4.2]: https://bitbucket.org/mnellemann/hmci/branches/compare/v1.4.2%0Dv1.4.1
[1.4.1]: https://bitbucket.org/mnellemann/hmci/branches/compare/v1.4.1%0Dv1.4.0
[1.4.0]: https://bitbucket.org/mnellemann/hmci/branches/compare/v1.4.0%0Dv1.3.3
[1.3.3]: https://bitbucket.org/mnellemann/hmci/branches/compare/v1.3.3%0Dv1.3.0
[1.3.0]: https://bitbucket.org/mnellemann/hmci/branches/compare/v1.3.0%0Dv1.2.8
[1.2.8]: https://bitbucket.org/mnellemann/hmci/branches/compare/v1.2.8%0Dv1.2.7
[1.2.7]: https://bitbucket.org/mnellemann/hmci/branches/compare/v1.2.7%0Dv1.2.6
[1.2.6]: https://bitbucket.org/mnellemann/hmci/branches/compare/v1.2.6%0Dv1.2.5

View File

@ -390,7 +390,7 @@
"measurement": "lpar_details", "measurement": "lpar_details",
"orderByTime": "ASC", "orderByTime": "ASC",
"policy": "default", "policy": "default",
"query": "SELECT last(\"weight\") AS \"Weight\", last(\"mode\") AS \"Mode\", last(\"entitledProcUnits\") AS \"eCPU\", mean(\"utilizedProcUnits\") / mean(\"entitledProcUnits\")*100 AS \"Utilization eCPU\", last(\"currentVirtualProcessors\") AS \"vCPU\", mean(\"utilizedProcUnits\") / mean(\"maxProcUnits\") * 100 AS \"Utilization vCPU\" FROM \"lpar_processor\" WHERE (\"servername\" =~ /^$ServerName$/) AND (\"lparname\" =~ /^$LPAR$/) AND $timeFilter GROUP BY \"lparname\" fill(previous)", "query": "SELECT last(\"weight\") AS \"Weight\", last(\"mode\") AS \"Mode\", last(\"entitledProcUnits\") AS \"eCPU\", mean(\"utilizedProcUnits\") / mean(\"entitledProcUnits\")*100 AS \"Utilization eCPU\", last(\"currentVirtualProcessors\") AS \"vCPU\", mean(\"utilizedProcUnits\") / mean(\"currentVirtualProcessors\") * 100 AS \"Utilization vCPU\" FROM \"lpar_processor\" WHERE (\"servername\" =~ /^$ServerName$/) AND (\"lparname\" =~ /^$LPAR$/) AND $timeFilter GROUP BY \"lparname\" fill(previous)",
"queryType": "randomWalk", "queryType": "randomWalk",
"rawQuery": true, "rawQuery": true,
"refId": "A", "refId": "A",
@ -534,6 +534,7 @@
"type": "influxdb", "type": "influxdb",
"uid": "${DS_HMCI}" "uid": "${DS_HMCI}"
}, },
"description": "",
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
"color": { "color": {
@ -640,7 +641,7 @@
"measurement": "/^$ServerName$/", "measurement": "/^$ServerName$/",
"orderByTime": "ASC", "orderByTime": "ASC",
"policy": "default", "policy": "default",
"query": "SELECT (mean(\"utilizedProcUnits\") / mean(\"maxProcUnits\")) * 100 AS \"usage\" FROM \"lpar_processor\" WHERE (\"servername\" =~ /^$ServerName$/ AND \"lparname\" =~ /^$LPAR$/) AND $timeFilter GROUP BY time($interval), \"lparname\", \"servername\" fill(linear)", "query": "SELECT (mean(\"utilizedProcUnits\") / mean(\"entitledProcUnits\")) * 100 AS \"usage\" FROM \"lpar_processor\" WHERE (\"servername\" =~ /^$ServerName$/ AND \"lparname\" =~ /^$LPAR$/) AND $timeFilter GROUP BY time($interval), \"lparname\", \"servername\" fill(linear)",
"rawQuery": true, "rawQuery": true,
"refId": "A", "refId": "A",
"resultFormat": "time_series", "resultFormat": "time_series",
@ -661,7 +662,7 @@
"tags": [] "tags": []
} }
], ],
"title": "Processor Units - Utilization Percentage", "title": "Processor Units - Utilization / Entitled Percentage",
"transformations": [], "transformations": [],
"type": "timeseries" "type": "timeseries"
}, },
@ -2710,6 +2711,6 @@
"timezone": "browser", "timezone": "browser",
"title": "HMCi - Power LPAR Overview", "title": "HMCi - Power LPAR Overview",
"uid": "Xl7oHESGz", "uid": "Xl7oHESGz",
"version": 4, "version": 3,
"weekStart": "" "weekStart": ""
} }

View File

@ -1,7 +1,7 @@
{ {
"__inputs": [ "__inputs": [
{ {
"name": "DS_INFLUXDB", "name": "DS_HMCI",
"label": "Database", "label": "Database",
"description": "", "description": "",
"type": "datasource", "type": "datasource",
@ -15,7 +15,7 @@
"type": "grafana", "type": "grafana",
"id": "grafana", "id": "grafana",
"name": "Grafana", "name": "Grafana",
"version": "9.1.3" "version": "9.1.6"
}, },
{ {
"type": "datasource", "type": "datasource",
@ -71,7 +71,7 @@
{ {
"datasource": { "datasource": {
"type": "influxdb", "type": "influxdb",
"uid": "${DS_INFLUXDB}" "uid": "${DS_HMCI}"
}, },
"gridPos": { "gridPos": {
"h": 3, "h": 3,
@ -84,12 +84,12 @@
"content": "## Metrics collected from IBM Power HMC\n \nFor more information visit: [git.data.coop/nellemann/hmci](https://git.data.coop/nellemann/hmci)\n ", "content": "## Metrics collected from IBM Power HMC\n \nFor more information visit: [git.data.coop/nellemann/hmci](https://git.data.coop/nellemann/hmci)\n ",
"mode": "markdown" "mode": "markdown"
}, },
"pluginVersion": "9.1.3", "pluginVersion": "9.1.6",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
"type": "influxdb", "type": "influxdb",
"uid": "${DS_INFLUXDB}" "uid": "${DS_HMCI}"
}, },
"refId": "A" "refId": "A"
} }
@ -100,7 +100,7 @@
{ {
"datasource": { "datasource": {
"type": "influxdb", "type": "influxdb",
"uid": "${DS_INFLUXDB}" "uid": "${DS_HMCI}"
}, },
"description": "", "description": "",
"fieldConfig": { "fieldConfig": {
@ -189,7 +189,7 @@
"alias": "$tag_lparname", "alias": "$tag_lparname",
"datasource": { "datasource": {
"type": "influxdb", "type": "influxdb",
"uid": "${DS_INFLUXDB}" "uid": "${DS_HMCI}"
}, },
"groupBy": [ "groupBy": [
{ {
@ -209,7 +209,7 @@
"measurement": "/^$ServerName$/", "measurement": "/^$ServerName$/",
"orderByTime": "ASC", "orderByTime": "ASC",
"policy": "default", "policy": "default",
"query": "SELECT mean(\"utilizedProcUnits\") / mean(\"maxProcUnits\") AS \"usage\" FROM \"lpar_processor\" WHERE (\"servername\" =~ /^$ServerName$/ AND \"lparname\" =~ /^$LPAR$/) AND $timeFilter GROUP BY time($interval), \"lparname\", \"servername\" fill(none)", "query": "SELECT mean(\"utilizedProcUnits\") / mean(\"currentVirtualProcessors\") AS \"usage\" FROM \"lpar_processor\" WHERE (\"servername\" =~ /^$ServerName$/ AND \"lparname\" =~ /^$LPAR$/) AND $timeFilter GROUP BY time($interval), \"lparname\", \"servername\" fill(none)",
"rawQuery": true, "rawQuery": true,
"refId": "A", "refId": "A",
"resultFormat": "time_series", "resultFormat": "time_series",
@ -237,7 +237,7 @@
{ {
"datasource": { "datasource": {
"type": "influxdb", "type": "influxdb",
"uid": "${DS_INFLUXDB}" "uid": "${DS_HMCI}"
}, },
"description": "", "description": "",
"fieldConfig": { "fieldConfig": {
@ -319,7 +319,7 @@
"alias": "$tag_servername - $tag_lparname ($col)", "alias": "$tag_servername - $tag_lparname ($col)",
"datasource": { "datasource": {
"type": "influxdb", "type": "influxdb",
"uid": "${DS_INFLUXDB}" "uid": "${DS_HMCI}"
}, },
"dsType": "influxdb", "dsType": "influxdb",
"groupBy": [ "groupBy": [
@ -419,7 +419,7 @@
{ {
"datasource": { "datasource": {
"type": "influxdb", "type": "influxdb",
"uid": "${DS_INFLUXDB}" "uid": "${DS_HMCI}"
}, },
"description": "", "description": "",
"fieldConfig": { "fieldConfig": {
@ -497,7 +497,7 @@
"alias": "$tag_servername - $tag_lparname ($col)", "alias": "$tag_servername - $tag_lparname ($col)",
"datasource": { "datasource": {
"type": "influxdb", "type": "influxdb",
"uid": "${DS_INFLUXDB}" "uid": "${DS_HMCI}"
}, },
"dsType": "influxdb", "dsType": "influxdb",
"groupBy": [ "groupBy": [
@ -620,7 +620,7 @@
"current": {}, "current": {},
"datasource": { "datasource": {
"type": "influxdb", "type": "influxdb",
"uid": "${DS_INFLUXDB}" "uid": "${DS_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",
"hide": 0, "hide": 0,
@ -644,7 +644,7 @@
"current": {}, "current": {},
"datasource": { "datasource": {
"type": "influxdb", "type": "influxdb",
"uid": "${DS_INFLUXDB}" "uid": "${DS_HMCI}"
}, },
"definition": "SHOW TAG VALUES FROM \"lpar_processor\" WITH KEY = \"lparname\" WHERE servername =~ /$ServerName/", "definition": "SHOW TAG VALUES FROM \"lpar_processor\" WITH KEY = \"lparname\" WHERE servername =~ /$ServerName/",
"hide": 0, "hide": 0,
@ -697,6 +697,6 @@
"timezone": "browser", "timezone": "browser",
"title": "HMCi - Power LPAR Utilization", "title": "HMCi - Power LPAR Utilization",
"uid": "jFsbpTH4k", "uid": "jFsbpTH4k",
"version": 4, "version": 2,
"weekStart": "" "weekStart": ""
} }

View File

@ -115,6 +115,370 @@
"transparent": true, "transparent": true,
"type": "text" "type": "text"
}, },
{
"datasource": {
"type": "influxdb",
"uid": "${DS_HMCI}"
},
"description": "",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "cores",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 10,
"gradientMode": "opacity",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"decimals": 2,
"links": [],
"mappings": [],
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"unit": "short"
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 12,
"x": 0,
"y": 3
},
"id": 31,
"links": [],
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "multi",
"sort": "desc"
}
},
"pluginVersion": "8.1.4",
"targets": [
{
"alias": "$col",
"datasource": {
"type": "influxdb",
"uid": "${DS_HMCI}"
},
"dsType": "influxdb",
"groupBy": [
{
"params": [
"$interval"
],
"type": "time"
},
{
"params": [
"servername"
],
"type": "tag"
},
{
"params": [
"none"
],
"type": "fill"
}
],
"hide": false,
"measurement": "server_processor",
"orderByTime": "ASC",
"policy": "default",
"refId": "A",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"utilizedProcUnits"
],
"type": "field"
},
{
"params": [],
"type": "mean"
},
{
"params": [
"utlized"
],
"type": "alias"
}
],
[
{
"params": [
"totalProcUnits"
],
"type": "field"
},
{
"params": [],
"type": "mean"
},
{
"params": [
"total"
],
"type": "alias"
}
],
[
{
"params": [
"availableProcUnits"
],
"type": "field"
},
{
"params": [],
"type": "mean"
},
{
"params": [
"available"
],
"type": "alias"
}
],
[
{
"params": [
"configurableProcUnits"
],
"type": "field"
},
{
"params": [],
"type": "mean"
},
{
"params": [
"configurable"
],
"type": "alias"
}
]
],
"tags": [
{
"key": "servername",
"operator": "=~",
"value": "/^$ServerName$/"
}
]
}
],
"title": "System Processor Utilization",
"type": "timeseries"
},
{
"datasource": {
"type": "influxdb",
"uid": "${DS_HMCI}"
},
"description": "",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "Memory",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 10,
"gradientMode": "opacity",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"links": [],
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "decmbytes"
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 12,
"x": 12,
"y": 3
},
"id": 2,
"links": [],
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "multi",
"sort": "none"
}
},
"pluginVersion": "8.1.4",
"targets": [
{
"alias": "$col",
"datasource": {
"type": "influxdb",
"uid": "${DS_HMCI}"
},
"dsType": "influxdb",
"groupBy": [
{
"params": [
"$interval"
],
"type": "time"
},
{
"params": [
"servername"
],
"type": "tag"
},
{
"params": [
"none"
],
"type": "fill"
}
],
"hide": false,
"measurement": "server_memory",
"orderByTime": "ASC",
"policy": "default",
"refId": "A",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"assignedMemToLpars"
],
"type": "field"
},
{
"params": [],
"type": "mean"
},
{
"params": [
"assigned"
],
"type": "alias"
}
],
[
{
"params": [
"availableMem"
],
"type": "field"
},
{
"params": [],
"type": "mean"
},
{
"params": [
"available"
],
"type": "alias"
}
]
],
"tags": [
{
"key": "servername",
"operator": "=~",
"value": "/^$ServerName$/"
}
]
}
],
"title": "System Memory Utilization",
"type": "timeseries"
},
{ {
"datasource": { "datasource": {
"type": "influxdb", "type": "influxdb",
@ -181,7 +545,7 @@
"h": 9, "h": 9,
"w": 15, "w": 15,
"x": 0, "x": 0,
"y": 3 "y": 9
}, },
"id": 19, "id": 19,
"links": [], "links": [],
@ -304,7 +668,7 @@
"h": 9, "h": 9,
"w": 5, "w": 5,
"x": 15, "x": 15,
"y": 3 "y": 9
}, },
"id": 29, "id": 29,
"options": { "options": {
@ -379,7 +743,7 @@
] ]
} }
], ],
"title": "Shared Processor Pools - Utilization / Assigned", "title": "Shared Processor Pools - Utilization",
"type": "stat" "type": "stat"
}, },
{ {
@ -418,7 +782,7 @@
"h": 9, "h": 9,
"w": 4, "w": 4,
"x": 20, "x": 20,
"y": 3 "y": 9
}, },
"id": 30, "id": 30,
"options": { "options": {
@ -491,7 +855,7 @@
] ]
} }
], ],
"title": "Processors - Utilization / Total", "title": "System Processors - Utilization",
"type": "gauge" "type": "gauge"
}, },
{ {
@ -554,9 +918,9 @@
}, },
"gridPos": { "gridPos": {
"h": 9, "h": 9,
"w": 8, "w": 12,
"x": 0, "x": 0,
"y": 12 "y": 18
}, },
"id": 27, "id": 27,
"links": [], "links": [],
@ -753,212 +1117,11 @@
}, },
"gridPos": { "gridPos": {
"h": 9, "h": 9,
"w": 8, "w": 12,
"x": 8, "x": 12,
"y": 12 "y": 18
}, },
"id": 31, "id": 35,
"links": [],
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "multi",
"sort": "desc"
}
},
"pluginVersion": "8.1.4",
"targets": [
{
"alias": "$col",
"datasource": {
"type": "influxdb",
"uid": "${DS_HMCI}"
},
"dsType": "influxdb",
"groupBy": [
{
"params": [
"$interval"
],
"type": "time"
},
{
"params": [
"servername"
],
"type": "tag"
},
{
"params": [
"none"
],
"type": "fill"
}
],
"hide": false,
"measurement": "server_processor",
"orderByTime": "ASC",
"policy": "default",
"refId": "A",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"utilizedProcUnits"
],
"type": "field"
},
{
"params": [],
"type": "mean"
},
{
"params": [
"utlized"
],
"type": "alias"
}
],
[
{
"params": [
"totalProcUnits"
],
"type": "field"
},
{
"params": [],
"type": "mean"
},
{
"params": [
"total"
],
"type": "alias"
}
],
[
{
"params": [
"availableProcUnits"
],
"type": "field"
},
{
"params": [],
"type": "mean"
},
{
"params": [
"available"
],
"type": "alias"
}
],
[
{
"params": [
"configurableProcUnits"
],
"type": "field"
},
{
"params": [],
"type": "mean"
},
{
"params": [
"configured"
],
"type": "alias"
}
]
],
"tags": [
{
"key": "servername",
"operator": "=~",
"value": "/^$ServerName$/"
}
]
}
],
"title": "Processor - Core Utilization",
"type": "timeseries"
},
{
"datasource": {
"type": "influxdb",
"uid": "${DS_HMCI}"
},
"description": "",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "Memory",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 10,
"gradientMode": "opacity",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"links": [],
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "decmbytes"
},
"overrides": []
},
"gridPos": {
"h": 9,
"w": 8,
"x": 16,
"y": 12
},
"id": 2,
"links": [], "links": [],
"options": { "options": {
"legend": { "legend": {
@ -975,7 +1138,7 @@
"pluginVersion": "8.1.4", "pluginVersion": "8.1.4",
"targets": [ "targets": [
{ {
"alias": "$col", "alias": "$tag_poolname",
"datasource": { "datasource": {
"type": "influxdb", "type": "influxdb",
"uid": "${DS_HMCI}" "uid": "${DS_HMCI}"
@ -990,7 +1153,7 @@
}, },
{ {
"params": [ "params": [
"servername" "poolname"
], ],
"type": "tag" "type": "tag"
}, },
@ -1002,7 +1165,7 @@
} }
], ],
"hide": false, "hide": false,
"measurement": "server_memory", "measurement": "server_sharedProcessorPool",
"orderByTime": "ASC", "orderByTime": "ASC",
"policy": "default", "policy": "default",
"refId": "A", "refId": "A",
@ -1011,7 +1174,7 @@
[ [
{ {
"params": [ "params": [
"assignedMemToLpars" "availableProcUnits"
], ],
"type": "field" "type": "field"
}, },
@ -1021,25 +1184,7 @@
}, },
{ {
"params": [ "params": [
"assigned" "utlized"
],
"type": "alias"
}
],
[
{
"params": [
"availableMem"
],
"type": "field"
},
{
"params": [],
"type": "mean"
},
{
"params": [
"available"
], ],
"type": "alias" "type": "alias"
} }
@ -1054,7 +1199,7 @@
] ]
} }
], ],
"title": "Memory Utilization", "title": "Shared Processor Pools - Core Utilization",
"type": "timeseries" "type": "timeseries"
}, },
{ {
@ -1150,7 +1295,7 @@
"h": 9, "h": 9,
"w": 12, "w": 12,
"x": 0, "x": 0,
"y": 21 "y": 27
}, },
"id": 11, "id": 11,
"links": [], "links": [],
@ -1297,7 +1442,7 @@
"h": 9, "h": 9,
"w": 12, "w": 12,
"x": 12, "x": 12,
"y": 21 "y": 27
}, },
"id": 16, "id": 16,
"links": [], "links": [],
@ -1414,7 +1559,7 @@
"h": 10, "h": 10,
"w": 12, "w": 12,
"x": 0, "x": 0,
"y": 30 "y": 36
}, },
"id": 26, "id": 26,
"options": { "options": {
@ -1614,7 +1759,7 @@
"h": 10, "h": 10,
"w": 6, "w": 6,
"x": 12, "x": 12,
"y": 30 "y": 36
}, },
"id": 34, "id": 34,
"options": { "options": {
@ -1749,7 +1894,7 @@
"h": 10, "h": 10,
"w": 6, "w": 6,
"x": 18, "x": 18,
"y": 30 "y": 36
}, },
"id": 22, "id": 22,
"options": { "options": {

View File

@ -1,7 +1,7 @@
{ {
"__inputs": [ "__inputs": [
{ {
"name": "DS_INFLUXDB", "name": "DS_HMCI",
"label": "Database", "label": "Database",
"description": "", "description": "",
"type": "datasource", "type": "datasource",
@ -90,7 +90,7 @@
{ {
"datasource": { "datasource": {
"type": "influxdb", "type": "influxdb",
"uid": "${DS_INFLUXDB}" "uid": "${DS_HMCI}"
}, },
"gridPos": { "gridPos": {
"h": 3, "h": 3,
@ -108,7 +108,7 @@
{ {
"datasource": { "datasource": {
"type": "influxdb", "type": "influxdb",
"uid": "${DS_INFLUXDB}" "uid": "${DS_HMCI}"
}, },
"refId": "A" "refId": "A"
} }
@ -147,7 +147,7 @@
"alias": "$tag_servername", "alias": "$tag_servername",
"datasource": { "datasource": {
"type": "influxdb", "type": "influxdb",
"uid": "${DS_INFLUXDB}" "uid": "${DS_HMCI}"
}, },
"groupBy": [ "groupBy": [
{ {
@ -273,7 +273,7 @@
"alias": "$tag_servername", "alias": "$tag_servername",
"datasource": { "datasource": {
"type": "influxdb", "type": "influxdb",
"uid": "${DS_INFLUXDB}" "uid": "${DS_HMCI}"
}, },
"groupBy": [ "groupBy": [
{ {
@ -381,7 +381,7 @@
"alias": "$tag_servername", "alias": "$tag_servername",
"datasource": { "datasource": {
"type": "influxdb", "type": "influxdb",
"uid": "${DS_INFLUXDB}" "uid": "${DS_HMCI}"
}, },
"groupBy": [ "groupBy": [
{ {
@ -482,7 +482,7 @@
"alias": "$tag_servername", "alias": "$tag_servername",
"datasource": { "datasource": {
"type": "influxdb", "type": "influxdb",
"uid": "${DS_INFLUXDB}" "uid": "${DS_HMCI}"
}, },
"groupBy": [ "groupBy": [
{ {
@ -597,7 +597,7 @@
"alias": "$tag_servername", "alias": "$tag_servername",
"datasource": { "datasource": {
"type": "influxdb", "type": "influxdb",
"uid": "${DS_INFLUXDB}" "uid": "${DS_HMCI}"
}, },
"dsType": "influxdb", "dsType": "influxdb",
"groupBy": [ "groupBy": [

View File

@ -445,12 +445,7 @@
"show": false "show": false
}, },
"showHeader": true, "showHeader": true,
"sortBy": [ "sortBy": []
{
"desc": true,
"displayName": "Utilization"
}
]
}, },
"pluginVersion": "9.1.6", "pluginVersion": "9.1.6",
"targets": [ "targets": [
@ -472,7 +467,7 @@
"measurement": "lpar_details", "measurement": "lpar_details",
"orderByTime": "ASC", "orderByTime": "ASC",
"policy": "default", "policy": "default",
"query": "SELECT last(\"weight\") AS \"Weight\", last(\"entitledProcUnits\") AS \"Entitled\", last(\"currentVirtualProcessors\") AS \"VP\", (last(\"utilizedProcUnits\") / last(\"maxProcUnits\")) * 100 AS \"Utilization\", last(\"mode\") AS \"Mode\" FROM \"vios_processor\" WHERE (\"servername\" =~ /^$ServerName$/) AND (\"viosname\" =~ /^$ViosName$/) AND $timeFilter GROUP BY \"viosname\" fill(previous)", "query": "SELECT last(\"weight\") AS \"Weight\", last(\"entitledProcUnits\") AS \"Entitled\", last(\"currentVirtualProcessors\") AS \"VP\", (mean(\"utilizedProcUnits\") / mean(\"entitledProcUnits\")) * 100 AS \"Utilization\", last(\"mode\") AS \"Mode\" FROM \"vios_processor\" WHERE (\"servername\" =~ /^$ServerName$/) AND (\"viosname\" =~ /^$ViosName$/) AND $timeFilter GROUP BY \"viosname\" fill(previous)",
"queryType": "randomWalk", "queryType": "randomWalk",
"rawQuery": true, "rawQuery": true,
"refId": "A", "refId": "A",
@ -1395,8 +1390,7 @@
"mode": "absolute", "mode": "absolute",
"steps": [ "steps": [
{ {
"color": "green", "color": "green"
"value": null
} }
] ]
}, },
@ -1569,8 +1563,7 @@
"mode": "absolute", "mode": "absolute",
"steps": [ "steps": [
{ {
"color": "green", "color": "green"
"value": null
}, },
{ {
"color": "red", "color": "red",

View File

@ -1,7 +1,7 @@
{ {
"__inputs": [ "__inputs": [
{ {
"name": "DS_INFLUXDB", "name": "DS_HMCI",
"label": "Database", "label": "Database",
"description": "", "description": "",
"type": "datasource", "type": "datasource",
@ -21,7 +21,7 @@
"type": "grafana", "type": "grafana",
"id": "grafana", "id": "grafana",
"name": "Grafana", "name": "Grafana",
"version": "9.1.3" "version": "9.1.6"
}, },
{ {
"type": "datasource", "type": "datasource",
@ -77,7 +77,7 @@
{ {
"datasource": { "datasource": {
"type": "influxdb", "type": "influxdb",
"uid": "${DS_INFLUXDB}" "uid": "${DS_HMCI}"
}, },
"gridPos": { "gridPos": {
"h": 3, "h": 3,
@ -90,12 +90,12 @@
"content": "## Metrics collected from IBM Power HMC\n \nFor more information visit: [git.data.coop/nellemann/hmci](https://git.data.coop/nellemann/hmci)\n ", "content": "## Metrics collected from IBM Power HMC\n \nFor more information visit: [git.data.coop/nellemann/hmci](https://git.data.coop/nellemann/hmci)\n ",
"mode": "markdown" "mode": "markdown"
}, },
"pluginVersion": "9.1.3", "pluginVersion": "9.1.6",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
"type": "influxdb", "type": "influxdb",
"uid": "${DS_INFLUXDB}" "uid": "${DS_HMCI}"
}, },
"refId": "A" "refId": "A"
} }
@ -106,7 +106,7 @@
{ {
"datasource": { "datasource": {
"type": "influxdb", "type": "influxdb",
"uid": "${DS_INFLUXDB}" "uid": "${DS_HMCI}"
}, },
"description": "", "description": "",
"fieldConfig": { "fieldConfig": {
@ -155,13 +155,13 @@
"showThresholdLabels": false, "showThresholdLabels": false,
"showThresholdMarkers": false "showThresholdMarkers": false
}, },
"pluginVersion": "9.1.3", "pluginVersion": "9.1.6",
"targets": [ "targets": [
{ {
"alias": "$tag_servername - $tag_viosname", "alias": "$tag_servername - $tag_viosname",
"datasource": { "datasource": {
"type": "influxdb", "type": "influxdb",
"uid": "${DS_INFLUXDB}" "uid": "${DS_HMCI}"
}, },
"dsType": "influxdb", "dsType": "influxdb",
"groupBy": [ "groupBy": [
@ -194,7 +194,7 @@
"measurement": "vios_processor", "measurement": "vios_processor",
"orderByTime": "ASC", "orderByTime": "ASC",
"policy": "default", "policy": "default",
"query": "SELECT last(\"utilizedProcUnits\") / last(\"maxProcUnits\") AS \"utilization\" FROM \"vios_processor\" WHERE (\"servername\" =~ /^$ServerName$/ AND \"viosname\" =~ /^$ViosName$/) AND $timeFilter GROUP BY time($interval), \"viosname\", \"servername\" fill(none)", "query": "SELECT mean(\"utilizedProcUnits\") / mean(\"entitledProcUnits\") AS \"utilization\" FROM \"vios_processor\" WHERE (\"servername\" =~ /^$ServerName$/ AND \"viosname\" =~ /^$ViosName$/) AND $timeFilter GROUP BY time($interval), \"viosname\", \"servername\" fill(none)",
"rawQuery": true, "rawQuery": true,
"refId": "A", "refId": "A",
"resultFormat": "time_series", "resultFormat": "time_series",
@ -257,7 +257,7 @@
{ {
"datasource": { "datasource": {
"type": "influxdb", "type": "influxdb",
"uid": "${DS_INFLUXDB}" "uid": "${DS_HMCI}"
}, },
"description": "", "description": "",
"fieldConfig": { "fieldConfig": {
@ -344,7 +344,7 @@
"alias": "$tag_servername - $tag_viosname", "alias": "$tag_servername - $tag_viosname",
"datasource": { "datasource": {
"type": "influxdb", "type": "influxdb",
"uid": "${DS_INFLUXDB}" "uid": "${DS_HMCI}"
}, },
"dsType": "influxdb", "dsType": "influxdb",
"groupBy": [ "groupBy": [
@ -377,7 +377,7 @@
"measurement": "vios_processor", "measurement": "vios_processor",
"orderByTime": "ASC", "orderByTime": "ASC",
"policy": "default", "policy": "default",
"query": "SELECT mean(\"utilizedProcUnits\") / mean(\"maxProcUnits\") AS \"utilization\" FROM \"vios_processor\" WHERE (\"servername\" =~ /^$ServerName$/ AND \"viosname\" =~ /^$ViosName$/) AND $timeFilter GROUP BY time($interval), \"viosname\", \"servername\" fill(none)", "query": "SELECT mean(\"utilizedProcUnits\") / mean(\"entitledProcUnits\") AS \"utilization\" FROM \"vios_processor\" WHERE (\"servername\" =~ /^$ServerName$/ AND \"viosname\" =~ /^$ViosName$/) AND $timeFilter GROUP BY time($interval), \"viosname\", \"servername\" fill(none)",
"rawQuery": true, "rawQuery": true,
"refId": "A", "refId": "A",
"resultFormat": "time_series", "resultFormat": "time_series",
@ -440,7 +440,7 @@
{ {
"datasource": { "datasource": {
"type": "influxdb", "type": "influxdb",
"uid": "${DS_INFLUXDB}" "uid": "${DS_HMCI}"
}, },
"description": "", "description": "",
"fieldConfig": { "fieldConfig": {
@ -527,7 +527,7 @@
"alias": "$tag_servername - $tag_viosname ($tag_location - $col)", "alias": "$tag_servername - $tag_viosname ($tag_location - $col)",
"datasource": { "datasource": {
"type": "influxdb", "type": "influxdb",
"uid": "${DS_INFLUXDB}" "uid": "${DS_HMCI}"
}, },
"dsType": "influxdb", "dsType": "influxdb",
"groupBy": [ "groupBy": [
@ -645,7 +645,7 @@
{ {
"datasource": { "datasource": {
"type": "influxdb", "type": "influxdb",
"uid": "${DS_INFLUXDB}" "uid": "${DS_HMCI}"
}, },
"description": "", "description": "",
"fieldConfig": { "fieldConfig": {
@ -727,7 +727,7 @@
"alias": "$tag_servername - $tag_viosname ($tag_location - $col)", "alias": "$tag_servername - $tag_viosname ($tag_location - $col)",
"datasource": { "datasource": {
"type": "influxdb", "type": "influxdb",
"uid": "${DS_INFLUXDB}" "uid": "${DS_HMCI}"
}, },
"dsType": "influxdb", "dsType": "influxdb",
"groupBy": [ "groupBy": [
@ -860,7 +860,7 @@
"current": {}, "current": {},
"datasource": { "datasource": {
"type": "influxdb", "type": "influxdb",
"uid": "${DS_INFLUXDB}" "uid": "${DS_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",
"hide": 0, "hide": 0,
@ -884,7 +884,7 @@
"current": {}, "current": {},
"datasource": { "datasource": {
"type": "influxdb", "type": "influxdb",
"uid": "${DS_INFLUXDB}" "uid": "${DS_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",
"hide": 0, "hide": 0,
@ -906,7 +906,7 @@
] ]
}, },
"time": { "time": {
"from": "now-2d", "from": "now-7d",
"now": false, "now": false,
"to": "now-30s" "to": "now-30s"
}, },
@ -937,6 +937,6 @@
"timezone": "browser", "timezone": "browser",
"title": "HMCi - Power VIO Utilization", "title": "HMCi - Power VIO Utilization",
"uid": "DDNEv5vGy", "uid": "DDNEv5vGy",
"version": 10, "version": 2,
"weekStart": "" "weekStart": ""
} }

View File

@ -1,3 +1,3 @@
projectId = hmci projectId = hmci
projectGroup = biz.nellemann.hmci projectGroup = biz.nellemann.hmci
projectVersion = 1.4.2 projectVersion = 1.4.3

View File

@ -23,7 +23,6 @@ import org.influxdb.dto.Point;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import java.time.Instant;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
@ -98,13 +97,6 @@ public final class InfluxClient {
} }
/*
public void write(List<Measurement> measurements, Instant timestamp, String name) {
log.debug("write() - measurement: {} {}", name, measurements.size());
processMeasurementMap(measurements, timestamp, name).forEach( (point) -> { influxDB.write(point); });
}*/
public void write(List<Measurement> measurements, String name) { public void write(List<Measurement> measurements, String name) {
log.debug("write() - measurement: {} {}", name, measurements.size()); log.debug("write() - measurement: {} {}", name, measurements.size());
if(!measurements.isEmpty()) { if(!measurements.isEmpty()) {
@ -115,23 +107,6 @@ public final class InfluxClient {
} }
/*
private List<Point> processMeasurementMap(List<Measurement> measurements, Instant timestamp, String name) {
List<Point> listOfPoints = new ArrayList<>();
measurements.forEach( (m) -> {
Point.Builder builder = Point.measurement(name)
.time(timestamp.getEpochSecond(), TimeUnit.SECONDS)
.tag(m.tags)
.fields(m.fields);
listOfPoints.add(builder.build());
});
return listOfPoints;
}*/
private List<Point> processMeasurementMap(List<Measurement> measurements, String name) { private List<Point> processMeasurementMap(List<Measurement> measurements, String name) {
List<Point> listOfPoints = new ArrayList<>(); List<Point> listOfPoints = new ArrayList<>();
measurements.forEach( (m) -> { measurements.forEach( (m) -> {

View File

@ -23,7 +23,6 @@ import com.fasterxml.jackson.dataformat.xml.XmlMapper;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import java.io.File;
import java.time.Duration; import java.time.Duration;
import java.time.Instant; import java.time.Instant;
import java.time.temporal.ChronoUnit; import java.time.temporal.ChronoUnit;

View File

@ -21,9 +21,9 @@ public abstract class Resource {
private final ArrayList<String> sampleHistory = new ArrayList<>(); private final ArrayList<String> sampleHistory = new ArrayList<>();
protected SystemUtil metric; protected SystemUtil metric;
protected final int maxNumberOfSamples = 60; protected final int MAX_NUMBER_OF_SAMPLES = 60;
protected final int minNumberOfSamples = 5; protected final int MIN_NUMBER_OF_SAMPLES = 5;
protected int noOfSamples = maxNumberOfSamples; protected int noOfSamples = MAX_NUMBER_OF_SAMPLES;
@ -125,8 +125,8 @@ public abstract class Resource {
} }
// Decrease down to minSamples // Decrease down to minSamples
if(noOfSamples > minNumberOfSamples) { if(noOfSamples > MIN_NUMBER_OF_SAMPLES) {
noOfSamples = Math.min( (noOfSamples - 1), Math.max( (noOfSamples - processed) + 5, minNumberOfSamples)); noOfSamples = Math.min( (noOfSamples - 1), Math.max( (noOfSamples - processed) + 5, MIN_NUMBER_OF_SAMPLES));
} }
} }

View File

@ -131,9 +131,7 @@ public class RestClient {
.delete() .delete()
.build(); .build();
String responseBody;
try (Response response = httpClient.newCall(request).execute()) { try (Response response = httpClient.newCall(request).execute()) {
responseBody = Objects.requireNonNull(response.body()).string();
} catch (IOException e) { } catch (IOException e) {
log.warn("logoff() error: {}", e.getMessage()); log.warn("logoff() error: {}", e.getMessage());
} finally { } finally {

View File

@ -2,7 +2,6 @@ package biz.nellemann.hmci.dto.json;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonUnwrapped; import com.fasterxml.jackson.annotation.JsonUnwrapped;
@JsonIgnoreProperties(ignoreUnknown = true) @JsonIgnoreProperties(ignoreUnknown = true)

View File

@ -5,7 +5,6 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import java.io.Serializable; import java.io.Serializable;
import java.util.List;
//@JsonIgnoreProperties({ "author", "etag" }) //@JsonIgnoreProperties({ "author", "etag" })
@JsonIgnoreProperties(ignoreUnknown = true) @JsonIgnoreProperties(ignoreUnknown = true)

View File

@ -6,9 +6,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
import java.io.Serializable; import java.io.Serializable;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Set;
//@JsonIgnoreProperties({ "link" }) //@JsonIgnoreProperties({ "link" })
@JsonIgnoreProperties(ignoreUnknown = true) @JsonIgnoreProperties(ignoreUnknown = true)