diff --git a/build.gradle b/build.gradle index 950ef08..4332656 100644 --- a/build.gradle +++ b/build.gradle @@ -117,3 +117,6 @@ jar { ) } } + +sourceCompatibility = 1.8 +targetCompatibility = 1.8 diff --git a/doc/IBM Power - HMC Managed Systems - Energy-1607681496790.json b/doc/IBM Power - HMC Managed Systems - Energy-1608547150370.json similarity index 82% rename from doc/IBM Power - HMC Managed Systems - Energy-1607681496790.json rename to doc/IBM Power - HMC Managed Systems - Energy-1608547150370.json index 2591acf..509bd81 100644 --- a/doc/IBM Power - HMC Managed Systems - Energy-1607681496790.json +++ b/doc/IBM Power - HMC Managed Systems - Energy-1608547150370.json @@ -7,6 +7,14 @@ "type": "datasource", "pluginId": "influxdb", "pluginName": "InfluxDB" + }, + { + "name": "DS_INFLUXDB", + "label": "InfluxDB", + "description": "", + "type": "datasource", + "pluginId": "influxdb", + "pluginName": "InfluxDB" } ], "__requires": [ @@ -53,7 +61,7 @@ "gnetId": null, "graphTooltip": 0, "id": null, - "iteration": 1607681490214, + "iteration": 1608547143991, "links": [], "panels": [ { @@ -65,7 +73,8 @@ "fieldConfig": { "defaults": { "custom": {}, - "links": [] + "links": [], + "unit": "watt" }, "overrides": [] }, @@ -73,7 +82,7 @@ "fillGradient": 0, "gridPos": { "h": 9, - "w": 12, + "w": 7, "x": 0, "y": 0 }, @@ -174,7 +183,7 @@ }, "yaxes": [ { - "format": "short", + "format": "watt", "label": null, "logBase": 1, "max": null, @@ -208,20 +217,24 @@ "color": "green", "value": null }, + { + "color": "#EAB839", + "value": 600 + }, { "color": "red", "value": 1000 } ] }, - "unit": "watth" + "unit": "watt" }, "overrides": [] }, "gridPos": { "h": 9, - "w": 12, - "x": 12, + "w": 17, + "x": 7, "y": 0 }, "id": 7, @@ -296,6 +309,142 @@ "title": "Power Usage", "type": "stat" }, + { + "collapsed": false, + "datasource": "${DS_INFLUXDB}", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 9 + }, + "id": 9, + "panels": [], + "repeat": "ManagedSystem", + "title": "Temperatures", + "type": "row" + }, + { + "datasource": "${DS_HMCI}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": {}, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "#EAB839", + "value": 25 + }, + { + "color": "red", + "value": 30 + } + ] + }, + "unit": "celsius" + }, + "overrides": [] + }, + "gridPos": { + "h": 10, + "w": 7, + "x": 0, + "y": 10 + }, + "id": 5, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "7.3.1", + "targets": [ + { + "alias": "$tag_system - $tag_name", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "system" + ], + "type": "tag" + }, + { + "params": [ + "name" + ], + "type": "tag" + }, + { + "params": [ + "linear" + ], + "type": "fill" + } + ], + "measurement": "SystemEnergyThermal", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [ + { + "key": "name", + "operator": "=", + "value": "inletTemperature_1" + }, + { + "condition": "AND", + "key": "system", + "operator": "=~", + "value": "/^$ManagedSystem$/" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "$ManagedSystem - Inlet", + "type": "stat" + }, { "aliasColors": {}, "bars": false, @@ -305,28 +454,45 @@ "fieldConfig": { "defaults": { "custom": {}, - "links": [] + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "celsius" }, "overrides": [] }, "fill": 1, - "fillGradient": 0, + "fillGradient": 1, "gridPos": { - "h": 13, - "w": 12, - "x": 0, - "y": 9 + "h": 10, + "w": 17, + "x": 7, + "y": 10 }, "hiddenSeries": false, "id": 4, "legend": { "avg": false, - "current": false, + "current": true, + "hideEmpty": true, + "hideZero": true, "max": false, "min": false, "show": true, "total": false, - "values": false + "values": true }, "lines": true, "linewidth": 1, @@ -345,7 +511,7 @@ "steppedLine": false, "targets": [ { - "alias": "$tag_system - $tag_name", + "alias": "$tag_name", "groupBy": [ { "params": [ @@ -410,10 +576,10 @@ "timeFrom": null, "timeRegions": [], "timeShift": null, - "title": "CPU Temperatures", + "title": "$ManagedSystem - CPU", "tooltip": { "shared": true, - "sort": 0, + "sort": 2, "value_type": "individual" }, "type": "graph", @@ -426,171 +592,23 @@ }, "yaxes": [ { - "format": "short", - "label": null, + "$$hashKey": "object:5961", + "decimals": 0, + "format": "celsius", + "label": "", "logBase": 1, "max": null, "min": null, "show": true }, { + "$$hashKey": "object:5962", "format": "short", "label": null, "logBase": 1, "max": null, "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "${DS_HMCI}", - "fieldConfig": { - "defaults": { - "custom": {}, - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 13, - "w": 12, - "x": 12, - "y": 9 - }, - "hiddenSeries": false, - "id": 5, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.3.1", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "alias": "$tag_system - $tag_name", - "groupBy": [ - { - "params": [ - "$__interval" - ], - "type": "time" - }, - { - "params": [ - "system" - ], - "type": "tag" - }, - { - "params": [ - "name" - ], - "type": "tag" - }, - { - "params": [ - "linear" - ], - "type": "fill" - } - ], - "measurement": "SystemEnergyThermal", - "orderByTime": "ASC", - "policy": "default", - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [ - { - "key": "name", - "operator": "=", - "value": "inletTemperature_1" - }, - { - "condition": "AND", - "key": "system", - "operator": "=~", - "value": "/^$ManagedSystem$/" - } - ] - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Inlet Temperatures", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true + "show": false } ], "yaxis": { @@ -653,5 +671,5 @@ "timezone": "", "title": "IBM Power - HMC Managed Systems - Energy", "uid": "oHcrgD1Mk", - "version": 2 + "version": 8 } \ No newline at end of file diff --git a/doc/IBM Power - HMC Managed Systems - Logical Partitions-1607681527581.json b/doc/IBM Power - HMC Managed Systems - Logical Partitions-1608547164889.json similarity index 97% rename from doc/IBM Power - HMC Managed Systems - Logical Partitions-1607681527581.json rename to doc/IBM Power - HMC Managed Systems - Logical Partitions-1608547164889.json index 0fb5600..9bbe945 100644 --- a/doc/IBM Power - HMC Managed Systems - Logical Partitions-1607681527581.json +++ b/doc/IBM Power - HMC Managed Systems - Logical Partitions-1608547164889.json @@ -54,7 +54,7 @@ "gnetId": 1510, "graphTooltip": 0, "id": null, - "iteration": 1607681518752, + "iteration": 1608547159198, "links": [], "panels": [ { @@ -78,7 +78,7 @@ "fillGradient": 0, "grid": {}, "gridPos": { - "h": 11, + "h": 10, "w": 24, "x": 0, "y": 0 @@ -252,10 +252,10 @@ "fillGradient": 0, "grid": {}, "gridPos": { - "h": 11, + "h": 10, "w": 12, "x": 0, - "y": 11 + "y": 10 }, "hiddenSeries": false, "id": 8, @@ -263,9 +263,11 @@ "alignAsTable": true, "avg": true, "current": false, + "hideEmpty": true, + "hideZero": true, "max": true, "min": true, - "show": true, + "show": false, "sort": "avg", "sortDesc": true, "total": false, @@ -373,7 +375,7 @@ "tooltip": { "msResolution": false, "shared": true, - "sort": 0, + "sort": 2, "value_type": "cumulative" }, "type": "graph", @@ -401,7 +403,7 @@ "logBase": 1, "max": null, "min": null, - "show": true + "show": false } ], "yaxis": { @@ -426,13 +428,13 @@ "overrides": [] }, "fill": 1, - "fillGradient": 0, + "fillGradient": 1, "grid": {}, "gridPos": { - "h": 11, + "h": 10, "w": 12, "x": 12, - "y": 11 + "y": 10 }, "hiddenSeries": false, "id": 11, @@ -440,16 +442,18 @@ "alignAsTable": true, "avg": true, "current": false, + "hideEmpty": true, + "hideZero": true, "max": true, "min": true, - "show": true, + "show": false, "sort": "avg", "sortDesc": true, "total": false, "values": true }, "lines": true, - "linewidth": 2, + "linewidth": 1, "mode": "", "nullPointMode": "connected", "options": { @@ -462,7 +466,7 @@ "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, - "stack": true, + "stack": false, "steppedLine": false, "style": {}, "targets": [ @@ -552,7 +556,7 @@ "tooltip": { "msResolution": false, "shared": true, - "sort": 0, + "sort": 2, "value_type": "individual" }, "type": "graph", @@ -620,7 +624,7 @@ "h": 14, "w": 24, "x": 0, - "y": 22 + "y": 20 }, "id": 9, "options": { @@ -638,7 +642,7 @@ "pluginVersion": "7.3.1", "targets": [ { - "alias": "$tag_partition: AffinityScore", + "alias": "$tag_partition", "dsType": "influxdb", "groupBy": [ { @@ -801,5 +805,5 @@ "timezone": "browser", "title": "IBM Power - HMC Managed Systems - Logical Partitions", "uid": "Xl7oHESGz", - "version": 2 + "version": 4 } \ No newline at end of file diff --git a/doc/IBM Power - HMC Managed Systems - Resources-1607681476879.json b/doc/IBM Power - HMC Managed Systems - Resources-1608547181280.json similarity index 87% rename from doc/IBM Power - HMC Managed Systems - Resources-1607681476879.json rename to doc/IBM Power - HMC Managed Systems - Resources-1608547181280.json index ee7fc19..36ea542 100644 --- a/doc/IBM Power - HMC Managed Systems - Resources-1607681476879.json +++ b/doc/IBM Power - HMC Managed Systems - Resources-1608547181280.json @@ -60,7 +60,7 @@ "gnetId": 1465, "graphTooltip": 0, "id": null, - "iteration": 1607681436743, + "iteration": 1608547172319, "links": [], "panels": [ { @@ -90,13 +90,30 @@ "error": false, "fieldConfig": { "defaults": { - "custom": {}, - "links": [] + "custom": { + "align": null, + "filterable": false + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } }, "overrides": [] }, - "fill": 0, - "fillGradient": 0, + "fill": 1, + "fillGradient": 1, "grid": {}, "gridPos": { "h": 7, @@ -112,7 +129,7 @@ "current": true, "max": true, "min": true, - "show": true, + "show": false, "total": false, "values": true }, @@ -220,6 +237,7 @@ }, "yaxes": [ { + "$$hashKey": "object:3244", "format": "short", "label": "cores", "logBase": 1, @@ -228,12 +246,13 @@ "show": true }, { + "$$hashKey": "object:3245", "format": "short", "label": null, "logBase": 1, "max": null, "min": null, - "show": true + "show": false } ], "yaxis": { @@ -291,7 +310,7 @@ "current": true, "max": true, "min": false, - "show": true, + "show": false, "total": false, "values": true }, @@ -409,157 +428,7 @@ "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": {}, - "links": [] - }, - "overrides": [] - }, - "fill": 0, - "fillGradient": 0, - "grid": {}, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 8 - }, - "hiddenSeries": false, - "id": 3, - "legend": { - "alignAsTable": false, - "avg": true, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "mode": "", - "nullPointMode": "connected", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.3.1", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "style": {}, - "targets": [ - { - "alias": "$tag_name", - "dsType": "influxdb", - "groupBy": [ - { - "params": [ - "$interval" - ], - "type": "time" - }, - { - "params": [ - "name" - ], - "type": "tag" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "hide": false, - "measurement": "SystemMemory", - "policy": "default", - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [ - { - "condition": "", - "key": "system", - "operator": "=~", - "value": "/^$ManagedSystem$/" - } - ] - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "$ManagedSystem Memory", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "cumulative" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "decmbytes", - "label": "", - "logBase": 1, - "max": null, - "min": "0", - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true + "show": false } ], "yaxis": { @@ -605,9 +474,9 @@ "overrides": [] }, "gridPos": { - "h": 7, - "w": 12, - "x": 12, + "h": 8, + "w": 24, + "x": 0, "y": 8 }, "heatmap": {}, @@ -678,7 +547,7 @@ "title": "$ManagedSystem Processor Utilization", "tooltip": { "show": true, - "showHistogram": false + "showHistogram": true }, "type": "heatmap", "xAxis": { @@ -706,7 +575,7 @@ "h": 1, "w": 24, "x": 0, - "y": 30 + "y": 16 }, "id": 22, "panels": [], @@ -730,14 +599,14 @@ }, "overrides": [] }, - "fill": 2, - "fillGradient": 0, + "fill": 1, + "fillGradient": 1, "grid": {}, "gridPos": { "h": 8, "w": 24, "x": 0, - "y": 31 + "y": 17 }, "hiddenSeries": false, "id": 16, @@ -745,10 +614,12 @@ "alignAsTable": true, "avg": true, "current": false, + "hideEmpty": true, + "hideZero": true, "max": true, "min": false, - "rightSide": true, - "show": true, + "rightSide": false, + "show": false, "total": false, "values": true }, @@ -837,7 +708,7 @@ "tooltip": { "msResolution": false, "shared": true, - "sort": 0, + "sort": 2, "value_type": "individual" }, "type": "graph", @@ -865,7 +736,7 @@ "logBase": 1, "max": null, "min": null, - "show": true + "show": false } ], "yaxis": { @@ -891,13 +762,13 @@ "overrides": [] }, "fill": 1, - "fillGradient": 0, + "fillGradient": 1, "grid": {}, "gridPos": { "h": 8, "w": 24, "x": 0, - "y": 39 + "y": 25 }, "hiddenSeries": false, "id": 11, @@ -905,10 +776,12 @@ "alignAsTable": true, "avg": true, "current": false, + "hideEmpty": true, + "hideZero": true, "max": true, "min": true, - "rightSide": true, - "show": true, + "rightSide": false, + "show": false, "total": false, "values": true }, @@ -997,7 +870,7 @@ "tooltip": { "msResolution": false, "shared": true, - "sort": 0, + "sort": 2, "value_type": "individual" }, "type": "graph", @@ -1025,7 +898,7 @@ "logBase": 1, "max": null, "min": null, - "show": true + "show": false } ], "yaxis": { @@ -1040,7 +913,7 @@ "h": 1, "w": 24, "x": 0, - "y": 94 + "y": 33 }, "id": 21, "panels": [], @@ -1066,13 +939,13 @@ "overrides": [] }, "fill": 2, - "fillGradient": 0, + "fillGradient": 2, "grid": {}, "gridPos": { "h": 7, "w": 12, "x": 0, - "y": 95 + "y": 34 }, "hiddenSeries": false, "id": 12, @@ -1080,9 +953,11 @@ "alignAsTable": true, "avg": true, "current": true, + "hideEmpty": true, + "hideZero": true, "max": true, "min": true, - "show": true, + "show": false, "sort": "avg", "sortDesc": true, "total": false, @@ -1185,7 +1060,7 @@ "tooltip": { "msResolution": false, "shared": true, - "sort": 0, + "sort": 2, "value_type": "individual" }, "type": "graph", @@ -1198,6 +1073,7 @@ }, "yaxes": [ { + "$$hashKey": "object:4567", "format": "short", "label": "cores", "logBase": 1, @@ -1206,12 +1082,13 @@ "show": true }, { + "$$hashKey": "object:4568", "format": "short", "label": null, "logBase": 1, "max": null, "min": null, - "show": true + "show": false } ], "yaxis": { @@ -1248,7 +1125,7 @@ "h": 7, "w": 12, "x": 12, - "y": 95 + "y": 34 }, "id": 23, "links": [], @@ -1267,7 +1144,7 @@ "pluginVersion": "7.3.1", "targets": [ { - "alias": "$tag_partition Memory", + "alias": "$tag_partition", "dsType": "influxdb", "groupBy": [ { @@ -1436,5 +1313,5 @@ "timezone": "browser", "title": "IBM Power - HMC Managed Systems - Resources", "uid": "ClJhHPIGz", - "version": 4 + "version": 8 } \ No newline at end of file diff --git a/doc/IBM Power - HMC Managed Systems - Virtual I_O Servers-1608120769078.json b/doc/IBM Power - HMC Managed Systems - Virtual I_O Servers-1608547197545.json similarity index 89% rename from doc/IBM Power - HMC Managed Systems - Virtual I_O Servers-1608120769078.json rename to doc/IBM Power - HMC Managed Systems - Virtual I_O Servers-1608547197545.json index 56fb126..7899d98 100644 --- a/doc/IBM Power - HMC Managed Systems - Virtual I_O Servers-1608120769078.json +++ b/doc/IBM Power - HMC Managed Systems - Virtual I_O Servers-1608547197545.json @@ -10,6 +10,12 @@ } ], "__requires": [ + { + "type": "panel", + "id": "gauge", + "name": "Gauge", + "version": "" + }, { "type": "grafana", "id": "grafana", @@ -48,68 +54,56 @@ "gnetId": 1465, "graphTooltip": 0, "id": null, - "iteration": 1608117267611, + "iteration": 1608547189880, "links": [], "panels": [ { - "aliasColors": {}, - "bars": false, - "content": "", - "dashLength": 10, - "dashes": false, "datasource": "${DS_HMCI}", - "editable": true, - "error": false, "fieldConfig": { "defaults": { "custom": {}, - "links": [] + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" }, "overrides": [] }, - "fill": 2, - "fillGradient": 0, - "grid": {}, "gridPos": { - "h": 12, - "w": 12, + "h": 10, + "w": 11, "x": 0, "y": 0 }, - "hiddenSeries": false, "id": 16, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "max": true, - "min": false, - "rightSide": false, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, "links": [], - "mode": "", - "nullPointMode": "connected", "options": { - "alertThreshold": true + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true }, - "percentage": false, "pluginVersion": "7.3.1", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "style": {}, "targets": [ { - "alias": "$tag_vios: $tag_name", + "alias": "$tag_vios", "dsType": "influxdb", "groupBy": [ { @@ -172,55 +166,16 @@ { "condition": "AND", "key": "name", - "operator": "=~", - "value": "/Mem/" + "operator": "=", + "value": "utilizedMemPct" } ] } ], - "thresholds": [], "timeFrom": null, - "timeRegions": [], "timeShift": null, "title": "$ManagedSystem - $Vios - Memory", - "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": "decmbytes", - "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 - } + "type": "gauge" }, { "aliasColors": {}, @@ -239,26 +194,26 @@ "overrides": [] }, "fill": 2, - "fillGradient": 0, + "fillGradient": 2, "grid": {}, "gridPos": { - "h": 12, - "w": 12, - "x": 12, + "h": 10, + "w": 13, + "x": 11, "y": 0 }, "hiddenSeries": false, "id": 19, "legend": { "alignAsTable": true, - "avg": true, + "avg": false, "current": false, - "max": true, + "max": false, "min": false, "rightSide": false, - "show": true, + "show": false, "total": false, - "values": true + "values": false }, "lines": true, "linewidth": 2, @@ -344,7 +299,7 @@ "condition": "AND", "key": "name", "operator": "=~", - "value": "/ProcUnits$/" + "value": "/utilized/" } ] } @@ -357,7 +312,7 @@ "tooltip": { "msResolution": false, "shared": true, - "sort": 0, + "sort": 2, "value_type": "individual" }, "type": "graph", @@ -385,7 +340,7 @@ "logBase": 1, "max": null, "min": null, - "show": true + "show": false } ], "yaxis": { @@ -410,13 +365,13 @@ "overrides": [] }, "fill": 2, - "fillGradient": 0, + "fillGradient": 2, "grid": {}, "gridPos": { - "h": 13, + "h": 10, "w": 24, "x": 0, - "y": 12 + "y": 10 }, "hiddenSeries": false, "id": 18, @@ -427,7 +382,7 @@ "max": true, "min": false, "rightSide": false, - "show": true, + "show": false, "total": false, "values": true }, @@ -446,7 +401,7 @@ "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, - "stack": true, + "stack": false, "steppedLine": false, "style": {}, "targets": [ @@ -534,7 +489,7 @@ "tooltip": { "msResolution": false, "shared": true, - "sort": 0, + "sort": 2, "value_type": "individual" }, "type": "graph", @@ -562,7 +517,7 @@ "logBase": 1, "max": null, "min": null, - "show": true + "show": false } ], "yaxis": { @@ -588,13 +543,13 @@ "overrides": [] }, "fill": 1, - "fillGradient": 0, + "fillGradient": 1, "grid": {}, "gridPos": { - "h": 8, + "h": 10, "w": 12, "x": 0, - "y": 25 + "y": 20 }, "hiddenSeries": false, "id": 17, @@ -605,7 +560,7 @@ "max": true, "min": true, "rightSide": false, - "show": true, + "show": false, "total": false, "values": true }, @@ -706,7 +661,7 @@ "tooltip": { "msResolution": false, "shared": true, - "sort": 0, + "sort": 2, "value_type": "individual" }, "type": "graph", @@ -734,7 +689,7 @@ "logBase": 1, "max": null, "min": null, - "show": true + "show": false } ], "yaxis": { @@ -759,13 +714,13 @@ "overrides": [] }, "fill": 1, - "fillGradient": 0, + "fillGradient": 2, "grid": {}, "gridPos": { - "h": 8, + "h": 10, "w": 12, "x": 12, - "y": 25 + "y": 20 }, "hiddenSeries": false, "id": 11, @@ -776,7 +731,7 @@ "max": true, "min": true, "rightSide": false, - "show": true, + "show": false, "total": false, "values": true }, @@ -877,7 +832,7 @@ "tooltip": { "msResolution": false, "shared": true, - "sort": 0, + "sort": 2, "value_type": "individual" }, "type": "graph", @@ -905,7 +860,7 @@ "logBase": 1, "max": null, "min": null, - "show": true + "show": false } ], "yaxis": { @@ -1010,5 +965,5 @@ "timezone": "browser", "title": "IBM Power - HMC Managed Systems - Virtual I/O Servers", "uid": "DDNEv5vGz", - "version": 5 + "version": 8 } \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index eea024d..09e0177 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,3 @@ id = hmci group = biz.nellemann.hmci -version = 0.2.6 +version = 0.2.7 diff --git a/src/main/java/biz/nellemann/hmci/ManagedSystem.java b/src/main/java/biz/nellemann/hmci/ManagedSystem.java index 1fb32f7..5fcb90f 100644 --- a/src/main/java/biz/nellemann/hmci/ManagedSystem.java +++ b/src/main/java/biz/nellemann/hmci/ManagedSystem.java @@ -127,8 +127,18 @@ class ManagedSystem extends MetaSystem { log.debug("getViosMemoryMetrics() - tags: " + tagsMap.toString()); HashMap fieldsMap = new HashMap(); - fieldsMap.put("assignedMem", vios.memory.assignedMem); - fieldsMap.put("utilizedMem", vios.memory.utilizedMem); + Number assignedMem = getNumberMetricObject(vios.memory.assignedMem); + Number utilizedMem = getNumberMetricObject(vios.memory.utilizedMem); + if(assignedMem != null) { + fieldsMap.put("assignedMem", vios.memory.assignedMem); + } + if(utilizedMem != null) { + fieldsMap.put("utilizedMem", vios.memory.utilizedMem); + } + if(assignedMem != null && utilizedMem != null) { + Number usedMemPct = (utilizedMem.intValue() * 100 ) / assignedMem.intValue(); + fieldsMap.put("utilizedMemPct", usedMemPct.floatValue()); + } log.debug("getViosMemoryMetrics() - fields: " + fieldsMap.toString()); list.add(new Measurement(tagsMap, fieldsMap)); diff --git a/src/main/java/biz/nellemann/hmci/MetaSystem.java b/src/main/java/biz/nellemann/hmci/MetaSystem.java index 2e66d30..0fc4ec9 100644 --- a/src/main/java/biz/nellemann/hmci/MetaSystem.java +++ b/src/main/java/biz/nellemann/hmci/MetaSystem.java @@ -62,7 +62,7 @@ abstract class MetaSystem { Instant getTimestamp() { - String timestamp = metrics.systemUtil.sample.sampleInfo.timeStamp; + String timestamp = getStringMetricObject(metrics.systemUtil.sample.sampleInfo.timeStamp); Instant instant = Instant.now(); try { log.debug("getTimeStamp() - PMC Timestamp: " + timestamp); @@ -77,6 +77,30 @@ abstract class MetaSystem { } + String getStringMetricObject(Object obj) { + String metric = null; + try { + metric = (String) obj; + } catch (NullPointerException npe) { + log.warn("getStringMetricObject()", npe); + } + + return metric; + } + + + Number getNumberMetricObject(Object obj) { + Number metric = null; + try { + metric = (Number) obj; + } catch (NullPointerException npe) { + log.warn("getNumberMetricObject()", npe); + } + + return metric; + } + + static class BigDecimalAdapter { @FromJson diff --git a/src/test/groovy/biz/nellemann/hmci/ManagedSystemTest.groovy b/src/test/groovy/biz/nellemann/hmci/ManagedSystemTest.groovy index d26e2b5..d1b4ee2 100644 --- a/src/test/groovy/biz/nellemann/hmci/ManagedSystemTest.groovy +++ b/src/test/groovy/biz/nellemann/hmci/ManagedSystemTest.groovy @@ -103,6 +103,7 @@ class ManagedSystemTest extends Specification { listOfMeasurements.size() == 2 listOfMeasurements.first().fields['assignedMem'] == 8192.000 listOfMeasurements.first().fields['utilizedMem'] == 2093.000 + listOfMeasurements.first().fields['utilizedMemPct'] == 25.000 } void "test getViosProcessorMetrics"() {