Merged in development (pull request #18)

Development updates and fixes.
This commit is contained in:
Mark Nellemann 2021-08-09 13:17:01 +00:00
commit 91624e2a48
8 changed files with 509 additions and 35 deletions

View file

@ -93,6 +93,11 @@ Below are screenshots of the provided Grafana dashboards (found in the **doc/**
## Known problems ## Known problems
### Incomplete test of metrics
I have not been able to test and verify all types of metric data. If you encounter any missing or wrong data, please contact me, so I can try to fix it. It is possible to run **hmci** with *-d -d* to log JSON data received by the HCM, which can help me implement missing data.
### Naming collision ### Naming collision
You can't have partitions (or Virtual I/O Servers) on different Systems with the same name, as these cannot be distinguished when metrics are You can't have partitions (or Virtual I/O Servers) on different Systems with the same name, as these cannot be distinguished when metrics are

View file

@ -19,18 +19,18 @@ repositories {
dependencies { dependencies {
annotationProcessor 'info.picocli:picocli-codegen:4.6.1' annotationProcessor 'info.picocli:picocli-codegen:4.6.1'
implementation 'info.picocli:picocli:4.6.1' implementation 'info.picocli:picocli:4.6.1'
implementation 'org.jsoup:jsoup:1.13.1' implementation 'org.jsoup:jsoup:1.14.1'
implementation 'com.squareup.okhttp3:okhttp:4.9.1' implementation 'com.squareup.okhttp3:okhttp:4.9.1'
implementation 'com.squareup.moshi:moshi:1.11.0' implementation 'com.squareup.moshi:moshi:1.12.0'
implementation 'com.serjltt.moshi:moshi-lazy-adapters:2.2' implementation 'com.serjltt.moshi:moshi-lazy-adapters:2.2'
implementation 'org.tomlj:tomlj:1.0.0' implementation 'org.tomlj:tomlj:1.0.0'
implementation 'org.influxdb:influxdb-java:2.21' implementation 'org.influxdb:influxdb-java:2.21'
implementation 'org.slf4j:slf4j-api:1.7.30' implementation 'org.slf4j:slf4j-api:1.7.32'
implementation 'org.slf4j:slf4j-simple:1.7.30' implementation 'org.slf4j:slf4j-simple:1.7.32'
testImplementation 'org.spockframework:spock-core:2.0-groovy-3.0' testImplementation 'org.spockframework:spock-core:2.0-groovy-3.0'
testImplementation 'com.squareup.okhttp3:mockwebserver:4.9.1' testImplementation 'com.squareup.okhttp3:mockwebserver:4.9.1'
testImplementation "org.slf4j:slf4j-simple:1.7.30" testImplementation 'org.slf4j:slf4j-simple:1.7.32'
} }
application { application {
@ -84,8 +84,8 @@ jacoco {
jacocoTestReport { jacocoTestReport {
group = "verification" group = "verification"
reports { reports {
xml.enabled false xml.required = false
csv.enabled false csv.required = false
html.destination file("${buildDir}/reports/coverage") html.destination file("${buildDir}/reports/coverage")
} }
} }

View file

@ -20,7 +20,7 @@
"type": "grafana", "type": "grafana",
"id": "grafana", "id": "grafana",
"name": "Grafana", "name": "Grafana",
"version": "8.0.0" "version": "8.0.6"
}, },
{ {
"type": "panel", "type": "panel",
@ -60,7 +60,7 @@
"gnetId": 1465, "gnetId": 1465,
"graphTooltip": 0, "graphTooltip": 0,
"id": null, "id": null,
"iteration": 1623369402365, "iteration": 1628491801565,
"links": [], "links": [],
"panels": [ "panels": [
{ {
@ -148,7 +148,7 @@
"showHeader": true, "showHeader": true,
"sortBy": [] "sortBy": []
}, },
"pluginVersion": "8.0.0", "pluginVersion": "8.0.6",
"targets": [ "targets": [
{ {
"alias": "Read", "alias": "Read",
@ -278,8 +278,8 @@
"overrides": [] "overrides": []
}, },
"gridPos": { "gridPos": {
"h": 9, "h": 11,
"w": 7, "w": 6,
"x": 0, "x": 0,
"y": 5 "y": 5
}, },
@ -297,7 +297,7 @@
"showThresholdMarkers": true, "showThresholdMarkers": true,
"text": {} "text": {}
}, },
"pluginVersion": "8.0.0", "pluginVersion": "8.0.6",
"targets": [ "targets": [
{ {
"alias": "$tag_viosname", "alias": "$tag_viosname",
@ -382,9 +382,9 @@
"fillGradient": 0, "fillGradient": 0,
"grid": {}, "grid": {},
"gridPos": { "gridPos": {
"h": 9, "h": 11,
"w": 17, "w": 18,
"x": 7, "x": 6,
"y": 5 "y": 5
}, },
"hiddenSeries": false, "hiddenSeries": false,
@ -409,7 +409,7 @@
"alertThreshold": true "alertThreshold": true
}, },
"percentage": false, "percentage": false,
"pluginVersion": "8.0.0", "pluginVersion": "8.0.6",
"pointradius": 5, "pointradius": 5,
"points": false, "points": false,
"renderer": "flot", "renderer": "flot",
@ -547,10 +547,10 @@
"fillGradient": 1, "fillGradient": 1,
"grid": {}, "grid": {},
"gridPos": { "gridPos": {
"h": 18, "h": 15,
"w": 12, "w": 15,
"x": 0, "x": 0,
"y": 14 "y": 16
}, },
"hiddenSeries": false, "hiddenSeries": false,
"id": 18, "id": 18,
@ -574,7 +574,7 @@
"alertThreshold": true "alertThreshold": true
}, },
"percentage": false, "percentage": false,
"pluginVersion": "8.0.0", "pluginVersion": "8.0.6",
"pointradius": 5, "pointradius": 5,
"points": false, "points": false,
"renderer": "flot", "renderer": "flot",
@ -793,10 +793,10 @@
"fillGradient": 1, "fillGradient": 1,
"grid": {}, "grid": {},
"gridPos": { "gridPos": {
"h": 18, "h": 15,
"w": 12, "w": 9,
"x": 12, "x": 15,
"y": 14 "y": 16
}, },
"hiddenSeries": false, "hiddenSeries": false,
"id": 17, "id": 17,
@ -820,7 +820,7 @@
"alertThreshold": true "alertThreshold": true
}, },
"percentage": false, "percentage": false,
"pluginVersion": "8.0.0", "pluginVersion": "8.0.6",
"pointradius": 5, "pointradius": 5,
"points": false, "points": false,
"renderer": "flot", "renderer": "flot",
@ -1045,9 +1045,478 @@
"align": false, "align": false,
"alignLevel": null "alignLevel": null
} }
},
{
"aliasColors": {},
"bars": false,
"content": "",
"dashLength": 10,
"dashes": false,
"datasource": "${DS_INFLUXDB-HMCI}",
"description": "",
"editable": true,
"error": false,
"fieldConfig": {
"defaults": {
"links": []
},
"overrides": []
},
"fill": 1,
"fillGradient": 1,
"grid": {},
"gridPos": {
"h": 15,
"w": 15,
"x": 0,
"y": 31
},
"hiddenSeries": false,
"id": 22,
"legend": {
"alignAsTable": false,
"avg": false,
"current": false,
"max": false,
"min": false,
"rightSide": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 1,
"links": [],
"mode": "",
"nullPointMode": "connected",
"options": {
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "8.0.6",
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"style": {},
"targets": [
{
"alias": "$tag_viosname: $tag_id ($tag_location) read",
"dsType": "influxdb",
"groupBy": [
{
"params": [
"$interval"
],
"type": "time"
},
{
"params": [
"viosname"
],
"type": "tag"
},
{
"params": [
"location"
],
"type": "tag"
},
{
"params": [
"id"
],
"type": "tag"
},
{
"params": [
"null"
],
"type": "fill"
}
],
"hide": false,
"measurement": "vios_storage_vFC",
"orderByTime": "ASC",
"policy": "default",
"refId": "A",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"readBytes"
],
"type": "field"
},
{
"params": [],
"type": "mean"
}
]
],
"tags": [
{
"key": "servername",
"operator": "=~",
"value": "/^$ServerName$/"
},
{
"condition": "AND",
"key": "viosname",
"operator": "=~",
"value": "/^$ViosName$/"
}
]
},
{
"alias": "$tag_viosname: $tag_id ($tag_location) write",
"dsType": "influxdb",
"groupBy": [
{
"params": [
"$interval"
],
"type": "time"
},
{
"params": [
"viosname"
],
"type": "tag"
},
{
"params": [
"location"
],
"type": "tag"
},
{
"params": [
"id"
],
"type": "tag"
},
{
"params": [
"null"
],
"type": "fill"
}
],
"hide": false,
"measurement": "vios_storage_vFC",
"orderByTime": "ASC",
"policy": "default",
"refId": "B",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"writeBytes"
],
"type": "field"
},
{
"params": [],
"type": "mean"
},
{
"params": [
"*-1"
],
"type": "math"
}
]
],
"tags": [
{
"key": "servername",
"operator": "=~",
"value": "/^$ServerName$/"
},
{
"condition": "AND",
"key": "viosname",
"operator": "=~",
"value": "/^$ViosName$/"
}
]
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Virtual Fiber Channel Adapters - $ServerName - $ViosName",
"tooltip": {
"msResolution": false,
"shared": true,
"sort": 2,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"$$hashKey": "object:2511",
"format": "Bps",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"$$hashKey": "object:2512",
"format": "none",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": false
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"aliasColors": {},
"bars": false,
"content": "",
"dashLength": 10,
"dashes": false,
"datasource": "${DS_INFLUXDB-HMCI}",
"description": "",
"editable": true,
"error": false,
"fieldConfig": {
"defaults": {
"links": [],
"unit": "bytes"
},
"overrides": []
},
"fill": 1,
"fillGradient": 1,
"grid": {},
"gridPos": {
"h": 15,
"w": 9,
"x": 15,
"y": 31
},
"hiddenSeries": false,
"id": 23,
"legend": {
"alignAsTable": false,
"avg": false,
"current": false,
"max": false,
"min": false,
"rightSide": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 1,
"links": [],
"mode": "",
"nullPointMode": "connected",
"options": {
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "8.0.6",
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"style": {},
"targets": [
{
"alias": "$tag_viosname - read",
"dsType": "influxdb",
"groupBy": [
{
"params": [
"$interval"
],
"type": "time"
},
{
"params": [
"viosname"
],
"type": "tag"
},
{
"params": [
"null"
],
"type": "fill"
}
],
"hide": false,
"measurement": "vios_storage_physical",
"orderByTime": "ASC",
"policy": "default",
"refId": "A",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"readBytes"
],
"type": "field"
},
{
"params": [],
"type": "mean"
}
]
],
"tags": [
{
"key": "servername",
"operator": "=~",
"value": "/^$ServerName$/"
},
{
"condition": "AND",
"key": "viosname",
"operator": "=~",
"value": "/^$ViosName$/"
}
]
},
{
"alias": "$tag_viosname - write",
"dsType": "influxdb",
"groupBy": [
{
"params": [
"$interval"
],
"type": "time"
},
{
"params": [
"viosname"
],
"type": "tag"
},
{
"params": [
"null"
],
"type": "fill"
}
],
"hide": false,
"measurement": "vios_storage_physical",
"orderByTime": "ASC",
"policy": "default",
"refId": "B",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"writeBytes"
],
"type": "field"
},
{
"params": [],
"type": "mean"
},
{
"params": [
"*-1"
],
"type": "math"
}
]
],
"tags": [
{
"key": "servername",
"operator": "=~",
"value": "/^$ServerName$/"
},
{
"condition": "AND",
"key": "viosname",
"operator": "=~",
"value": "/^$ViosName$/"
}
]
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Physical Storage - $ServerName - $ViosName",
"tooltip": {
"msResolution": false,
"shared": true,
"sort": 2,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"$$hashKey": "object:2622",
"format": "bytes",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"$$hashKey": "object:2623",
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": false
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
} }
], ],
"refresh": "1m", "refresh": "30s",
"schemaVersion": 30, "schemaVersion": 30,
"style": "dark", "style": "dark",
"tags": [ "tags": [
@ -1112,12 +1581,12 @@
] ]
}, },
"time": { "time": {
"from": "now-2d", "from": "now-6h",
"now": false, "now": false,
"to": "now-1m" "to": "now-30s"
}, },
"timepicker": { "timepicker": {
"nowDelay": "1m", "nowDelay": "30s",
"refresh_intervals": [ "refresh_intervals": [
"30s", "30s",
"1m", "1m",
@ -1143,5 +1612,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": 4 "version": 10
} }

View file

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

Binary file not shown.

View file

@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-7.1-bin.zip
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists

2
gradlew vendored
View file

@ -72,7 +72,7 @@ case "`uname`" in
Darwin* ) Darwin* )
darwin=true darwin=true
;; ;;
MINGW* ) MSYS* | MINGW* )
msys=true msys=true
;; ;;
NONSTOP* ) NONSTOP* )

View file

@ -423,13 +423,13 @@ class ManagedSystem extends MetaSystem {
vios.storage.fiberChannelAdapters.forEach( adapter -> { vios.storage.fiberChannelAdapters.forEach( adapter -> {
HashMap<String, String> tagsMap = new HashMap<>(); HashMap<String, String> tagsMap = new HashMap<>();
tagsMap.put("id", adapter.id);
tagsMap.put("servername", name); tagsMap.put("servername", name);
tagsMap.put("viosname", vios.name); tagsMap.put("viosname", vios.name);
tagsMap.put("location", adapter.physicalLocation); tagsMap.put("location", adapter.physicalLocation);
log.trace("getViosStorageFiberChannelAdapters() - tags: " + tagsMap.toString()); log.trace("getViosStorageFiberChannelAdapters() - tags: " + tagsMap.toString());
HashMap<String, Object> fieldsMap = new HashMap<>(); HashMap<String, Object> fieldsMap = new HashMap<>();
fieldsMap.put("id", adapter.id);
fieldsMap.put("numOfReads", adapter.numOfReads); fieldsMap.put("numOfReads", adapter.numOfReads);
fieldsMap.put("numOfWrites", adapter.numOfWrites); fieldsMap.put("numOfWrites", adapter.numOfWrites);
fieldsMap.put("readBytes", adapter.readBytes); fieldsMap.put("readBytes", adapter.readBytes);