- Default configuration location on Windows platform.

- Process LPAR SR-IOV logical network ports data
- Update default dashboards
- Update documentation
This commit is contained in:
Mark Nellemann 2022-09-20 17:55:40 +02:00
parent ec5ab3f706
commit eb4df748e0
22 changed files with 2170 additions and 243 deletions

View file

@ -2,10 +2,12 @@
All notable changes to this project will be documented in this file.
## [1.3.1] - 2022-05-xx
## [1.3.3] - 2022-09-20
### Added
- Default configuration location on Windows platform.
- Process LPAR SR-IOV logical network ports data
- Update default dashboards
- Update documentation
## [1.3.0] - 2022-02-04
### Changed
@ -21,7 +23,7 @@ All notable changes to this project will be documented in this file.
### Added
- Options to include/exclude Managed Systems and/or Logical Partitions.
[1.3.1]: https://bitbucket.org/mnellemann/hmci/branches/compare/v1.3.1%0Dv1.3.0
[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

View file

@ -18,8 +18,6 @@ repositories {
group = projectGroup
version = projectVersion
sourceCompatibility = 1.8
targetCompatibility = 1.8
dependencies {
annotationProcessor 'info.picocli:picocli-codegen:4.6.3'
@ -43,6 +41,11 @@ application {
applicationDefaultJvmArgs = [ "-server", "-Xms64m", "-Xmx512m", "-XX:+UseG1GC" ]
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
test {
useJUnitPlatform()
}

File diff suppressed because it is too large Load diff

View file

@ -1,21 +1,21 @@
{
"__inputs": [
{
"name": "DS_INFLUXDB-HMCI",
"label": "InfluxDB-hmci",
"name": "DS_HMCI",
"label": "hmci",
"description": "",
"type": "datasource",
"pluginId": "influxdb",
"pluginName": "InfluxDB"
}
],
"__elements": [],
"__elements": {},
"__requires": [
{
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "8.4.4"
"version": "9.1.4"
},
{
"type": "datasource",
@ -46,7 +46,10 @@
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
@ -66,11 +69,14 @@
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"id": null,
"iteration": 1651048223174,
"links": [],
"liveNow": false,
"panels": [
{
"datasource": {
"type": "influxdb",
"uid": "${DS_HMCI}"
},
"gridPos": {
"h": 3,
"w": 24,
@ -82,14 +88,23 @@
"content": "## Metrics collected from IBM Power HMC\n \nFor more information: [bitbucket.org/mnellemann/hmci](https://bitbucket.org/mnellemann/hmci)\n ",
"mode": "markdown"
},
"pluginVersion": "8.4.4",
"pluginVersion": "9.1.4",
"targets": [
{
"datasource": {
"type": "influxdb",
"uid": "${DS_HMCI}"
},
"refId": "A"
}
],
"transparent": true,
"type": "text"
},
{
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB-HMCI}"
"uid": "${DS_HMCI}"
},
"description": "",
"fieldConfig": {
@ -98,6 +113,8 @@
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
@ -155,7 +172,8 @@
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom"
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "multi",
@ -166,6 +184,10 @@
"targets": [
{
"alias": "$tag_servername",
"datasource": {
"type": "influxdb",
"uid": "${DS_HMCI}"
},
"groupBy": [
{
"params": [
@ -220,7 +242,7 @@
{
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB-HMCI}"
"uid": "${DS_HMCI}"
},
"fieldConfig": {
"defaults": {
@ -268,10 +290,14 @@
"text": {},
"textMode": "auto"
},
"pluginVersion": "8.4.4",
"pluginVersion": "9.1.4",
"targets": [
{
"alias": "$tag_servername",
"datasource": {
"type": "influxdb",
"uid": "${DS_HMCI}"
},
"groupBy": [
{
"params": [
@ -327,7 +353,7 @@
"collapsed": false,
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB-HMCI}"
"uid": "5KYZifB7z"
},
"gridPos": {
"h": 1,
@ -338,13 +364,22 @@
"id": 9,
"panels": [],
"repeat": "ServerName",
"targets": [
{
"datasource": {
"type": "influxdb",
"uid": "5KYZifB7z"
},
"refId": "A"
}
],
"title": "$ServerName Thermal",
"type": "row"
},
{
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB-HMCI}"
"uid": "${DS_HMCI}"
},
"description": "Inlet air temperature.",
"fieldConfig": {
@ -397,10 +432,14 @@
"text": {},
"textMode": "auto"
},
"pluginVersion": "8.4.4",
"pluginVersion": "9.1.4",
"targets": [
{
"alias": "$tag_servername - $tag_name",
"datasource": {
"type": "influxdb",
"uid": "${DS_HMCI}"
},
"groupBy": [
{
"params": [
@ -455,7 +494,7 @@
{
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB-HMCI}"
"uid": "${DS_HMCI}"
},
"description": "",
"fieldConfig": {
@ -464,6 +503,8 @@
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
@ -524,7 +565,8 @@
"lastNotNull"
],
"displayMode": "list",
"placement": "bottom"
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "multi",
@ -535,6 +577,10 @@
"targets": [
{
"alias": "$col",
"datasource": {
"type": "influxdb",
"uid": "${DS_HMCI}"
},
"groupBy": [
{
"params": [
@ -650,7 +696,7 @@
}
],
"refresh": "30s",
"schemaVersion": 35,
"schemaVersion": 37,
"style": "dark",
"tags": [
"Power"
@ -661,7 +707,7 @@
"current": {},
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB-HMCI}"
"uid": "${DS_HMCI}"
},
"definition": "SHOW TAG VALUES FROM \"server_processor\" WITH KEY = \"servername\" WHERE time > now() - 24h",
"hide": 0,
@ -701,6 +747,6 @@
"timezone": "",
"title": "HMCi - Power System Energy",
"uid": "oHcrgD1Mk",
"version": 4,
"version": 2,
"weekStart": ""
}

View file

@ -1,15 +1,15 @@
{
"__inputs": [
{
"name": "DS_INFLUXDB-HMCI",
"label": "InfluxDB-hmci",
"name": "DS_HMCI",
"label": "hmci",
"description": "",
"type": "datasource",
"pluginId": "influxdb",
"pluginName": "InfluxDB"
}
],
"__elements": [],
"__elements": {},
"__requires": [
{
"type": "panel",
@ -21,7 +21,7 @@
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "8.4.4"
"version": "9.1.4"
},
{
"type": "datasource",
@ -53,7 +53,10 @@
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
@ -74,11 +77,14 @@
"gnetId": 1465,
"graphTooltip": 0,
"id": null,
"iteration": 1651048183794,
"links": [],
"liveNow": false,
"panels": [
{
"datasource": {
"type": "influxdb",
"uid": "${DS_HMCI}"
},
"gridPos": {
"h": 3,
"w": 24,
@ -90,7 +96,16 @@
"content": "## Metrics collected from IBM Power HMC\n \nFor more information: [bitbucket.org/mnellemann/hmci](https://bitbucket.org/mnellemann/hmci)\n ",
"mode": "markdown"
},
"pluginVersion": "8.4.4",
"pluginVersion": "9.1.4",
"targets": [
{
"datasource": {
"type": "influxdb",
"uid": "${DS_HMCI}"
},
"refId": "A"
}
],
"transparent": true,
"type": "text"
},
@ -98,7 +113,7 @@
"collapsed": false,
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB-HMCI}"
"uid": "5KYZifB7z"
},
"gridPos": {
"h": 1,
@ -109,13 +124,22 @@
"id": 20,
"panels": [],
"repeat": "ServerName",
"targets": [
{
"datasource": {
"type": "influxdb",
"uid": "5KYZifB7z"
},
"refId": "A"
}
],
"title": "Server - $ServerName",
"type": "row"
},
{
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB-HMCI}"
"uid": "${DS_HMCI}"
},
"description": "",
"fieldConfig": {
@ -124,6 +148,8 @@
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "cores",
"axisPlacement": "auto",
"barAlignment": 0,
@ -183,7 +209,8 @@
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom"
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "multi",
@ -194,6 +221,10 @@
"targets": [
{
"alias": "$tag_poolname",
"datasource": {
"type": "influxdb",
"uid": "${DS_HMCI}"
},
"dsType": "influxdb",
"groupBy": [
{
@ -268,6 +299,10 @@
"type": "timeseries"
},
{
"datasource": {
"type": "influxdb",
"uid": "${DS_HMCI}"
},
"fieldConfig": {
"defaults": {
"color": {
@ -315,10 +350,14 @@
"text": {},
"textMode": "auto"
},
"pluginVersion": "8.4.4",
"pluginVersion": "9.1.4",
"targets": [
{
"alias": "$tag_poolname",
"datasource": {
"type": "influxdb",
"uid": "${DS_HMCI}"
},
"groupBy": [
{
"params": [
@ -369,10 +408,14 @@
]
}
],
"title": "Shared Processor Pools - Utilization / Assigned",
"title": "Shared Processor Pools - Utilization Percentage",
"type": "stat"
},
{
"datasource": {
"type": "influxdb",
"uid": "${DS_HMCI}"
},
"fieldConfig": {
"defaults": {
"color": {
@ -427,10 +470,14 @@
"showThresholdMarkers": true,
"text": {}
},
"pluginVersion": "8.4.4",
"pluginVersion": "9.1.4",
"targets": [
{
"alias": "",
"datasource": {
"type": "influxdb",
"uid": "${DS_HMCI}"
},
"groupBy": [
{
"params": [
@ -487,7 +534,7 @@
{
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB-HMCI}"
"uid": "${DS_HMCI}"
},
"description": "",
"fieldConfig": {
@ -496,6 +543,8 @@
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "cores",
"axisPlacement": "auto",
"barAlignment": 0,
@ -555,7 +604,8 @@
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom"
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "multi",
@ -566,6 +616,10 @@
"targets": [
{
"alias": "$col",
"datasource": {
"type": "influxdb",
"uid": "${DS_HMCI}"
},
"dsType": "influxdb",
"groupBy": [
{
@ -647,24 +701,6 @@
],
"type": "alias"
}
],
[
{
"params": [
"configuredProcUnits"
],
"type": "field"
},
{
"params": [],
"type": "mean"
},
{
"params": [
"configured"
],
"type": "alias"
}
]
],
"tags": [
@ -680,6 +716,10 @@
"type": "timeseries"
},
{
"datasource": {
"type": "influxdb",
"uid": "${DS_HMCI}"
},
"description": "",
"fieldConfig": {
"defaults": {
@ -687,6 +727,8 @@
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "cores",
"axisPlacement": "auto",
"barAlignment": 0,
@ -746,7 +788,8 @@
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom"
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "multi",
@ -759,7 +802,7 @@
"alias": "$col",
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB-HMCI}"
"uid": "${DS_HMCI}"
},
"dsType": "influxdb",
"groupBy": [
@ -877,7 +920,7 @@
{
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB-HMCI}"
"uid": "${DS_HMCI}"
},
"description": "",
"fieldConfig": {
@ -886,6 +929,8 @@
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "Memory",
"axisPlacement": "auto",
"barAlignment": 0,
@ -944,7 +989,8 @@
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom"
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "multi",
@ -955,6 +1001,10 @@
"targets": [
{
"alias": "$col",
"datasource": {
"type": "influxdb",
"uid": "${DS_HMCI}"
},
"dsType": "influxdb",
"groupBy": [
{
@ -1035,7 +1085,7 @@
{
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB-HMCI}"
"uid": "${DS_HMCI}"
},
"description": "",
"fieldConfig": {
@ -1044,6 +1094,8 @@
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "bytes",
"axisPlacement": "auto",
"barAlignment": 0,
@ -1135,7 +1187,8 @@
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom"
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "multi",
@ -1146,6 +1199,10 @@
"targets": [
{
"alias": "vlan $tag_vlanId - $col bytes",
"datasource": {
"type": "influxdb",
"uid": "${DS_HMCI}"
},
"dsType": "influxdb",
"groupBy": [
{
@ -1233,6 +1290,10 @@
},
{
"alias": "vlan $tag_vlanId - $col pkts",
"datasource": {
"type": "influxdb",
"uid": "${DS_HMCI}"
},
"dsType": "influxdb",
"groupBy": [
{
@ -1327,7 +1388,7 @@
{
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB-HMCI}"
"uid": "${DS_HMCI}"
},
"description": "",
"fieldConfig": {
@ -1336,6 +1397,8 @@
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
@ -1394,7 +1457,8 @@
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom"
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "multi",
@ -1405,6 +1469,10 @@
"targets": [
{
"alias": "$tag_location",
"datasource": {
"type": "influxdb",
"uid": "${DS_HMCI}"
},
"dsType": "influxdb",
"groupBy": [
{
@ -1467,7 +1535,7 @@
{
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB-HMCI}"
"uid": "${DS_HMCI}"
},
"description": "",
"fieldConfig": {
@ -1476,6 +1544,8 @@
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
@ -1534,7 +1604,8 @@
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom"
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "multi",
@ -1545,6 +1616,10 @@
"targets": [
{
"alias": "$col",
"datasource": {
"type": "influxdb",
"uid": "${DS_HMCI}"
},
"groupBy": [
{
"params": [
@ -1661,7 +1736,7 @@
{
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB-HMCI}"
"uid": "${DS_HMCI}"
},
"fieldConfig": {
"defaults": {
@ -1669,6 +1744,8 @@
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
@ -1725,7 +1802,8 @@
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom"
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "multi",
@ -1736,6 +1814,10 @@
"targets": [
{
"alias": "$tag_servername",
"datasource": {
"type": "influxdb",
"uid": "${DS_HMCI}"
},
"groupBy": [
{
"params": [
@ -1789,7 +1871,7 @@
}
],
"refresh": "30s",
"schemaVersion": 35,
"schemaVersion": 37,
"style": "dark",
"tags": [
"Power"
@ -1801,7 +1883,7 @@
"current": {},
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB-HMCI}"
"uid": "${DS_HMCI}"
},
"definition": "SHOW TAG VALUES FROM \"server_processor\" WITH KEY = \"servername\" WHERE time > now() - 24h",
"hide": 0,
@ -1854,6 +1936,6 @@
"timezone": "browser",
"title": "HMCi - Power System Resources",
"uid": "ClJhHPIGz",
"version": 9,
"version": 2,
"weekStart": ""
}

View file

@ -1,15 +1,15 @@
{
"__inputs": [
{
"name": "DS_INFLUXDB-HMCI",
"label": "InfluxDB-hmci",
"name": "DS_HMCI",
"label": "hmci",
"description": "",
"type": "datasource",
"pluginId": "influxdb",
"pluginName": "InfluxDB"
}
],
"__elements": [],
"__elements": {},
"__requires": [
{
"type": "panel",
@ -21,7 +21,7 @@
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "8.4.4"
"version": "9.1.4"
},
{
"type": "datasource",
@ -53,7 +53,10 @@
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
@ -74,11 +77,14 @@
"gnetId": 1465,
"graphTooltip": 0,
"id": null,
"iteration": 1651048201909,
"links": [],
"liveNow": false,
"panels": [
{
"datasource": {
"type": "influxdb",
"uid": "${DS_HMCI}"
},
"gridPos": {
"h": 3,
"w": 24,
@ -90,14 +96,23 @@
"content": "## Metrics collected from IBM Power HMC\n \nFor more information: [bitbucket.org/mnellemann/hmci](https://bitbucket.org/mnellemann/hmci)\n ",
"mode": "markdown"
},
"pluginVersion": "8.4.4",
"pluginVersion": "9.1.4",
"targets": [
{
"datasource": {
"type": "influxdb",
"uid": "${DS_HMCI}"
},
"refId": "A"
}
],
"transparent": true,
"type": "text"
},
{
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB-HMCI}"
"uid": "${DS_HMCI}"
},
"description": "",
"fieldConfig": {
@ -108,7 +123,8 @@
"custom": {
"align": "center",
"displayMode": "auto",
"filterable": true
"filterable": true,
"inspect": false
},
"mappings": [],
"thresholds": {
@ -189,10 +205,14 @@
"showHeader": true,
"sortBy": []
},
"pluginVersion": "8.4.4",
"pluginVersion": "9.1.4",
"targets": [
{
"alias": "Read",
"datasource": {
"type": "influxdb",
"uid": "${DS_HMCI}"
},
"groupBy": [
{
"params": [
@ -294,7 +314,7 @@
{
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB-HMCI}"
"uid": "${DS_HMCI}"
},
"description": "",
"fieldConfig": {
@ -305,7 +325,8 @@
"custom": {
"align": "center",
"displayMode": "auto",
"filterable": true
"filterable": true,
"inspect": false
},
"mappings": [],
"thresholds": {
@ -443,10 +464,14 @@
}
]
},
"pluginVersion": "8.4.4",
"pluginVersion": "9.1.4",
"targets": [
{
"alias": "Read",
"datasource": {
"type": "influxdb",
"uid": "${DS_HMCI}"
},
"groupBy": [
{
"params": [
@ -459,7 +484,7 @@
"measurement": "lpar_details",
"orderByTime": "ASC",
"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(\"maxProcUnits\") 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)",
"queryType": "randomWalk",
"rawQuery": true,
"refId": "A",
@ -562,7 +587,7 @@
{
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB-HMCI}"
"uid": "${DS_HMCI}"
},
"description": "",
"fieldConfig": {
@ -612,10 +637,14 @@
"showThresholdMarkers": true,
"text": {}
},
"pluginVersion": "8.4.4",
"pluginVersion": "9.1.4",
"targets": [
{
"alias": "$tag_viosname",
"datasource": {
"type": "influxdb",
"uid": "${DS_HMCI}"
},
"dsType": "influxdb",
"groupBy": [
{
@ -678,7 +707,7 @@
{
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB-HMCI}"
"uid": "${DS_HMCI}"
},
"description": "",
"fieldConfig": {
@ -687,6 +716,8 @@
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
@ -745,7 +776,8 @@
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom"
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "multi",
@ -756,6 +788,10 @@
"targets": [
{
"alias": "$tag_viosname - $col",
"datasource": {
"type": "influxdb",
"uid": "${DS_HMCI}"
},
"dsType": "influxdb",
"groupBy": [
{
@ -846,6 +882,10 @@
"type": "timeseries"
},
{
"datasource": {
"type": "influxdb",
"uid": "${DS_HMCI}"
},
"description": "",
"fieldConfig": {
"defaults": {
@ -853,6 +893,8 @@
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
@ -907,7 +949,8 @@
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom"
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "multi",
@ -920,7 +963,7 @@
"alias": "$tag_viosname - $tag_location (shared)",
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB-HMCI}"
"uid": "${DS_HMCI}"
},
"dsType": "influxdb",
"groupBy": [
@ -993,7 +1036,7 @@
"alias": "$tag_viosname - $tag_location (generic)",
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB-HMCI}"
"uid": "${DS_HMCI}"
},
"dsType": "influxdb",
"groupBy": [
@ -1060,7 +1103,7 @@
"alias": "$tag_viosname - $tag_location (virtual)",
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB-HMCI}"
"uid": "${DS_HMCI}"
},
"dsType": "influxdb",
"groupBy": [
@ -1122,6 +1165,10 @@
"type": "timeseries"
},
{
"datasource": {
"type": "influxdb",
"uid": "${DS_HMCI}"
},
"description": "",
"fieldConfig": {
"defaults": {
@ -1129,6 +1176,8 @@
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
@ -1187,7 +1236,8 @@
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom"
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "multi",
@ -1200,7 +1250,7 @@
"alias": "$tag_viosname - $tag_id ($tag_location)",
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB-HMCI}"
"uid": "${DS_HMCI}"
},
"dsType": "influxdb",
"groupBy": [
@ -1280,6 +1330,10 @@
"type": "timeseries"
},
{
"datasource": {
"type": "influxdb",
"uid": "${DS_HMCI}"
},
"description": "",
"fieldConfig": {
"defaults": {
@ -1287,6 +1341,8 @@
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
@ -1320,8 +1376,7 @@
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
"color": "green"
}
]
},
@ -1354,7 +1409,8 @@
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom"
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "multi",
@ -1367,7 +1423,7 @@
"alias": "$tag_viosname - $tag_location",
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB-HMCI}"
"uid": "${DS_HMCI}"
},
"dsType": "influxdb",
"groupBy": [
@ -1441,6 +1497,10 @@
"type": "timeseries"
},
{
"datasource": {
"type": "influxdb",
"uid": "${DS_HMCI}"
},
"description": "",
"fieldConfig": {
"defaults": {
@ -1448,6 +1508,8 @@
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
@ -1481,8 +1543,7 @@
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
"color": "green"
},
{
"color": "red",
@ -1506,7 +1567,8 @@
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom"
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "multi",
@ -1519,7 +1581,7 @@
"alias": "$tag_viosname - $tag_id ($tag_location)",
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB-HMCI}"
"uid": "${DS_HMCI}"
},
"dsType": "influxdb",
"groupBy": [
@ -1600,7 +1662,7 @@
}
],
"refresh": "30s",
"schemaVersion": 35,
"schemaVersion": 37,
"style": "dark",
"tags": [
"Power",
@ -1614,11 +1676,11 @@
"current": {},
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB-HMCI}"
"uid": "${DS_HMCI}"
},
"definition": "SHOW TAG VALUES FROM \"server_processor\" WITH KEY = \"servername\" WHERE time > now() - 24h",
"hide": 0,
"includeAll": false,
"includeAll": true,
"label": "Server",
"multi": true,
"multiFormat": "regex values",
@ -1638,7 +1700,7 @@
"current": {},
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB-HMCI}"
"uid": "${DS_HMCI}"
},
"definition": "SHOW TAG VALUES FROM \"vios_details\" WITH KEY = \"viosname\" WHERE servername =~ /$ServerName/ AND time > now() - 24h",
"hide": 0,
@ -1660,7 +1722,7 @@
]
},
"time": {
"from": "now-6h",
"from": "now-24h",
"now": false,
"to": "now-30s"
},
@ -1691,6 +1753,6 @@
"timezone": "browser",
"title": "HMCi - Power Virtual I/O Servers",
"uid": "DDNEv5vGz",
"version": 7,
"version": 2,
"weekStart": ""
}

View file

@ -1 +1 @@
<mxfile host="Electron" modified="2022-05-14T12:28:36.816Z" agent="5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/18.0.1 Chrome/100.0.4896.143 Electron/18.2.0 Safari/537.36" etag="VTeDZyRfgTqFOkUEwK2w" version="18.0.1" type="device"><diagram id="a7nnNqAxPxhrp0sOKCIs" name="Page-1">3VrbcqM4EP0aPybFHfwYx7nNJNnUTk3tvE0JEFgbQIwQvuzXrwQCWyAckglr106lJtBqJNHnnFZLZGZep9s7AvLVEw5hMjO0cDszlzPD0C3DmPEfLdzVFs81a0NMUCic9oZv6B8ojJqwliiEheRIMU4oymVjgLMMBlSyAULwRnaLcCKPmoMY9gzfApD0rX+hkK6EVXfm+4Z7iOKVGNoz3LohBY2zeJNiBUK8OTCZNzPzmmBM66t0ew0THrwmLvVztwOt7cQIzOiYB+DXCwMCA6w3y+/P2cJ6zm7LC0vMje6aF4Yhe39xiwld4RhnILnZWxcEl1kIea86u9v7PGKcC+PfkNKdABOUFDPTiqaJaC1eIQ1W4gZm4RXHid1mOIO15RYl3FnjzhQQ2nj4CQ5eG6Nw4p30YyHCU+CSBPBIABpOARJDesRPsJZH52AAEek7iFNIyY45EJgAitYye4AgYdz67XFiFwKqd8Am+l2DpBQjPWRRUm6Xix6ejHY5vwx2CWKwETbpxWaFKPyWgyoyGyZcGR+/BvjRbw0geI0r2P8oKesGNkDWCOs2u44YGtc4waQa1owi6ARBBRXBr/CgJXTnvqZ1aTCI4BoSCrdHYy5aLUcoTaQa165vN3vdNh6rQ8VqE4Fkn1xbH5eFMVIW+lnJwujJYmY4CZv/IkRrdhnTKii1yW8M909sNO0hKzgniqaZTcDvPsJsUkcDUssJDmBRjBDagK46WoJ6aENXpaW545rA6cLerjRcZXEC+FSqa5ldnyA5w51LkvP6ktMNheacqTRnjmEAK1UikIEhVHv+S1CsfAxIWIx+hP0GKUe7/p9N6SphUUVZ3NKPfJBdIQ7KtILs3Xm8l6MjYyBHO75j93j1CYSx3TdztJIwkyVp9+RJelSB81aV9PFM74zM9MapMn1f0jkLObPohmWZSvgegc+2IVLIQYLijJdBLECQsXzBOYtYnX8lGlIUhjW6kJU1wK/646HNMcpoNX97MbOXymAfo1ZPHO1mRQwi7QdUornQLi3H1CXhNJludLhF7y/8bQ667ujRMuQecBQVjBZduNo5flx4zphM/bB4Gp8ve0+/4A2D2tCqBX5UjpWV/UZ67WTTEEAvUmZTJ/CgH01R8crgNYnzMJnaimTqTpVM56dIpiFbndvnzymzeueeWY/NerQuT63CYbVJxBgU67SS1C1FgTOVJlHyM17nc7h7vvp6m/7are+jX4o90Z9lxgpZDWe8Kn34MeNpo1utPqKs3P4eMMfCH1X/+O6EgBCxaDdtQoJTHw3ojnfZB8YwFcBYUwEzaqvyBazZPkVjouSoMOQoSqEA78PrIsh4aETXRZnzeoohxWLMEkyESXo5hVDPiQ/tfqLlg2LpVO1DbPf32WANFbSe5jnnUc8OBfTdpavVvFFTX3rvrVBNGahO/D+lPrWHADE1TfufAWJrMvOPbazVgOiGIfVwoTsTYOKdopSUCsYm9RzUi5pcLwb8aA0FUsnYL0lCGIGyyqbvP5t1R5aQJ/s60exxDxexgXOrMk2uAooPpVHJ6AUXiCLMJeJjSnGq0A7FncUE1+el1+1Xvyk+KHh6t5hTVQ2qouEzzjfvy2VU0J8L6+4i+PIjAw9o8/00OyxFXDtMe5PIypcZu0Ey/yMyH5vk2TJcsST0sBjNcMUJwifRm93uP3XX68H+DwbMm38B</diagram></mxfile>
<mxfile host="Electron" modified="2022-09-15T13:19:52.622Z" agent="5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/20.3.0 Chrome/104.0.5112.114 Electron/20.1.3 Safari/537.36" etag="op0px2ugLMt_vFlSy-QH" version="20.3.0" type="device"><diagram id="a7nnNqAxPxhrp0sOKCIs" name="Page-1">5VrbcqM4EP0aPybFHfwY27nNJJnUpqZm3qYECKwNSIwQvszXrwTCtrg4OBvKqd08JNBqhNSnz1FLZGLO080tBdnykYQwmRhauJmYi4lh6Lrm8D/Csq0s06lbGWKKQum0N7ygP1AaNWktUAhzxZERkjCUqcaAYAwDptgApWStukUkUd+agRi2DC8BSNrWHyhky3peznTfcAdRvJSv9gw5vxTUznIm+RKEZH1gMq8n5pwSwqqrdDOHiQheHZfquZue1t3AKMRsyAPw64UBgQFW68X3JzyznvBNcWHJsbFtPWEY8vnLW0LZksQEg+R6b51RUuAQil51frf3eSAkk8a/IWNbCSYoGOGmJUsT2Zq/QhYs5Q3E4ZXAid9igmFluUGJcNaEMwOU1R5+QoLX2iidRCftWMjw5KSgATwSgDqnAI0hO+JnVn4iOgcvkJG+hSSFjG65A4UJYGilZg+QSRjv/PY48QsJ1QmwyX5XICnkmyaGk/Dxz3zKr2JWxqRpucdRUmwWHS0rSC95f/rlppUPPG0zcRlsE8Rhp3zSs/USMfiSgTKya058FV+/SpAHf2cAwWtcps23gvFuYJ0IVYboNr+OOJpzkhBavtaMIugEQQk1Ja/woCV0p76mNdOoNwP41BjcHMVMtlqOZKqUKteubtd73tcey0PGayOBbJ+dm++nlTGQVvqnopXRS6sQrVq8qg13j/xt2j3ORU7kdTMfgN98hNuUjnqollESwDwfQLQeXjW4BPXQhm4Xl6aOawKnCftupRIsixMghlJeq9n1AZQz3KlCOa9NOd3o4JwzFufMIRnAS50IYNCHast/AfKlTwAN88GP8L8gFWhXv/mQrhIeVYTjfqEfmF0hCYq0hOxkHW9pdGT0aLTjO3Yrrz4gYWz3TY3uTJjRRNo9u0gPKpDeqrLer/TOQKU3zqX0bUpnPOSi2jEsy+yE7wH4fBujhBwkKMaiDOIBgrQqmRji+4Qr2ZCiMKzQhbysAX7ZnwhtRhBm5fjt2cRedAb7WGq1yLHb7MiXKPuJLtJcaJeWY+oKcWqlGxxu2fuzmM1B1w0+WobaA4minKdFE67dGN9PPGeIUt/PHofrZevpZ7LmUBtaucAP0liV2W/Ia0NNQwC9qFNNncCDfjRGxauCVwvnoZjaHWLqjiWm03OIachX593zn0lZvc+urMdGPZiX52ZhP9uUxOgl67iU1K2OAmcsTqLkV7zKpnD7dPX1Jv29Xd1Fvzv2RH8VmBeyGsGiKr3/ORGy0axWHxAu2mcJJwFzLPxR+SN2JxSEiEe7bpMUHPtoQHe8yzYwhtkBjDUWMIO2Kl/Aiu9TNE5KgQpHjqEUSvDevS4CLEIju86LTNRTHCkeYy4wEaHp5RhE/Uz5sNtP7PKhY+ns2ofY7r/PBquvoPU0z/kc9WxfQE8uXa16RnV96Z1aoZoqUI34f0h9avcBYmqa9h8DxNbUzD+2se4GRDcMpYcL3RkBE+8cpaRSMNbSc1Avamq9GIijNRQoJWO7JAlhBIpSTU8/m3UHlpBn+7pR73EPF7Gec6siTa4CRg6pUdLomeSIISIo4hPGSNrBHUYaiwmpzkvnu6+GY3xQ8PRmMddVNXQVDR9xvnlXLKKc/ZpZtxfBl58Y3KP19/PssE7P286xD90PnS2Zj436/5HhHScIH5Te/Hb/qbxaD/b/cGBe/wM=</diagram></mxfile>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 107 KiB

After

Width:  |  Height:  |  Size: 109 KiB

View file

@ -37,7 +37,7 @@ password = "hmcihmci"
unsafe = true # Ignore SSL cert. errors
# Another HMC example
#[hmc.Prod-HMC]
#[hmc.site2]
#url = "https://10.10.10.30:12443"
#username = "user"
#password = "password"

View file

@ -18,3 +18,4 @@ cp /opt/hmci/doc/hmci.toml /etc/
```
Now modify */etc/hmci.toml* and test your setup by running ```/opt/hmci/bin/hmci -d```

View file

@ -4,11 +4,12 @@ Please note that the software versions referenced in this document might have ch
More details are available in the [README.md](../README.md) file.
All commands should be run as root or through sudo.
## Install the Java Runtime from repository
```shell
sudo apt-get install default-jre-headless
apt-get install default-jre-headless
```
@ -16,10 +17,10 @@ sudo apt-get install default-jre-headless
```shell
wget https://dl.influxdata.com/influxdb/releases/influxdb_1.8.10_amd64.deb
sudo dpkg -i influxdb_1.8.10_amd64.deb
sudo systemctl daemon-reload
sudo systemctl enable influxdb
sudo systemctl start influxdb
dpkg -i influxdb_1.8.10_amd64.deb
systemctl daemon-reload
systemctl enable influxdb
systemctl start influxdb
```
Run the ```influx``` cli command and create the *hmci* database.
@ -30,10 +31,10 @@ Run the ```influx``` cli command and create the *hmci* database.
```shell
sudo apt-get install -y adduser libfontconfig1
wget https://dl.grafana.com/oss/release/grafana_9.1.3_amd64.deb
sudo dpkg -i grafana_9.1.3_amd64.deb
sudo systemctl daemon-reload
sudo systemctl enable grafana-server
sudo systemctl start grafana-server
dpkg -i grafana_9.1.3_amd64.deb
systemctl daemon-reload
systemctl enable grafana-server
systemctl start grafana-server
```
When logged in to Grafana (port 3000, admin/admin) create a datasource that points to the local InfluxDB. Now import the provided dashboards.
@ -43,11 +44,11 @@ When logged in to Grafana (port 3000, admin/admin) create a datasource that poin
```shell
wget https://bitbucket.org/mnellemann/hmci/downloads/hmci_1.3.1-1_all.deb
sudo dpkg -i hmci_1.3.1-1_all.deb
dpkg -i hmci_1.3.1-1_all.deb
cp /opt/hmci/doc/hmci.toml /etc/
cp /opt/hmci/doc/hmci.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable hmci
systemctl daemon-reload
systemctl enable hmci
```
Now modify */etc/hmci.toml* and test setup by running ```/opt/hmci/bin/hmci -d``` manually and verify connection to HMC and InfluxDB. Afterwards start service with ```systemctl start hmci``` .

View file

@ -4,6 +4,8 @@
And any other Linux distribution using *firewalld*.
All commands should be run as root or through sudo.
### Allow remote access to Grafana on port 3000
```shell

View file

@ -4,11 +4,14 @@ Please note that the software versions referenced in this document might have ch
More details are available in the [README.md](../README.md) file. If you are running Linux on Power (ppc64le) you should look for ppc64le packages at the [Power DevOps](https://www.power-devops.com/) website.
All commands should be run as root or through sudo.
## Install the Java Runtime from repository
```shell
sudo dnf install java-11-openjdk-headless
dnf install java-11-openjdk-headless
# or
yum install java-11-openjdk-headless
```
@ -16,10 +19,10 @@ sudo dnf install java-11-openjdk-headless
```shell
wget https://dl.influxdata.com/influxdb/releases/influxdb-1.8.10.x86_64.rpm
sudo yum localinstall influxdb-1.8.10.x86_64.rpm
sudo systemctl daemon-reload
sudo systemctl enable influxdb
sudo systemctl start influxdb
rpm -ivh influxdb-1.8.10.x86_64.rpm
systemctl daemon-reload
systemctl enable influxdb
systemctl start influxdb
```
Run the ```influx``` cli command and create the *hmci* database.
@ -29,10 +32,10 @@ Run the ```influx``` cli command and create the *hmci* database.
```shell
wget https://dl.grafana.com/oss/release/grafana-9.1.3-1.x86_64.rpm
sudo yum install grafana-9.1.3-1.x86_64.rpm
sudo systemctl daemon-reload
sudo systemctl enable grafana-server
sudo systemctl start grafana-server
rpm -ivh grafana-9.1.3-1.x86_64.rpm
systemctl daemon-reload
systemctl enable grafana-server
systemctl start grafana-server
```
When logged in to Grafana (port 3000, admin/admin) create a datasource that points to the local InfluxDB. Now import the provided dashboards.
@ -41,13 +44,13 @@ When logged in to Grafana (port 3000, admin/admin) create a datasource that poin
## Download and Install HMCi
```shell
wget https://bitbucket.org/mnellemann/hmci/downloads/hmci_1.3.1-1_all.deb
sudo dpkg -i hmci_1.3.1-1_all.deb
wget https://bitbucket.org/mnellemann/hmci/downloads/hmci-1.3.1-1_all.rpm
rpm -ivh hmci-1.3.1-1_all.rpm
cp /opt/hmci/doc/hmci.toml /etc/
cp /opt/hmci/doc/hmci.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable hmci
sudo systemctl start hmci
systemctl daemon-reload
systemctl enable hmci
systemctl start hmci
```
Now modify */etc/hmci.toml* and test your setup by running ```/opt/hmci/bin/hmci -d``` manually and verify connection to HMC and InfluxDB. Afterwards start service with ```systemctl start hmci``` .

View file

@ -4,11 +4,12 @@ Please note that the software versions referenced in this document might have ch
More details are available in the [README.md](../README.md) file. If you are running Linux on Power (ppc64le) you should look for ppc64le packages at the [Power DevOps](https://www.power-devops.com/) website.
All commands should be run as root or through sudo.
## Install the Java Runtime from repository
```shell
sudo zypper install java-11-openjdk-headless
zypper install java-11-openjdk-headless
```
@ -16,10 +17,10 @@ sudo zypper install java-11-openjdk-headless
```shell
wget https://dl.influxdata.com/influxdb/releases/influxdb-1.8.10.x86_64.rpm
sudo yum localinstall influxdb-1.8.10.x86_64.rpm
sudo systemctl daemon-reload
sudo systemctl enable influxdb
sudo systemctl start influxdb
rpm -ivh influxdb-1.8.10.x86_64.rpm
systemctl daemon-reload
systemctl enable influxdb
systemctl start influxdb
```
Run the ```influx``` cli command and create the *hmci* database.
@ -29,10 +30,10 @@ Run the ```influx``` cli command and create the *hmci* database.
```shell
wget https://dl.grafana.com/oss/release/grafana-9.1.3-1.x86_64.rpm
sudo rpm -i --nodeps grafana-9.1.3-1.x86_64.rpm
sudo systemctl daemon-reload
sudo systemctl enable grafana-server
sudo systemctl start grafana-server
rpm -ivh --nodeps grafana-9.1.3-1.x86_64.rpm
systemctl daemon-reload
systemctl enable grafana-server
systemctl start grafana-server
```
When logged in to Grafana (port 3000, admin/admin) create a datasource that points to the local InfluxDB. Now import the provided dashboards.
@ -41,12 +42,12 @@ When logged in to Grafana (port 3000, admin/admin) create a datasource that poin
## Download and Install HMCi
```shell
wget https://bitbucket.org/mnellemann/hmci/downloads/hmci_1.3.1-1_all.deb
sudo dpkg -i hmci_1.3.1-1_all.deb
wget https://bitbucket.org/mnellemann/hmci/downloads/hmci-1.3.1-1_all.rpm
rpm -ivh hmci-1.3.1-1_all.rpm
cp /opt/hmci/doc/hmci.toml /etc/
cp /opt/hmci/doc/hmci.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable hmci
systemctl daemon-reload
systemctl enable hmci
```
Now modify */etc/hmci.toml* and test your setup by running ```/opt/hmci/bin/hmci -d``` manually and verify connection to HMC and InfluxDB. Afterwards start service with ```systemctl start hmci``` .

View file

@ -0,0 +1,19 @@
#!/bin/bash
# For InfluxDB v. 1.x
if [ "$#" -ne 1 ]; then
echo "Usage: $0 <lpar>"
exit 1
fi
DB="hmci"
LPAR=$1
for s in $(influx -database ${DB} -execute 'SHOW SERIES' -format column | grep $LPAR); do
n=$(echo $s | cut -f 1 -d,)
influx -database ${DB} -execute "DELETE FROM ${n} WHERE \"lparname\"=\"${LPAR}\" AND time > '1980-01-01';"
influx -database ${DB} -execute "DROP SERIES FROM ${n} WHERE \"lparname\"=\"${LPAR}\";"
done

View file

@ -1,3 +1,3 @@
projectId = hmci
projectGroup = biz.nellemann.hmci
projectVersion = 1.3.2
projectVersion = 1.3.3

View file

@ -18,14 +18,11 @@ package biz.nellemann.hmci;
import biz.nellemann.hmci.Configuration.InfluxObject;
import org.influxdb.BatchOptions;
import org.influxdb.InfluxDB;
import org.influxdb.InfluxDBException;
import org.influxdb.InfluxDBFactory;
import org.influxdb.dto.BatchPoints;
import org.influxdb.dto.Point;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.net.SocketException;
import java.time.Instant;
import java.util.ArrayList;
import java.util.List;
@ -313,6 +310,7 @@ public final class InfluxClient {
getPartitionProcessor(partition, timestamp).forEach( it -> influxDB.write(it));
//getPartitionNetworkVirtual(partition, timestamp).forEach(it -> batchPoints.point(it));
getPartitionNetworkVirtual(partition, timestamp).forEach(it -> influxDB.write(it));
getPartitionSriovLogicalPorts(partition, timestamp).forEach(it -> influxDB.write(it));
//getPartitionStorageVirtualGeneric(partition, timestamp).forEach(it -> batchPoints.point(it));
getPartitionStorageVirtualGeneric(partition, timestamp).forEach(it -> influxDB.write(it));
//getPartitionStorageVirtualFibreChannel(partition, timestamp).forEach(it -> batchPoints.point(it));
@ -340,6 +338,11 @@ public final class InfluxClient {
return processMeasurementMap(metrics, timestamp, "lpar_net_virtual"); // Not 'network'
}
private static List<Point> getPartitionSriovLogicalPorts(LogicalPartition partition, Instant timestamp) {
List<Measurement> metrics = partition.getSriovLogicalPorts();
return processMeasurementMap(metrics, timestamp, "lpar_net_sriov"); // Not 'network'
}
// TODO: lpar_net_sriov
private static List<Point> getPartitionStorageVirtualGeneric(LogicalPartition partition, Instant timestamp) {

View file

@ -162,6 +162,42 @@ class LogicalPartition extends MetaSystem {
}
// LPAR Network - SR-IOV
List<Measurement> getSriovLogicalPorts() {
List<Measurement> list = new ArrayList<>();
metrics.systemUtil.sample.lparsUtil.network.sriovLogicalPorts.forEach( port -> {
HashMap<String, String> tagsMap = new HashMap<>();
tagsMap.put("servername", system.name);
tagsMap.put("lparname", name);
tagsMap.put("location", port.physicalLocation);
tagsMap.put("vnicDeviceMode", port.vnicDeviceMode);
tagsMap.put("configurationType", port.configurationType);
log.trace("getSriovLogicalPorts() - tags: {}", tagsMap);
HashMap<String, Object> fieldsMap = new HashMap<>();
fieldsMap.put("drcIndex", port.drcIndex);
fieldsMap.put("physicalPortId", port.physicalPortId);
fieldsMap.put("physicalDrcIndex", port.physicalDrcIndex);
fieldsMap.put("droppedPackets", port.droppedPackets);
fieldsMap.put("receivedBytes", port.receivedBytes);
fieldsMap.put("receivedPackets", port.receivedPackets);
fieldsMap.put("sentBytes", port.sentBytes);
fieldsMap.put("sentPackets", port.sentPackets);
fieldsMap.put("errorIn", port.errorIn);
fieldsMap.put("errorOut", port.errorOut);
fieldsMap.put("transferredBytes", port.transferredBytes);
log.trace("getSriovLogicalPorts() - fields: {}", fieldsMap);
list.add(new Measurement(tagsMap, fieldsMap));
});
return list;
}
// LPAR Storage - Virtual Generic
List<Measurement> getVirtualGenericAdapterMetrics() {

View file

@ -10,4 +10,6 @@ public final class Network {
public final List<SharedAdapter> sharedAdapters = new ArrayList<>();
public final List<VirtualEthernetAdapter> virtualEthernetAdapters = new ArrayList<>();
public final List<SriovLogicalPort> sriovLogicalPorts = new ArrayList<>();
}

View file

@ -0,0 +1,44 @@
package biz.nellemann.hmci.pcm;
import com.serjltt.moshi.adapters.FirstElement;
public class SriovLogicalPort {
public String drcIndex = "";
public String physicalLocation = ""; // "U78CA.001.CSS0CXA-P1-C2-C1-T1-S2"
public String physicalDrcIndex = "";
public Number physicalPortId = 0;
public String vnicDeviceMode = ""; // "NonVNIC"
public String configurationType = ""; // "Ethernet"
@FirstElement
public Number receivedPackets = 0.0;
@FirstElement
public Number sentPackets = 0.0;
@FirstElement
public Number droppedPackets = 0.0;
@FirstElement
public Number sentBytes = 0.0;
@FirstElement
public Number receivedBytes = 0.0;
@FirstElement
public Number errorIn = 0.0;
@FirstElement
public Number errorOut = 0.0;
@FirstElement
public Number transferredBytes = 0.0;
}

View file

@ -139,4 +139,31 @@ class LogicalPartitionTest extends Specification {
listOfMeasurements.first().fields['readBytes'] == 0.0
}
void "test getSriovLogicalPortMetrics'"() {
setup:
def testFile = new File(getClass().getResource('/pcm-data-logical-partition-sriov.json').toURI())
def testJson = testFile.getText('UTF-8')
ManagedSystem system = new ManagedSystem("e09834d1-c930-3883-bdad-405d8e26e166", "Test Name","Test Type", "Test Model", "Test S/N")
LogicalPartition lpar = new LogicalPartition("2DE05DB6-8AD5-448F-8327-0F488D287E82", "9Flash01", "OS400", system)
when:
lpar.processMetrics(testJson)
List<Measurement> listOfMeasurements = lpar.getSriovLogicalPorts()
then:
listOfMeasurements.size() == 6
listOfMeasurements.first().tags['location'] == "U78CA.001.CSS0CXA-P1-C2-C1-T1-S2"
listOfMeasurements.first().tags['vnicDeviceMode'] == "NonVNIC"
listOfMeasurements.first().tags['configurationType'] == "Ethernet"
listOfMeasurements.first().fields['drcIndex'] == "654327810"
listOfMeasurements.first().fields['physicalPortId'] == 0
listOfMeasurements.first().fields['physicalDrcIndex'] == "553713681"
listOfMeasurements.first().fields['receivedPackets'] == 16.867
listOfMeasurements.first().fields['sentPackets'] == 0.067
listOfMeasurements.first().fields['sentBytes'] == 8.533
listOfMeasurements.first().fields['receivedBytes'] == 1032.933
listOfMeasurements.first().fields['transferredBytes'] == 1041.466
}
}

File diff suppressed because it is too large Load diff