Merged in development (pull request #3)

Development

Approved-by: Mark Nellemann <mark.nellemann@gmail.com>
This commit is contained in:
Mark Nellemann 2020-09-03 14:31:33 +00:00
commit fe800d5e9a
9 changed files with 1937 additions and 935 deletions

View File

@ -1,8 +1,8 @@
{
"__inputs": [
{
"name": "DS_INFLUXDB",
"label": "InfluxDB",
"name": "DS_HMCI",
"label": "HMCi",
"description": "",
"type": "datasource",
"pluginId": "influxdb",
@ -14,7 +14,7 @@
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "7.1.3"
"version": "7.0.6"
},
{
"type": "panel",
@ -43,17 +43,17 @@
}
]
},
"description": "HMC Managed Systems",
"description": "HMC metrics from HMCi",
"editable": true,
"gnetId": 1465,
"graphTooltip": 0,
"id": null,
"iteration": 1597311329834,
"iteration": 1599142530735,
"links": [],
"panels": [
{
"collapsed": false,
"datasource": "${DS_INFLUXDB}",
"datasource": "${DS_HMCI}",
"gridPos": {
"h": 1,
"w": 24,
@ -72,7 +72,7 @@
"content": "",
"dashLength": 10,
"dashes": false,
"datasource": "${DS_INFLUXDB}",
"datasource": "${DS_HMCI}",
"decimals": 2,
"editable": true,
"error": false,
@ -108,6 +108,9 @@
"links": [],
"mode": "",
"nullPointMode": "connected",
"options": {
"dataLinks": []
},
"percentage": false,
"pluginVersion": "7.1.3",
"pointradius": 5,
@ -150,6 +153,7 @@
],
"hide": false,
"measurement": "SystemSharedProcessorPool",
"orderByTime": "ASC",
"policy": "default",
"refId": "A",
"resultFormat": "time_series",
@ -176,8 +180,8 @@
{
"condition": "AND",
"key": "name",
"operator": "!=",
"value": "availableProcUnits"
"operator": "=~",
"value": "/Units/"
}
]
}
@ -230,7 +234,7 @@
"content": "",
"dashLength": 10,
"dashes": false,
"datasource": "${DS_INFLUXDB}",
"datasource": "${DS_HMCI}",
"decimals": 2,
"editable": true,
"error": false,
@ -266,6 +270,9 @@
"links": [],
"mode": "",
"nullPointMode": "connected",
"options": {
"dataLinks": []
},
"percentage": false,
"pluginVersion": "7.1.3",
"pointradius": 5,
@ -302,6 +309,7 @@
],
"hide": false,
"measurement": "SystemProcessor",
"orderByTime": "ASC",
"policy": "default",
"refId": "A",
"resultFormat": "time_series",
@ -379,7 +387,7 @@
},
{
"collapsed": false,
"datasource": "${DS_INFLUXDB}",
"datasource": "${DS_HMCI}",
"gridPos": {
"h": 1,
"w": 24,
@ -398,7 +406,7 @@
"content": "",
"dashLength": 10,
"dashes": false,
"datasource": "${DS_INFLUXDB}",
"datasource": "${DS_HMCI}",
"decimals": 2,
"editable": true,
"error": false,
@ -436,6 +444,9 @@
"links": [],
"mode": "",
"nullPointMode": "connected",
"options": {
"dataLinks": []
},
"percentage": false,
"pluginVersion": "7.1.3",
"pointradius": 5,
@ -565,7 +576,7 @@
"content": "",
"dashLength": 10,
"dashes": false,
"datasource": "${DS_INFLUXDB}",
"datasource": "${DS_HMCI}",
"editable": true,
"error": false,
"fieldConfig": {
@ -600,6 +611,9 @@
"links": [],
"mode": "",
"nullPointMode": "connected",
"options": {
"dataLinks": []
},
"percentage": false,
"pluginVersion": "7.1.3",
"pointradius": 5,
@ -707,7 +721,7 @@
},
{
"collapsed": false,
"datasource": "${DS_INFLUXDB}",
"datasource": "${DS_HMCI}",
"gridPos": {
"h": 1,
"w": 24,
@ -726,7 +740,7 @@
"content": "",
"dashLength": 10,
"dashes": false,
"datasource": "${DS_INFLUXDB}",
"datasource": "${DS_HMCI}",
"editable": true,
"error": false,
"fieldConfig": {
@ -762,6 +776,9 @@
"links": [],
"mode": "",
"nullPointMode": "connected",
"options": {
"dataLinks": []
},
"percentage": false,
"pluginVersion": "7.1.3",
"pointradius": 5,
@ -810,6 +827,7 @@
],
"hide": false,
"measurement": "SystemFiberChannelAdapters",
"orderByTime": "ASC",
"policy": "default",
"refId": "A",
"resultFormat": "time_series",
@ -829,7 +847,6 @@
],
"tags": [
{
"condition": "",
"key": "system",
"operator": "=~",
"value": "/^$ManagedSystem$/"
@ -838,7 +855,7 @@
"condition": "AND",
"key": "name",
"operator": "=~",
"value": "/writeByt/"
"value": "/Bytes/"
}
]
}
@ -852,7 +869,7 @@
"msResolution": false,
"shared": true,
"sort": 0,
"value_type": "cumulative"
"value_type": "individual"
},
"type": "graph",
"xaxis": {
@ -891,7 +908,7 @@
"content": "",
"dashLength": 10,
"dashes": false,
"datasource": "${DS_INFLUXDB}",
"datasource": "${DS_HMCI}",
"editable": true,
"error": false,
"fieldConfig": {
@ -927,6 +944,9 @@
"links": [],
"mode": "",
"nullPointMode": "connected",
"options": {
"dataLinks": []
},
"percentage": false,
"pluginVersion": "7.1.3",
"pointradius": 5,
@ -975,6 +995,7 @@
],
"hide": false,
"measurement": "SystemSharedAdapters",
"orderByTime": "ASC",
"policy": "default",
"refId": "A",
"resultFormat": "time_series",
@ -994,7 +1015,6 @@
],
"tags": [
{
"condition": "",
"key": "system",
"operator": "=~",
"value": "/^$ManagedSystem$/"
@ -1002,8 +1022,8 @@
{
"condition": "AND",
"key": "name",
"operator": "=",
"value": "transferredBytes"
"operator": "<>",
"value": "test"
}
]
}
@ -1017,7 +1037,7 @@
"msResolution": false,
"shared": true,
"sort": 0,
"value_type": "cumulative"
"value_type": "individual"
},
"type": "graph",
"xaxis": {
@ -1051,11 +1071,11 @@
}
}
],
"refresh": "5m",
"schemaVersion": 26,
"refresh": "30s",
"schemaVersion": 25,
"style": "dark",
"tags": [
"AIX"
"Power"
],
"templating": {
"list": [
@ -1063,7 +1083,7 @@
"allFormat": "regex values",
"allValue": null,
"current": {},
"datasource": "${DS_INFLUXDB}",
"datasource": "${DS_HMCI}",
"definition": "",
"hide": 0,
"includeAll": false,
@ -1088,7 +1108,7 @@
"allFormat": "regex values",
"allValue": null,
"current": {},
"datasource": "${DS_INFLUXDB}",
"datasource": "${DS_HMCI}",
"definition": "",
"hide": 0,
"includeAll": true,
@ -1112,13 +1132,12 @@
]
},
"time": {
"from": "now/w",
"from": "now-6h",
"now": false,
"to": "now"
},
"timepicker": {
"refresh_intervals": [
"5s",
"10s",
"30s",
"1m",
@ -1144,5 +1163,5 @@
"timezone": "browser",
"title": "Power Systems - HMC Managed Systems",
"uid": "ClJhHPIGz",
"version": 4
}
"version": 20
}

View File

@ -0,0 +1,679 @@
{
"__inputs": [
{
"name": "DS_HMCI",
"label": "HMCi",
"description": "",
"type": "datasource",
"pluginId": "influxdb",
"pluginName": "InfluxDB"
}
],
"__requires": [
{
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "7.0.6"
},
{
"type": "panel",
"id": "graph",
"name": "Graph",
"version": ""
},
{
"type": "datasource",
"id": "influxdb",
"name": "InfluxDB",
"version": "1.0.0"
}
],
"annotations": {
"enable": false,
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"description": "HMC metrics from HMCi",
"editable": true,
"gnetId": 1465,
"graphTooltip": 0,
"id": null,
"iteration": 1599142406783,
"links": [],
"panels": [
{
"collapsed": false,
"datasource": "${DS_HMCI}",
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 0
},
"id": 22,
"panels": [],
"repeat": "ManagedSystem",
"title": "$ManagedSystem Throughput",
"type": "row"
},
{
"aliasColors": {},
"bars": false,
"content": "",
"dashLength": 10,
"dashes": false,
"datasource": "${DS_HMCI}",
"editable": true,
"error": false,
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"fill": 2,
"fillGradient": 0,
"grid": {},
"gridPos": {
"h": 8,
"w": 24,
"x": 0,
"y": 1
},
"hiddenSeries": false,
"id": 16,
"legend": {
"alignAsTable": true,
"avg": true,
"current": false,
"max": true,
"min": false,
"rightSide": true,
"show": true,
"total": false,
"values": true
},
"lines": true,
"linewidth": 2,
"links": [],
"mode": "",
"nullPointMode": "connected",
"options": {
"dataLinks": []
},
"percentage": false,
"pluginVersion": "7.1.3",
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"style": {},
"targets": [
{
"alias": "$tag_vios: $tag_id / $tag_device",
"dsType": "influxdb",
"groupBy": [
{
"params": [
"$interval"
],
"type": "time"
},
{
"params": [
"vios"
],
"type": "tag"
},
{
"params": [
"device"
],
"type": "tag"
},
{
"params": [
"id"
],
"type": "tag"
},
{
"params": [
"null"
],
"type": "fill"
}
],
"hide": false,
"measurement": "SystemFiberChannelAdapters",
"orderByTime": "ASC",
"policy": "default",
"refId": "A",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"value"
],
"type": "field"
},
{
"params": [],
"type": "mean"
}
]
],
"tags": [
{
"key": "system",
"operator": "=~",
"value": "/^$ManagedSystem$/"
},
{
"condition": "AND",
"key": "vios",
"operator": "=~",
"value": "/^$Vios$/"
},
{
"condition": "AND",
"key": "name",
"operator": "=",
"value": "transmittedBytes"
}
]
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "$ManagedSystem VIOS Physical Fiber Channel Adapters",
"tooltip": {
"msResolution": false,
"shared": true,
"sort": 0,
"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": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"aliasColors": {},
"bars": false,
"content": "",
"dashLength": 10,
"dashes": false,
"datasource": "${DS_HMCI}",
"editable": true,
"error": false,
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"fill": 1,
"fillGradient": 0,
"grid": {},
"gridPos": {
"h": 8,
"w": 24,
"x": 0,
"y": 9
},
"hiddenSeries": false,
"id": 11,
"legend": {
"alignAsTable": true,
"avg": true,
"current": false,
"max": true,
"min": true,
"rightSide": true,
"show": true,
"total": false,
"values": true
},
"lines": true,
"linewidth": 2,
"links": [],
"mode": "",
"nullPointMode": "connected",
"options": {
"dataLinks": []
},
"percentage": false,
"pluginVersion": "7.1.3",
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"style": {},
"targets": [
{
"alias": "$tag_vios: $tag_name",
"dsType": "influxdb",
"groupBy": [
{
"params": [
"$interval"
],
"type": "time"
},
{
"params": [
"vios"
],
"type": "tag"
},
{
"params": [
"name"
],
"type": "tag"
},
{
"params": [
"null"
],
"type": "fill"
}
],
"hide": false,
"measurement": "SystemSharedAdapters",
"orderByTime": "ASC",
"policy": "default",
"refId": "A",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"value"
],
"type": "field"
},
{
"params": [],
"type": "mean"
}
]
],
"tags": [
{
"key": "system",
"operator": "=~",
"value": "/^$ManagedSystem$/"
},
{
"condition": "AND",
"key": "vios",
"operator": "=~",
"value": "/^$Vios$/"
},
{
"condition": "AND",
"key": "name",
"operator": "=",
"value": "transferredBytes"
}
]
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "$ManagedSystem Shared Adapters",
"tooltip": {
"msResolution": false,
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"$$hashKey": "object:2622",
"format": "Bps",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"$$hashKey": "object:2623",
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"aliasColors": {},
"bars": false,
"content": "",
"dashLength": 10,
"dashes": false,
"datasource": "${DS_HMCI}",
"editable": true,
"error": false,
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"fill": 2,
"fillGradient": 0,
"grid": {},
"gridPos": {
"h": 8,
"w": 24,
"x": 0,
"y": 17
},
"hiddenSeries": false,
"id": 26,
"legend": {
"alignAsTable": true,
"avg": true,
"current": false,
"max": true,
"min": false,
"rightSide": true,
"show": true,
"total": false,
"values": true
},
"lines": true,
"linewidth": 2,
"mode": "",
"nullPointMode": "connected",
"options": {
"dataLinks": []
},
"percentage": false,
"pluginVersion": "7.1.3",
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"style": {},
"targets": [
{
"alias": "$tag_vios: $tag_device xmit",
"dsType": "influxdb",
"groupBy": [
{
"params": [
"$interval"
],
"type": "time"
},
{
"params": [
"vios"
],
"type": "tag"
},
{
"params": [
"device"
],
"type": "tag"
},
{
"params": [
"null"
],
"type": "fill"
}
],
"hide": false,
"measurement": "SystemGenericPhysicalAdapters",
"orderByTime": "ASC",
"policy": "default",
"refId": "A",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"value"
],
"type": "field"
},
{
"params": [],
"type": "mean"
}
]
],
"tags": [
{
"key": "system",
"operator": "=~",
"value": "/^$ManagedSystem$/"
},
{
"condition": "AND",
"key": "vios",
"operator": "=~",
"value": "/^$Vios$/"
},
{
"condition": "AND",
"key": "name",
"operator": "=",
"value": "transmittedBytes"
}
]
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "$ManagedSystem VIOS Generic Physical Adapters",
"tooltip": {
"msResolution": false,
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"$$hashKey": "object:2958",
"format": "Bps",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"$$hashKey": "object:2959",
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
}
],
"refresh": "30s",
"schemaVersion": 25,
"style": "dark",
"tags": [
"Power",
"AIX"
],
"templating": {
"list": [
{
"allFormat": "regex values",
"allValue": null,
"current": {},
"datasource": "${DS_HMCI}",
"definition": "",
"hide": 0,
"includeAll": false,
"label": null,
"multi": true,
"multiFormat": "regex values",
"name": "ManagedSystem",
"options": [],
"query": "SHOW TAG VALUES FROM \"SystemProcessor\" WITH KEY = \"system\"",
"refresh": 1,
"refresh_on_load": false,
"regex": "",
"skipUrlSync": false,
"sort": 0,
"tagValuesQuery": null,
"tags": [],
"tagsQuery": null,
"type": "query",
"useTags": false
},
{
"allFormat": "regex values",
"allValue": null,
"current": {},
"datasource": "${DS_HMCI}",
"definition": "SHOW TAG VALUES FROM \"SystemFiberChannelAdapters\" WITH KEY = \"vios\" where system =~ /$ManagedSystem/",
"hide": 0,
"includeAll": true,
"label": "VIOS",
"multi": true,
"multiFormat": "regex values",
"name": "Vios",
"options": [],
"query": "SHOW TAG VALUES FROM \"SystemFiberChannelAdapters\" WITH KEY = \"vios\" where system =~ /$ManagedSystem/",
"refresh": 1,
"refresh_on_load": false,
"regex": "",
"skipUrlSync": false,
"sort": 0,
"tagValuesQuery": null,
"tags": [],
"tagsQuery": null,
"type": "query",
"useTags": false
}
]
},
"time": {
"from": "now-3h",
"now": false,
"to": "now"
},
"timepicker": {
"refresh_intervals": [
"10s",
"30s",
"1m",
"5m",
"15m",
"30m",
"1h",
"2h",
"1d"
],
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "browser",
"title": "Power Systems - HMC Virtual Input Output Servers",
"uid": "DDNEv5vGz",
"version": 17
}

View File

@ -1,2 +1,2 @@
group = biz.nellemann.hmci
version = 1.0.5
version = 1.0.7

View File

@ -133,8 +133,16 @@ class InfluxClient {
batchPoints.point(it)
}
getSystemGenericPhysicalAdapters(system, timestamp).each {
batchPoints.point(it)
}
getSystemGenericVirtualAdapters(system, timestamp).each {
batchPoints.point(it)
}
}
private static List<Point> getSystemMemory(ManagedSystem system, Instant timestamp) {
List<Map> metrics = system.getMemoryMetrics()
return processMeasurementMap(metrics, timestamp, "SystemMemory")
@ -160,6 +168,16 @@ class InfluxClient {
return processMeasurementMap(metrics, timestamp, "SystemFiberChannelAdapters")
}
private static List<Point> getSystemGenericPhysicalAdapters(ManagedSystem system, Instant timestamp) {
List<Map> metrics = system.getSystemGenericPhysicalAdapters()
return processMeasurementMap(metrics, timestamp, "SystemGenericPhysicalAdapters")
}
private static List<Point> getSystemGenericVirtualAdapters(ManagedSystem system, Instant timestamp) {
List<Map> metrics = system.getSystemGenericVirtualAdapters()
return processMeasurementMap(metrics, timestamp, "SystemGenericVirtualAdapters")
}
/*
Logical Partitions
@ -180,6 +198,10 @@ class InfluxClient {
//BatchPoints batchPoints = BatchPoints.database(database).build();
getPartitionAffinityScore(partition, timestamp).each {
batchPoints.point(it)
}
getPartitionMemory(partition, timestamp).each {
batchPoints.point(it)
}
@ -199,6 +221,11 @@ class InfluxClient {
//influxDB.write(batchPoints);
}
private static List<Point> getPartitionAffinityScore(LogicalPartition partition, Instant timestamp) {
List<Map> metrics = partition.getAffinityScore()
return processMeasurementMap(metrics, timestamp, "PartitionAffinityScore")
}
private static List<Point> getPartitionMemory(LogicalPartition partition, Instant timestamp) {
List<Map> metrics = partition.getMemoryMetrics()
return processMeasurementMap(metrics, timestamp, "PartitionMemory")
@ -233,6 +260,7 @@ class InfluxClient {
// Iterate fields
map.get("fields").each { String fieldName, BigDecimal fieldValue ->
log.debug("processMeasurementMap() " + measurement + " - fieldName: " + fieldName + ", fieldValue: " + fieldValue)
Point.Builder builder = Point.measurement(measurement)
.time(timestamp.toEpochMilli(), TimeUnit.MILLISECONDS)
@ -242,6 +270,7 @@ class InfluxClient {
// For each field, we add all tags
map.get("tags").each { String tagName, String tagValue ->
builder.tag(tagName, tagValue)
log.debug("processMeasurementMap() " + measurement + " - tagName: " + tagName + ", tagValue: " + tagValue)
}
list.add(builder.build())

View File

@ -37,6 +37,29 @@ class LogicalPartition extends MetaSystem {
}
List<Map> getAffinityScore() {
List<Map> list = new ArrayList<>()
Map<String, Map> map = new HashMap<String, Map>()
HashMap<String, String> tagsMap = [
system: system.name,
partition: name,
]
map.put("tags", tagsMap)
log.debug("getAffinityScore() - tags: " + tagsMap.toString())
HashMap<String, BigDecimal> fieldsMap = [
affinityScore: metrics.systemUtil?.utilSamples?.first()?.lparsUtil?.first()?.affinityScore,
]
map.put("fields", fieldsMap)
log.debug("getAffinityScore() - fields: " + fieldsMap.toString())
list.add(map)
return list
}
List<Map> getMemoryMetrics() {
List<Map> list = new ArrayList<>()
@ -75,10 +98,10 @@ class LogicalPartition extends MetaSystem {
HashMap<String, BigDecimal> fieldsMap = [
utilizedProcUnits: metrics.systemUtil?.utilSamples?.first()?.lparsUtil?.first()?.processor?.utilizedProcUnits?.first(),
//maxVirtualProcessors: metrics.systemUtil.utilSamples.first().lparsUtil.first().processor.maxVirtualProcessors.first(),
//currentVirtualProcessors: metrics.systemUtil.utilSamples.first().lparsUtil.first().processor.currentVirtualProcessors.first(),
maxVirtualProcessors: metrics.systemUtil.utilSamples.first().lparsUtil.first().processor.maxVirtualProcessors.first(),
currentVirtualProcessors: metrics.systemUtil.utilSamples.first().lparsUtil.first().processor.currentVirtualProcessors.first(),
//donatedProcUnits: metrics.systemUtil.utilSamples.first().lparsUtil.first().processor.donatedProcUnits.first(),
//entitledProcUnits: metrics.systemUtil.utilSamples.first().lparsUtil.first().processor.entitledProcUnits.first(),
entitledProcUnits: metrics.systemUtil.utilSamples.first().lparsUtil.first().processor.entitledProcUnits.first(),
//idleProcUnits: metrics.systemUtil.utilSamples.first().lparsUtil.first().processor.idleProcUnits.first(),
//maxProcUnits: metrics.systemUtil.utilSamples.first().lparsUtil.first().processor.maxProcUnits.first(),
utilizedCappedProcUnits: metrics.systemUtil?.utilSamples?.first()?.lparsUtil?.first()?.processor?.utilizedCappedProcUnits?.first(),
@ -97,8 +120,8 @@ class LogicalPartition extends MetaSystem {
List<Map> getVirtualEthernetAdapterMetrics() {
List<Map> list = new ArrayList<>()
Map<String, Map> map = new HashMap<String, Map>()
metrics.systemUtil?.utilSamples?.first()?.lparsUtil?.first()?.network?.virtualEthernetAdapters?.each {
Map<String, Map> map = new HashMap<String, Map>()
HashMap<String, String> tagsMap = [
system: system.name,
@ -131,8 +154,8 @@ class LogicalPartition extends MetaSystem {
List<Map> getVirtualFiberChannelAdaptersMetrics() {
List<Map> list = new ArrayList<>()
Map<String, Map> map = new HashMap<String, Map>()
metrics.systemUtil?.utilSamples?.first()?.lparsUtil?.first()?.storage?.virtualFiberChannelAdapters?.each {
Map<String, Map> map = new HashMap<String, Map>()
HashMap<String, String> tagsMap = [
system: system.name,
@ -146,6 +169,7 @@ class LogicalPartition extends MetaSystem {
HashMap<String, BigDecimal> fieldsMap = [
transmittedBytes: it.transmittedBytes.first(),
writeBytes: it.writeBytes.first(),
readBytes: it.readBytes.first(),
]
map.put("fields", fieldsMap)
log.debug("getVirtualFiberChannelAdaptersMetrics() - fields: " + fieldsMap.toString())

View File

@ -96,8 +96,8 @@ class ManagedSystem extends MetaSystem {
List<Map> getSharedProcessorPools() {
List<Map> list = new ArrayList<>()
Map<String, Map> map = new HashMap<String, Map>()
metrics.systemUtil?.utilSamples?.first()?.serverUtil?.sharedProcessorPool?.each {
Map<String, Map> map = new HashMap<String, Map>()
HashMap<String, String> tagsMap = [
system: name,
@ -124,10 +124,9 @@ class ManagedSystem extends MetaSystem {
List<Map> getSystemSharedAdapters() {
List<Map> list = new ArrayList<>()
Map<String, Map> map = new HashMap<String, Map>()
metrics.systemUtil?.utilSamples?.first()?.viosUtil?.each {vios ->
vios.network.sharedAdapters.each {
Map<String, Map> map = new HashMap<String, Map>()
HashMap<String, String> tagsMap = [
system: name,
@ -157,11 +156,13 @@ class ManagedSystem extends MetaSystem {
List<Map> getSystemFiberChannelAdapters() {
List<Map> list = new ArrayList<>()
Map<String, Map> map = new HashMap<String, Map>()
metrics.systemUtil?.utilSamples?.first()?.viosUtil?.each { vios ->
log.debug("getSystemFiberChannelAdapters() - VIOS: " + vios.name)
vios.storage?.fiberChannelAdapters?.each {
Map<String, Map> map = new HashMap<String, Map>()
HashMap<String, String> tagsMap = [
id: it.id,
system: name,
wwpn: it.wwpn,
vios: vios.name,
@ -178,6 +179,38 @@ class ManagedSystem extends MetaSystem {
map.put("fields", fieldsMap)
log.debug("getSystemFiberChannelAdapters() - fields: " + fieldsMap.toString())
list.add(map)
}
}
return list
}
List<Map> getSystemGenericPhysicalAdapters() {
List<Map> list = new ArrayList<>()
metrics.systemUtil?.utilSamples?.first()?.viosUtil?.each { vios ->
vios.storage?.genericPhysicalAdapters?.each {
Map<String, Map> map = new HashMap<String, Map>()
HashMap<String, String> tagsMap = [
id: it.id,
system: name,
vios: vios.name,
device: it.physicalLocation,
]
map.put("tags", tagsMap)
log.debug("getSystemGenericPhysicalAdapters() - tags: " + tagsMap.toString())
HashMap<String, BigDecimal> fieldsMap = [
writeBytes: it.writeBytes.first(),
readBytes: it.readBytes.first(),
transmittedBytes: it.transmittedBytes.first(),
]
map.put("fields", fieldsMap)
log.debug("getSystemGenericPhysicalAdapters() - fields: " + fieldsMap.toString())
list.add(map)
}
@ -188,4 +221,36 @@ class ManagedSystem extends MetaSystem {
}
List<Map> getSystemGenericVirtualAdapters() {
List<Map> list = new ArrayList<>()
metrics.systemUtil?.utilSamples?.first()?.viosUtil?.each { vios ->
vios.storage?.genericVirtualAdapters?.each {
Map<String, Map> map = new HashMap<String, Map>()
HashMap<String, String> tagsMap = [
id: it.id,
system: name,
vios: vios.name,
device: it.physicalLocation,
]
map.put("tags", tagsMap)
log.debug("getSystemGenericVirtualAdapters() - tags: " + tagsMap.toString())
HashMap<String, BigDecimal> fieldsMap = [
writeBytes: it.writeBytes.first(),
readBytes: it.readBytes.first(),
transmittedBytes: it.transmittedBytes.first(),
]
map.put("fields", fieldsMap)
log.debug("getSystemGenericVirtualAdapters() - fields: " + fieldsMap.toString())
list.add(map)
}
}
return list
}
}

View File

@ -9,10 +9,10 @@ class GenericVirtualAdapter {
String type
Integer viosId
String physicalLocation
BigDecimal numOfReads
BigDecimal numOfWrites
BigDecimal readBytes
BigDecimal writeBytes
BigDecimal transmittedBytes
List<BigDecimal> numOfReads
List<BigDecimal> numOfWrites
List<BigDecimal> readBytes
List<BigDecimal> writeBytes
List<BigDecimal> transmittedBytes
}

View File

@ -94,8 +94,8 @@ class LogicalPartitionTest extends Specification {
then:
listOfMaps.size() == 4
listOfMaps.first().get("fields")['writeBytes'] == 546.133
listOfMaps.first().get("tags")['viosId'] == '2'
listOfMaps.first().get("fields")['writeBytes'] == 6690.133
listOfMaps.first().get("tags")['viosId'] == '1'
}