From 39ce6b66b8d1a73cca191d60db2a559f5542a615 Mon Sep 17 00:00:00 2001 From: Mark Nellemann Date: Fri, 7 May 2021 17:40:31 +0200 Subject: [PATCH 1/6] Add option to dump pcm json metric files. --- gradle.properties | 2 +- .../java/biz/nellemann/hmci/Application.java | 1 + .../biz/nellemann/hmci/Configuration.java | 7 ++++ .../java/biz/nellemann/hmci/HmcInstance.java | 40 +++++++++++++++++++ src/test/resources/hmci.toml | 1 + 5 files changed, 50 insertions(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index c54020f..900db79 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,3 @@ id = hmci group = biz.nellemann.hmci -version = 1.2.1 +version = 1.2.2 diff --git a/src/main/java/biz/nellemann/hmci/Application.java b/src/main/java/biz/nellemann/hmci/Application.java index bb1a26a..aa02695 100644 --- a/src/main/java/biz/nellemann/hmci/Application.java +++ b/src/main/java/biz/nellemann/hmci/Application.java @@ -37,6 +37,7 @@ public class Application implements Callable { @Option(names = { "-d", "--debug" }, description = "Enable debugging [default: 'false'].") private boolean[] enableDebug = new boolean[0]; + public static void main(String... args) { int exitCode = new CommandLine(new Application()).execute(args); System.exit(exitCode); diff --git a/src/main/java/biz/nellemann/hmci/Configuration.java b/src/main/java/biz/nellemann/hmci/Configuration.java index 893460a..7b447a4 100644 --- a/src/main/java/biz/nellemann/hmci/Configuration.java +++ b/src/main/java/biz/nellemann/hmci/Configuration.java @@ -91,6 +91,12 @@ public final class Configuration { c.unsafe = false; } + if(hmcTable.contains(key+".trace")) { + c.trace = hmcTable.getString(key+".trace"); + } else { + c.trace = null; + } + list.add(c); } } @@ -179,6 +185,7 @@ public final class Configuration { String username; String password; Boolean unsafe = false; + String trace; Long update = 30L; Long rescan = 60L; diff --git a/src/main/java/biz/nellemann/hmci/HmcInstance.java b/src/main/java/biz/nellemann/hmci/HmcInstance.java index 4af15e0..e2a4a0c 100644 --- a/src/main/java/biz/nellemann/hmci/HmcInstance.java +++ b/src/main/java/biz/nellemann/hmci/HmcInstance.java @@ -19,6 +19,9 @@ import biz.nellemann.hmci.Configuration.HmcObject; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileWriter; import java.io.IOException; import java.time.Duration; import java.time.Instant; @@ -42,6 +45,8 @@ class HmcInstance implements Runnable { private final InfluxClient influxClient; private final AtomicBoolean keepRunning = new AtomicBoolean(true); + private File traceDir; + private Boolean doTrace = false; HmcInstance(HmcObject configHmc, InfluxClient influxClient) { this.hmcId = configHmc.name; @@ -50,6 +55,20 @@ class HmcInstance implements Runnable { this.influxClient = influxClient; hmcRestClient = new HmcRestClient(configHmc.url, configHmc.username, configHmc.password, configHmc.unsafe); log.debug(String.format("HmcInstance() - id: %s, update: %s, refresh %s", hmcId, updateValue, rescanValue)); + + if(configHmc.trace != null) { + try { + traceDir = new File(configHmc.trace); + traceDir.mkdirs(); + if(traceDir.canWrite()) { + doTrace = true; + } else { + log.warn("HmcInstance() - can't write to trace dir: " + traceDir.toString()); + } + } catch (Exception e) { + log.error("HmcInstance() - trace error: " + e.getMessage()); + } + } } @@ -171,8 +190,12 @@ class HmcInstance implements Runnable { if(tmpJsonString != null && !tmpJsonString.isEmpty()) { system.processMetrics(tmpJsonString); + if(doTrace) { + writeTraceFile(systemId, tmpJsonString); + } } + }); } @@ -194,6 +217,9 @@ class HmcInstance implements Runnable { } if(tmpJsonString2 != null && !tmpJsonString2.isEmpty()) { partition.processMetrics(tmpJsonString2); + if(doTrace) { + writeTraceFile(partitionId, tmpJsonString2); + } } }); @@ -252,4 +278,18 @@ class HmcInstance implements Runnable { } + private void writeTraceFile(String id, String json) { + + String fileName = String.format("%s-%s.json", id, Instant.now().toString()); + try { + log.debug("Writing trace file: " + fileName); + File traceFile = new File(traceDir, fileName); + BufferedWriter writer = new BufferedWriter(new FileWriter(traceFile)); + writer.write(json); + writer.close(); + } catch (IOException e) { + log.warn("writeTraceFile() - " + e.getMessage()); + } + } + } diff --git a/src/test/resources/hmci.toml b/src/test/resources/hmci.toml index a5c87f5..6cd785c 100644 --- a/src/test/resources/hmci.toml +++ b/src/test/resources/hmci.toml @@ -30,3 +30,4 @@ database = "hmci" #username = "viewer" #password = "someSecret" #unsafe = false + #trace = "/tmp/pcm-files" From 1d20a1166fc68adca0dbbfbf6a468aeb05dc2553 Mon Sep 17 00:00:00 2001 From: Mark Nellemann Date: Thu, 3 Jun 2021 18:08:58 +0200 Subject: [PATCH 2/6] Update gradle and 3rd party dependencies. --- build.gradle | 11 ++++++----- gradle/wrapper/gradle-wrapper.jar | Bin 58910 -> 59203 bytes gradle/wrapper/gradle-wrapper.properties | 2 +- gradlew | 2 +- gradlew.bat | 21 +++------------------ 5 files changed, 11 insertions(+), 25 deletions(-) diff --git a/build.gradle b/build.gradle index f20dde4..e71e29a 100644 --- a/build.gradle +++ b/build.gradle @@ -6,13 +6,14 @@ plugins { // Code coverage of tests id 'jacoco' - id "com.github.johnrengelman.shadow" version "6.1.0" + id "com.github.johnrengelman.shadow" version "7.0.0" id "net.nemerosa.versioning" version "2.14.0" - id "nebula.ospackage" version "8.4.1" + id "nebula.ospackage" version "8.5.6" } repositories { - jcenter() + mavenCentral() + mavenLocal() } dependencies { @@ -27,13 +28,13 @@ dependencies { implementation 'org.slf4j:slf4j-api:1.7.30' implementation 'org.slf4j:slf4j-simple:1.7.30' - testImplementation 'org.spockframework:spock-core:2.0-M4-groovy-3.0' + testImplementation 'org.spockframework:spock-core:2.0-groovy-3.0' testImplementation 'com.squareup.okhttp3:mockwebserver:4.9.1' testImplementation "org.slf4j:slf4j-simple:1.7.30" } application { - mainClassName = 'biz.nellemann.hmci.Application' + mainClass.set('biz.nellemann.hmci.Application') } test { diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 62d4c053550b91381bbd28b1afc82d634bf73a8a..e708b1c023ec8b20f512888fe07c5bd3ff77bb8f 100644 GIT binary patch delta 6656 zcmY+Ibx_pN*Z*PZ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/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.5.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index fbd7c51..4f906e0 100755 --- a/gradlew +++ b/gradlew @@ -130,7 +130,7 @@ fi if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then APP_HOME=`cygpath --path --mixed "$APP_HOME"` CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - + JAVACMD=`cygpath --unix "$JAVACMD"` # We build the pattern for arguments to be converted via cygpath diff --git a/gradlew.bat b/gradlew.bat index 5093609..107acd3 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -40,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init +if "%ERRORLEVEL%" == "0" goto execute echo. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. @@ -54,7 +54,7 @@ goto fail set JAVA_HOME=%JAVA_HOME:"=% set JAVA_EXE=%JAVA_HOME%/bin/java.exe -if exist "%JAVA_EXE%" goto init +if exist "%JAVA_EXE%" goto execute echo. echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% @@ -64,21 +64,6 @@ echo location of your Java installation. goto fail -:init -@rem Get command-line arguments, handling Windows variants - -if not "%OS%" == "Windows_NT" goto win9xME_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* - :execute @rem Setup the command line @@ -86,7 +71,7 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar @rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* :end @rem End local scope for the variables with windows NT shell From bb6a24698acb4f52b6944fac80207089995d788a Mon Sep 17 00:00:00 2001 From: Mark Nellemann Date: Fri, 4 Jun 2021 08:27:16 +0200 Subject: [PATCH 3/6] Fix data-source in dashboards. --- .editorconfig | 2 +- ...Ci - Logical Partitions-1617197406774.json | 32 +++++++------------ ... - HMCi - System Energy-1617197422138.json | 20 ++++-------- ...HMCi - System Resources-1617197455766.json | 30 ++++++++--------- ...i - Virtual I_O Servers-1617197498035.json | 20 ++++++------ 5 files changed, 44 insertions(+), 60 deletions(-) diff --git a/.editorconfig b/.editorconfig index 9ec542f..ec0419b 100644 --- a/.editorconfig +++ b/.editorconfig @@ -7,5 +7,5 @@ trim_trailing_whitespace = true indent_style = space indent_size = 4 -[*.yml] +[*.{yml,json}] indent_size = 2 diff --git a/doc/IBM Power - HMCi - Logical Partitions-1617197406774.json b/doc/IBM Power - HMCi - Logical Partitions-1617197406774.json index 3d1f6b9..b816992 100644 --- a/doc/IBM Power - HMCi - Logical Partitions-1617197406774.json +++ b/doc/IBM Power - HMCi - Logical Partitions-1617197406774.json @@ -1,13 +1,5 @@ { "__inputs": [ - { - "name": "DS_HMCI", - "label": "HMCi", - "description": "", - "type": "datasource", - "pluginId": "influxdb", - "pluginName": "InfluxDB" - }, { "name": "DS_INFLUXDB", "label": "InfluxDB", @@ -87,7 +79,7 @@ "type": "row" }, { - "datasource": "${DS_HMCI}", + "datasource": "${DS_INFLUXDB}", "description": "", "fieldConfig": { "defaults": { @@ -262,7 +254,7 @@ "content": "", "dashLength": 10, "dashes": false, - "datasource": "${DS_HMCI}", + "datasource": "${DS_INFLUXDB}", "editable": true, "error": false, "fieldConfig": { @@ -424,7 +416,7 @@ "content": "", "dashLength": 10, "dashes": false, - "datasource": "${DS_HMCI}", + "datasource": "${DS_INFLUXDB}", "editable": true, "error": false, "fieldConfig": { @@ -586,7 +578,7 @@ "content": "", "dashLength": 10, "dashes": false, - "datasource": "${DS_HMCI}", + "datasource": "${DS_INFLUXDB}", "description": "", "editable": true, "error": false, @@ -808,7 +800,7 @@ "content": "", "dashLength": 10, "dashes": false, - "datasource": "${DS_HMCI}", + "datasource": "${DS_INFLUXDB}", "description": "", "editable": true, "error": false, @@ -1045,7 +1037,7 @@ "content": "", "dashLength": 10, "dashes": false, - "datasource": "${DS_HMCI}", + "datasource": "${DS_INFLUXDB}", "description": "", "editable": true, "error": false, @@ -1211,7 +1203,7 @@ "content": "", "dashLength": 10, "dashes": false, - "datasource": "${DS_HMCI}", + "datasource": "${DS_INFLUXDB}", "description": "", "editable": true, "error": false, @@ -1392,7 +1384,7 @@ "content": "", "dashLength": 10, "dashes": false, - "datasource": "${DS_HMCI}", + "datasource": "${DS_INFLUXDB}", "decimals": 2, "editable": true, "error": false, @@ -1570,7 +1562,7 @@ "type": "row" }, { - "datasource": "${DS_HMCI}", + "datasource": "${DS_INFLUXDB}", "description": "", "fieldConfig": { "defaults": { @@ -1695,7 +1687,7 @@ "allFormat": "regex values", "allValue": null, "current": {}, - "datasource": "${DS_HMCI}", + "datasource": "${DS_INFLUXDB}", "definition": "SHOW TAG VALUES FROM \"server_processor\" WITH KEY = \"servername\" WHERE time > now() - 24h", "description": null, "error": null, @@ -1722,7 +1714,7 @@ "allFormat": "regex values", "allValue": null, "current": {}, - "datasource": "${DS_HMCI}", + "datasource": "${DS_INFLUXDB}", "definition": "SHOW TAG VALUES FROM \"lpar_processor\" WITH KEY = \"lparname\" WHERE servername =~ /$ServerName/", "description": null, "error": null, @@ -1780,4 +1772,4 @@ "title": "IBM Power - HMCi - Logical Partitions", "uid": "Xl7oHESGz", "version": 20 -} \ No newline at end of file +} diff --git a/doc/IBM Power - HMCi - System Energy-1617197422138.json b/doc/IBM Power - HMCi - System Energy-1617197422138.json index 70e370f..d07aae6 100644 --- a/doc/IBM Power - HMCi - System Energy-1617197422138.json +++ b/doc/IBM Power - HMCi - System Energy-1617197422138.json @@ -1,13 +1,5 @@ { "__inputs": [ - { - "name": "DS_HMCI", - "label": "HMCi", - "description": "", - "type": "datasource", - "pluginId": "influxdb", - "pluginName": "InfluxDB" - }, { "name": "DS_INFLUXDB", "label": "InfluxDB", @@ -69,7 +61,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "${DS_HMCI}", + "datasource": "${DS_INFLUXDB}", "description": "", "fieldConfig": { "defaults": { @@ -208,7 +200,7 @@ } }, { - "datasource": "${DS_HMCI}", + "datasource": "${DS_INFLUXDB}", "fieldConfig": { "defaults": { "custom": {}, @@ -329,7 +321,7 @@ "type": "row" }, { - "datasource": "${DS_HMCI}", + "datasource": "${DS_INFLUXDB}", "description": "Inlet air temperature.", "fieldConfig": { "defaults": { @@ -444,7 +436,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "${DS_HMCI}", + "datasource": "${DS_INFLUXDB}", "description": "", "fieldConfig": { "defaults": { @@ -663,7 +655,7 @@ { "allValue": null, "current": {}, - "datasource": "${DS_HMCI}", + "datasource": "${DS_INFLUXDB}", "definition": "SHOW TAG VALUES FROM \"server_processor\" WITH KEY = \"servername\" WHERE time > now() - 24h", "description": null, "error": null, @@ -707,4 +699,4 @@ "title": "IBM Power - HMCi - System Energy", "uid": "oHcrgD1Mk", "version": 20 -} \ No newline at end of file +} diff --git a/doc/IBM Power - HMCi - System Resources-1617197455766.json b/doc/IBM Power - HMCi - System Resources-1617197455766.json index af54441..dfd5838 100644 --- a/doc/IBM Power - HMCi - System Resources-1617197455766.json +++ b/doc/IBM Power - HMCi - System Resources-1617197455766.json @@ -1,8 +1,8 @@ { "__inputs": [ { - "name": "DS_HMCI", - "label": "HMCi", + "name": "DS_INFLUXDB", + "label": "InfluxDB", "description": "", "type": "datasource", "pluginId": "influxdb", @@ -65,7 +65,7 @@ "panels": [ { "collapsed": false, - "datasource": "${DS_HMCI}", + "datasource": "${DS_INFLUXDB}", "gridPos": { "h": 1, "w": 24, @@ -84,7 +84,7 @@ "content": "", "dashLength": 10, "dashes": false, - "datasource": "${DS_HMCI}", + "datasource": "${DS_INFLUXDB}", "decimals": 2, "description": "", "editable": true, @@ -248,7 +248,7 @@ "content": "", "dashLength": 10, "dashes": false, - "datasource": "${DS_HMCI}", + "datasource": "${DS_INFLUXDB}", "decimals": 2, "editable": true, "error": false, @@ -565,7 +565,7 @@ "mode": "spectrum" }, "dataFormat": "timeseries", - "datasource": "${DS_HMCI}", + "datasource": "${DS_INFLUXDB}", "description": "", "fieldConfig": { "defaults": { @@ -668,7 +668,7 @@ }, { "collapsed": false, - "datasource": "${DS_HMCI}", + "datasource": "${DS_INFLUXDB}", "gridPos": { "h": 1, "w": 24, @@ -687,7 +687,7 @@ "content": "", "dashLength": 10, "dashes": false, - "datasource": "${DS_HMCI}", + "datasource": "${DS_INFLUXDB}", "editable": true, "error": false, "fieldConfig": { @@ -848,7 +848,7 @@ "content": "", "dashLength": 10, "dashes": false, - "datasource": "${DS_HMCI}", + "datasource": "${DS_INFLUXDB}", "description": "", "editable": true, "error": false, @@ -1069,7 +1069,7 @@ }, { "collapsed": false, - "datasource": "${DS_HMCI}", + "datasource": "${DS_INFLUXDB}", "gridPos": { "h": 1, "w": 24, @@ -1088,7 +1088,7 @@ "content": "", "dashLength": 10, "dashes": false, - "datasource": "${DS_HMCI}", + "datasource": "${DS_INFLUXDB}", "decimals": 2, "editable": true, "error": false, @@ -1252,7 +1252,7 @@ } }, { - "datasource": "${DS_HMCI}", + "datasource": "${DS_INFLUXDB}", "description": "", "fieldConfig": { "defaults": { @@ -1380,7 +1380,7 @@ "allFormat": "regex values", "allValue": null, "current": {}, - "datasource": "${DS_HMCI}", + "datasource": "${DS_INFLUXDB}", "definition": "SHOW TAG VALUES FROM \"server_processor\" WITH KEY = \"servername\" WHERE time > now() - 24h", "description": null, "error": null, @@ -1407,7 +1407,7 @@ "allFormat": "regex values", "allValue": null, "current": {}, - "datasource": "${DS_HMCI}", + "datasource": "${DS_INFLUXDB}", "definition": "SHOW TAG VALUES FROM \"lpar_processor\" WITH KEY = \"lparname\" WHERE servername =~ /$ServerName/", "description": null, "error": null, @@ -1465,4 +1465,4 @@ "title": "IBM Power - HMCi - System Resources", "uid": "ClJhHPIGz", "version": 26 -} \ No newline at end of file +} diff --git a/doc/IBM Power - HMCi - Virtual I_O Servers-1617197498035.json b/doc/IBM Power - HMCi - Virtual I_O Servers-1617197498035.json index 1faa315..66ea70c 100644 --- a/doc/IBM Power - HMCi - Virtual I_O Servers-1617197498035.json +++ b/doc/IBM Power - HMCi - Virtual I_O Servers-1617197498035.json @@ -1,8 +1,8 @@ { "__inputs": [ { - "name": "DS_HMCI", - "label": "HMCi", + "name": "DS_INFLUXDB", + "label": "InfluxDB", "description": "", "type": "datasource", "pluginId": "influxdb", @@ -64,7 +64,7 @@ "links": [], "panels": [ { - "datasource": "${DS_HMCI}", + "datasource": "${DS_INFLUXDB}", "description": "", "fieldConfig": { "defaults": { @@ -203,7 +203,7 @@ "type": "table" }, { - "datasource": "${DS_HMCI}", + "datasource": "${DS_INFLUXDB}", "description": "", "fieldConfig": { "defaults": { @@ -318,7 +318,7 @@ "content": "", "dashLength": 10, "dashes": false, - "datasource": "${DS_HMCI}", + "datasource": "${DS_INFLUXDB}", "description": "", "editable": true, "error": false, @@ -478,7 +478,7 @@ "content": "", "dashLength": 10, "dashes": false, - "datasource": "${DS_HMCI}", + "datasource": "${DS_INFLUXDB}", "description": "", "editable": true, "error": false, @@ -725,7 +725,7 @@ "content": "", "dashLength": 10, "dashes": false, - "datasource": "${DS_HMCI}", + "datasource": "${DS_INFLUXDB}", "description": "", "editable": true, "error": false, @@ -1008,7 +1008,7 @@ "allFormat": "regex values", "allValue": null, "current": {}, - "datasource": "${DS_HMCI}", + "datasource": "${DS_INFLUXDB}", "definition": "SHOW TAG VALUES FROM \"server_processor\" WITH KEY = \"servername\" WHERE time > now() - 24h", "description": null, "error": null, @@ -1035,7 +1035,7 @@ "allFormat": "regex values", "allValue": null, "current": {}, - "datasource": "${DS_HMCI}", + "datasource": "${DS_INFLUXDB}", "definition": "SHOW TAG VALUES FROM \"vios_details\" WITH KEY = \"viosname\" WHERE servername =~ /$ServerName/ AND time > now() - 24h", "description": null, "error": null, @@ -1093,4 +1093,4 @@ "title": "IBM Power - HMCi - Virtual I/O Servers", "uid": "DDNEv5vGz", "version": 18 -} \ No newline at end of file +} From 74eead00465ba6248eee94249d7059a462437a53 Mon Sep 17 00:00:00 2001 From: Mark Nellemann Date: Thu, 10 Jun 2021 11:09:15 +0200 Subject: [PATCH 4/6] Include transmittedBytes for lpar generic adapter metrics. --- doc/readme-service.md | 13 +++++++++---- .../java/biz/nellemann/hmci/LogicalPartition.java | 1 + 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/doc/readme-service.md b/doc/readme-service.md index 15b4722..9d0e4f3 100644 --- a/doc/readme-service.md +++ b/doc/readme-service.md @@ -5,10 +5,15 @@ To install as a systemd service, copy the **hmci.service** file into */etc/systemd/system/* and enable the service: - systemctl daemon-reload - systemctl enable hmci.service - systemctl restart hmci.service +```shell +cp /opt/hmci/doc/hmci.service /etc/systemd/system/ +systemctl daemon-reload +systemctl enable hmci.service +systemctl restart hmci.service +``` To read log output from the service, use: - journalctl -f -u hmci.service +```shell +journalctl -f -u hmci.service +``` diff --git a/src/main/java/biz/nellemann/hmci/LogicalPartition.java b/src/main/java/biz/nellemann/hmci/LogicalPartition.java index 4bcc2fb..73b13e8 100644 --- a/src/main/java/biz/nellemann/hmci/LogicalPartition.java +++ b/src/main/java/biz/nellemann/hmci/LogicalPartition.java @@ -181,6 +181,7 @@ class LogicalPartition extends MetaSystem { fieldsMap.put("numOfWrites", adapter.numOfWrites); fieldsMap.put("writeBytes", adapter.writeBytes); fieldsMap.put("readBytes", adapter.readBytes); + fieldsMap.put("transmittedBytes", adapter.transmittedBytes); fieldsMap.put("type", adapter.type); log.trace("getVirtualGenericAdapterMetrics() - fields: " + fieldsMap.toString()); From a24401aa8aca541653adb87fd4d39009bcadf801 Mon Sep 17 00:00:00 2001 From: Mark Nellemann Date: Thu, 10 Jun 2021 12:31:44 +0200 Subject: [PATCH 5/6] Remove transmittedBytes from lpar generic adapter metrics, as value is always null. --- doc/readme-service.md | 2 +- .../biz/nellemann/hmci/HmcRestClient.java | 4 ++-- .../java/biz/nellemann/hmci/InfluxClient.java | 22 +++++++++---------- .../biz/nellemann/hmci/LogicalPartition.java | 1 - .../hmci/LogicalPartitionTest.groovy | 17 ++++++++++++++ 5 files changed, 31 insertions(+), 15 deletions(-) diff --git a/doc/readme-service.md b/doc/readme-service.md index 9d0e4f3..2a0813d 100644 --- a/doc/readme-service.md +++ b/doc/readme-service.md @@ -12,7 +12,7 @@ systemctl enable hmci.service systemctl restart hmci.service ``` -To read log output from the service, use: +To read log output from the service: ```shell journalctl -f -u hmci.service diff --git a/src/main/java/biz/nellemann/hmci/HmcRestClient.java b/src/main/java/biz/nellemann/hmci/HmcRestClient.java index 9a4fa3a..350bcd2 100644 --- a/src/main/java/biz/nellemann/hmci/HmcRestClient.java +++ b/src/main/java/biz/nellemann/hmci/HmcRestClient.java @@ -249,7 +249,7 @@ public class HmcRestClient { // Do not try to parse empty response if(responseBody == null || responseBody.isEmpty() || responseBody.length() <= 1) { responseErrors++; - log.warn("getPcmDataForManagedSystem() - empty response"); + log.warn("getPcmDataForManagedSystem() - empty response, skipping: " + system.name); return null; } @@ -287,7 +287,7 @@ public class HmcRestClient { // Do not try to parse empty response if(responseBody == null || responseBody.isEmpty() || responseBody.length() <= 1) { responseErrors++; - log.warn("getPcmDataForLogicalPartition() - empty response"); + log.warn("getPcmDataForLogicalPartition() - empty response, skipping: " + partition.name); return null; } diff --git a/src/main/java/biz/nellemann/hmci/InfluxClient.java b/src/main/java/biz/nellemann/hmci/InfluxClient.java index ad32b16..2b04681 100644 --- a/src/main/java/biz/nellemann/hmci/InfluxClient.java +++ b/src/main/java/biz/nellemann/hmci/InfluxClient.java @@ -122,13 +122,13 @@ class InfluxClient { void writeManagedSystem(ManagedSystem system) { if(system.metrics == null) { - log.trace("writeManagedSystem() - null metrics, skipping"); + log.trace("writeManagedSystem() - null metrics, skipping: " + system.name); return; } Instant timestamp = system.getTimestamp(); if(timestamp == null) { - log.warn("writeManagedSystem() - no timestamp, skipping"); + log.warn("writeManagedSystem() - no timestamp, skipping: " + system.name); return; } @@ -253,13 +253,13 @@ class InfluxClient { void writeLogicalPartition(LogicalPartition partition) { if(partition.metrics == null) { - log.warn("writeLogicalPartition() - null metrics, skipping"); + log.warn("writeLogicalPartition() - null metrics, skipping: " + partition.name); return; } Instant timestamp = partition.getTimestamp(); if(timestamp == null) { - log.warn("writeLogicalPartition() - no timestamp, skipping"); + log.warn("writeLogicalPartition() - no timestamp, skipping: " + partition.name); return; } @@ -311,21 +311,21 @@ class InfluxClient { */ - void writeSystemEnergy(SystemEnergy system) { + void writeSystemEnergy(SystemEnergy systemEnergy) { - if(system.metrics == null) { - log.trace("writeSystemEnergy() - null metrics, skipping"); + if(systemEnergy.metrics == null) { + log.trace("writeSystemEnergy() - null metrics, skipping: " + systemEnergy.system.name); return; } - Instant timestamp = system.getTimestamp(); + Instant timestamp = systemEnergy.getTimestamp(); if(timestamp == null) { - log.warn("writeSystemEnergy() - no timestamp, skipping"); + log.warn("writeSystemEnergy() - no timestamp, skipping: " + systemEnergy.system.name); return; } - getSystemEnergyPower(system, timestamp).forEach(it -> batchPoints.point(it) ); - getSystemEnergyTemperature(system, timestamp).forEach(it -> batchPoints.point(it) ); + getSystemEnergyPower(systemEnergy, timestamp).forEach(it -> batchPoints.point(it) ); + getSystemEnergyTemperature(systemEnergy, timestamp).forEach(it -> batchPoints.point(it) ); } private static List getSystemEnergyPower(SystemEnergy system, Instant timestamp) { diff --git a/src/main/java/biz/nellemann/hmci/LogicalPartition.java b/src/main/java/biz/nellemann/hmci/LogicalPartition.java index 73b13e8..4bcc2fb 100644 --- a/src/main/java/biz/nellemann/hmci/LogicalPartition.java +++ b/src/main/java/biz/nellemann/hmci/LogicalPartition.java @@ -181,7 +181,6 @@ class LogicalPartition extends MetaSystem { fieldsMap.put("numOfWrites", adapter.numOfWrites); fieldsMap.put("writeBytes", adapter.writeBytes); fieldsMap.put("readBytes", adapter.readBytes); - fieldsMap.put("transmittedBytes", adapter.transmittedBytes); fieldsMap.put("type", adapter.type); log.trace("getVirtualGenericAdapterMetrics() - fields: " + fieldsMap.toString()); diff --git a/src/test/groovy/biz/nellemann/hmci/LogicalPartitionTest.groovy b/src/test/groovy/biz/nellemann/hmci/LogicalPartitionTest.groovy index 95f9e7a..ec007a8 100644 --- a/src/test/groovy/biz/nellemann/hmci/LogicalPartitionTest.groovy +++ b/src/test/groovy/biz/nellemann/hmci/LogicalPartitionTest.groovy @@ -122,4 +122,21 @@ class LogicalPartitionTest extends Specification { } + void "test getVirtualGenericAdapterMetrics"() { + + setup: + def testFile = new File(getClass().getResource('/pcm-data-logical-partition.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 listOfMeasurements = lpar.getVirtualGenericAdapterMetrics() + + then: + listOfMeasurements.size() == 1 + listOfMeasurements.first().fields['readBytes'] == 0.0 + } + } From 005bf3d83ff977e138a2bb4b63704d4920e06cd2 Mon Sep 17 00:00:00 2001 From: Mark Nellemann Date: Fri, 11 Jun 2021 02:12:02 +0200 Subject: [PATCH 6/6] Improve logging for empty metrics and update example dashboards. --- README.md | 9 +- ...i - Logical Partitions-1623356281973.json} | 941 +++++++++++++----- ...- HMCi - System Energy-1623356319253.json} | 45 +- ...MCi - System Resources-1623356293052.json} | 658 +++++------- ... - Virtual I_O Servers-1623369593625.json} | 157 ++- gradle.properties | 2 +- 6 files changed, 1040 insertions(+), 772 deletions(-) rename doc/{IBM Power - HMCi - Logical Partitions-1617197406774.json => IBM Power - HMCi - Logical Partitions-1623356281973.json} (72%) rename doc/{IBM Power - HMCi - System Energy-1617197422138.json => IBM Power - HMCi - System Energy-1623356319253.json} (95%) rename doc/{IBM Power - HMCi - System Resources-1617197455766.json => IBM Power - HMCi - System Resources-1623356293052.json} (71%) rename doc/{IBM Power - HMCi - Virtual I_O Servers-1617197498035.json => IBM Power - HMCi - Virtual I_O Servers-1623369593625.json} (89%) diff --git a/README.md b/README.md index 798b3b9..c2a92da 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ Install InfluxDB on an *LPAR* or other server, which is network accessible by th ### Grafana Configuration - Configure Grafana to use InfluxDB as a new datasource - - set *Min time interval* to *30s* or *1m* depending on your HMCi *refresh* setting. + - **NOTE:** set *Min time interval* to *30s* or *1m* depending on your HMCi *refresh* setting. - Import example dashboards from the *doc/* folder into Grafana as a starting point and get creative making your own cool dashboards :) ## Notes @@ -87,10 +87,9 @@ ALTER RETENTION POLICY "autogen" ON "hmci" DURATION 90d Below are screenshots of the provided Grafana dashboards (found in the **doc/** folder), which can be used as a starting point. - - [hmci-resources.png](https://bitbucket.org/mnellemann/hmci/downloads/hmci-resources.png) - - [hmci-energy.png](https://bitbucket.org/mnellemann/hmci/downloads/hmci-energy.png) - - [hmci-vois.png](https://bitbucket.org/mnellemann/hmci/downloads/hmci-vios.png) - - [hmci-lpars](https://bitbucket.org/mnellemann/hmci/downloads/hmci-lpars.png) + - [hmci-systems.png](https://bitbucket.org/mnellemann/hmci/downloads/hmci-systems-dashboard.png) + - [hmci-vois.png](https://bitbucket.org/mnellemann/hmci/downloads/hmci-vios-dashboard.png) + - [hmci-lpars](https://bitbucket.org/mnellemann/hmci/downloads/hmci-lpars-dashboard.png) ## Known problems diff --git a/doc/IBM Power - HMCi - Logical Partitions-1617197406774.json b/doc/IBM Power - HMCi - Logical Partitions-1623356281973.json similarity index 72% rename from doc/IBM Power - HMCi - Logical Partitions-1617197406774.json rename to doc/IBM Power - HMCi - Logical Partitions-1623356281973.json index b816992..1b84bf0 100644 --- a/doc/IBM Power - HMCi - Logical Partitions-1617197406774.json +++ b/doc/IBM Power - HMCi - Logical Partitions-1623356281973.json @@ -1,8 +1,8 @@ { "__inputs": [ { - "name": "DS_INFLUXDB", - "label": "InfluxDB", + "name": "DS_INFLUXDB-HMCI", + "label": "InfluxDB-hmci", "description": "", "type": "datasource", "pluginId": "influxdb", @@ -20,12 +20,12 @@ "type": "grafana", "id": "grafana", "name": "Grafana", - "version": "7.4.2" + "version": "8.0.0" }, { "type": "panel", "id": "graph", - "name": "Graph", + "name": "Graph (old)", "version": "" }, { @@ -34,6 +34,12 @@ "name": "InfluxDB", "version": "1.0.0" }, + { + "type": "panel", + "id": "stat", + "name": "Stat", + "version": "" + }, { "type": "panel", "id": "table", @@ -60,12 +66,12 @@ "gnetId": 1510, "graphTooltip": 0, "id": null, - "iteration": 1617197381633, + "iteration": 1623355370775, "links": [], "panels": [ { "collapsed": false, - "datasource": "${DS_INFLUXDB}", + "datasource": "${DS_INFLUXDB-HMCI}", "gridPos": { "h": 1, "w": 24, @@ -79,7 +85,7 @@ "type": "row" }, { - "datasource": "${DS_INFLUXDB}", + "datasource": "${DS_INFLUXDB-HMCI}", "description": "", "fieldConfig": { "defaults": { @@ -107,50 +113,65 @@ { "matcher": { "id": "byName", - "options": "lparname" + "options": "Affinity Score" }, "properties": [ + { + "id": "color", + "value": { + "mode": "continuous-RdYlGr" + } + }, + { + "id": "unit", + "value": "percent" + }, + { + "id": "custom.displayMode", + "value": "basic" + }, + { + "id": "color", + "value": { + "mode": "continuous-RdYlGr" + } + }, { "id": "custom.width", - "value": 256 + "value": 372 } ] }, { "matcher": { "id": "byName", - "options": "affinityScore" + "options": "ID" }, "properties": [ { - "id": "color", - "value": { - "mode": "thresholds" - } - }, - { - "id": "unit", - "value": "percent" + "id": "custom.width", + "value": 126 } ] } ] }, "gridPos": { - "h": 8, - "w": 24, + "h": 7, + "w": 12, "x": 0, "y": 1 }, "id": 31, "options": { + "frameIndex": 0, "showHeader": true, "sortBy": [] }, - "pluginVersion": "7.4.2", + "pluginVersion": "8.0.0", "targets": [ { - "alias": "Read", + "alias": "", "groupBy": [ { "params": [ @@ -162,7 +183,246 @@ "measurement": "lpar_details", "orderByTime": "ASC", "policy": "default", - "query": "SELECT last(\"id\") AS \"id\", \"type\", \"osType\", \"state\", \"affinityScore\" FROM \"lpar_details\" WHERE (\"lparname\" =~ /^$LPAR$/) AND $timeFilter GROUP BY \"lparname\"", + "query": "SELECT last(\"id\") AS \"ID\", \"osType\" AS \"OS\", \"state\" AS \"State\", \"affinityScore\" AS \"Affinity Score\" FROM \"lpar_details\" WHERE (\"servername\" =~ /^$ServerName$/) AND (\"lparname\" =~ /^$LPAR$/) AND $timeFilter GROUP BY \"lparname\"", + "queryType": "randomWalk", + "rawQuery": false, + "refId": "A", + "resultFormat": "table", + "select": [ + [ + { + "params": [ + "id" + ], + "type": "field" + }, + { + "params": [], + "type": "last" + }, + { + "params": [ + "id" + ], + "type": "alias" + } + ], + [ + { + "params": [ + "type" + ], + "type": "field" + } + ], + [ + { + "params": [ + "affinityScore" + ], + "type": "field" + } + ], + [ + { + "params": [ + "state" + ], + "type": "field" + } + ], + [ + { + "params": [ + "osType" + ], + "type": "field" + } + ] + ], + "tags": [ + { + "key": "lparname", + "operator": "=~", + "value": "/^$LPAR$/" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "LPAR Details", + "transformations": [ + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true, + "type": true + }, + "indexByName": {}, + "renameByName": { + "affinityScore": "Affinity Score", + "id": "ID", + "lparname": "Name", + "osType": "OS", + "state": "State", + "type": "Type" + } + } + }, + { + "id": "sortBy", + "options": { + "fields": {}, + "sort": [ + { + "field": "Name" + } + ] + } + } + ], + "type": "table" + }, + { + "datasource": "${DS_INFLUXDB-HMCI}", + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-RdYlGr" + }, + "custom": { + "align": "center", + "displayMode": "auto", + "filterable": true + }, + "mappings": [], + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Name" + }, + "properties": [ + { + "id": "custom.width", + "value": 293 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Utilization" + }, + "properties": [ + { + "id": "unit", + "value": "percent" + }, + { + "id": "custom.displayMode", + "value": "basic" + }, + { + "id": "color", + "value": { + "mode": "continuous-GrYlRd" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Weight" + }, + "properties": [ + { + "id": "custom.width", + "value": 104 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Entitled" + }, + "properties": [ + { + "id": "custom.width", + "value": 111 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "VP" + }, + "properties": [ + { + "id": "custom.width", + "value": 108 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Mode" + }, + "properties": [ + { + "id": "custom.width", + "value": 121 + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 1 + }, + "id": 32, + "options": { + "showHeader": true, + "sortBy": [] + }, + "pluginVersion": "8.0.0", + "targets": [ + { + "alias": "Read", + "groupBy": [ + { + "params": [ + "lparname" + ], + "type": "tag" + } + ], + "hide": false, + "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 \"lpar_processor\" WHERE (\"servername\" =~ /^$ServerName$/) AND (\"lparname\" =~ /^$LPAR$/) AND $timeFilter GROUP BY \"lparname\" fill(previous)", "queryType": "randomWalk", "rawQuery": true, "refId": "A", @@ -230,17 +490,48 @@ ], "timeFrom": null, "timeShift": null, - "title": "", + "title": "LPAR Processor", + "transformations": [ + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true + }, + "indexByName": {}, + "renameByName": { + "Entitled": "Entitled", + "Mode": "Mode", + "Time": "Time", + "Utilization": "Utilization", + "VP": "VP", + "Weight": "Weight", + "lparname": "Name" + } + } + }, + { + "id": "sortBy", + "options": { + "fields": {}, + "sort": [ + { + "field": "Name" + } + ] + } + } + ], "type": "table" }, { "collapsed": false, - "datasource": "${DS_INFLUXDB}", + "datasource": "${DS_INFLUXDB-HMCI}", "gridPos": { "h": 1, "w": 24, "x": 0, - "y": 9 + "y": 8 }, "id": 18, "panels": [], @@ -254,17 +545,11 @@ "content": "", "dashLength": 10, "dashes": false, - "datasource": "${DS_INFLUXDB}", + "datasource": "${DS_INFLUXDB-HMCI}", "editable": true, "error": false, "fieldConfig": { "defaults": { - "color": {}, - "custom": {}, - "thresholds": { - "mode": "absolute", - "steps": [] - }, "unit": "Bps" }, "overrides": [] @@ -276,7 +561,7 @@ "h": 7, "w": 12, "x": 0, - "y": 10 + "y": 9 }, "hiddenSeries": false, "id": 11, @@ -302,7 +587,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "7.4.2", + "pluginVersion": "8.0.0", "pointradius": 5, "points": false, "renderer": "flot", @@ -416,17 +701,11 @@ "content": "", "dashLength": 10, "dashes": false, - "datasource": "${DS_INFLUXDB}", + "datasource": "${DS_INFLUXDB-HMCI}", "editable": true, "error": false, "fieldConfig": { "defaults": { - "color": {}, - "custom": {}, - "thresholds": { - "mode": "absolute", - "steps": [] - }, "unit": "Bps" }, "overrides": [] @@ -438,7 +717,7 @@ "h": 7, "w": 12, "x": 12, - "y": 10 + "y": 9 }, "hiddenSeries": false, "id": 19, @@ -464,7 +743,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "7.4.2", + "pluginVersion": "8.0.0", "pointradius": 5, "points": false, "renderer": "flot", @@ -578,30 +857,18 @@ "content": "", "dashLength": 10, "dashes": false, - "datasource": "${DS_INFLUXDB}", + "datasource": "${DS_INFLUXDB-HMCI}", "description": "", "editable": true, "error": false, - "fieldConfig": { - "defaults": { - "color": {}, - "custom": {}, - "thresholds": { - "mode": "absolute", - "steps": [] - }, - "unit": "Bps" - }, - "overrides": [] - }, "fill": 1, "fillGradient": 1, "grid": {}, "gridPos": { - "h": 6, + "h": 4, "w": 12, "x": 0, - "y": 17 + "y": 16 }, "hiddenSeries": false, "id": 13, @@ -627,7 +894,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "7.4.2", + "pluginVersion": "8.0.0", "pointradius": 5, "points": false, "renderer": "flot", @@ -638,7 +905,7 @@ "style": {}, "targets": [ { - "alias": "$tag_lparname writeBytes", + "alias": "$tag_lparname - $col", "dsType": "influxdb", "groupBy": [ { @@ -666,60 +933,25 @@ [ { "params": [ - "writeBytes" + "readBytes" ], "type": "field" }, { "params": [], "type": "mean" + }, + { + "params": [ + "read" + ], + "type": "alias" } - ] - ], - "tags": [ - { - "key": "servername", - "operator": "=~", - "value": "/^$ServerName$/" - }, - { - "condition": "AND", - "key": "lparname", - "operator": "=~", - "value": "/^$LPAR$/" - } - ] - }, - { - "alias": "$tag_lparname readBytes", - "dsType": "influxdb", - "groupBy": [ - { - "params": [ - "$interval" - ], - "type": "time" - }, - { - "params": [ - "lparname" - ], - "type": "tag" - } - ], - "hide": false, - "measurement": "lpar_storage_virtual", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT mean(\"value\") FROM \"PartitionVirtualFiberChannelAdapters\" WHERE (\"system\" =~ /^$ManagedSystem$/ AND \"name\" != 'transmittedBytes' AND \"partition\" =~ /^$Partition$/) AND $timeFilter GROUP BY time($interval), \"wwpn\", \"partition\", \"name\" fill(null)", - "rawQuery": false, - "refId": "B", - "resultFormat": "time_series", - "select": [ + ], [ { "params": [ - "readBytes" + "writeBytes" ], "type": "field" }, @@ -732,6 +964,12 @@ "*-1" ], "type": "math" + }, + { + "params": [ + "write" + ], + "type": "alias" } ] ], @@ -772,7 +1010,7 @@ "yaxes": [ { "$$hashKey": "object:3776", - "format": "Bps", + "format": "binBps", "label": null, "logBase": 1, "max": null, @@ -800,30 +1038,18 @@ "content": "", "dashLength": 10, "dashes": false, - "datasource": "${DS_INFLUXDB}", + "datasource": "${DS_INFLUXDB-HMCI}", "description": "", "editable": true, "error": false, - "fieldConfig": { - "defaults": { - "color": {}, - "custom": {}, - "thresholds": { - "mode": "absolute", - "steps": [] - }, - "unit": "Bps" - }, - "overrides": [] - }, "fill": 1, "fillGradient": 1, "grid": {}, "gridPos": { - "h": 6, + "h": 4, "w": 12, "x": 12, - "y": 17 + "y": 16 }, "hiddenSeries": false, "id": 12, @@ -849,7 +1075,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "7.4.2", + "pluginVersion": "8.0.0", "pointradius": 5, "points": false, "renderer": "flot", @@ -877,66 +1103,13 @@ } ], "hide": false, - "measurement": "lpar_storage_virtual", + "measurement": "lpar_storage_generic", "orderByTime": "ASC", "policy": "default", "query": "SELECT mean(\"writeBytes\") FROM \"lpar_storage_virtual\" WHERE (\"servername\" =~ /^$ServerName$/ AND \"lparname\" =~ /^$LparName$/) AND $timeFilter GROUP BY time($interval), \"lparname\"", "rawQuery": false, "refId": "A", "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "writeBytes" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [ - { - "key": "servername", - "operator": "=~", - "value": "/^$ServerName$/" - }, - { - "condition": "AND", - "key": "lparname", - "operator": "=~", - "value": "/^$LPAR$/" - } - ] - }, - { - "alias": "$tag_lparname readBytes", - "dsType": "influxdb", - "groupBy": [ - { - "params": [ - "$interval" - ], - "type": "time" - }, - { - "params": [ - "lparname" - ], - "type": "tag" - } - ], - "hide": false, - "measurement": "lpar_storage_generic", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT mean(\"value\") FROM \"PartitionVirtualFiberChannelAdapters\" WHERE (\"system\" =~ /^$ManagedSystem$/ AND \"name\" != 'transmittedBytes' AND \"partition\" =~ /^$Partition$/) AND $timeFilter GROUP BY time($interval), \"wwpn\", \"partition\", \"name\" fill(null)", - "rawQuery": false, - "refId": "B", - "resultFormat": "time_series", "select": [ [ { @@ -949,11 +1122,35 @@ "params": [], "type": "mean" }, + { + "params": [ + "read" + ], + "type": "alias" + } + ], + [ + { + "params": [ + "writeBytes" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + }, { "params": [ "*-1" ], "type": "math" + }, + { + "params": [ + "write" + ], + "type": "alias" } ] ], @@ -994,7 +1191,7 @@ "yaxes": [ { "$$hashKey": "object:3776", - "format": "Bps", + "format": "binBps", "label": null, "logBase": 1, "max": null, @@ -1018,12 +1215,12 @@ }, { "collapsed": false, - "datasource": "${DS_INFLUXDB}", + "datasource": "${DS_INFLUXDB-HMCI}", "gridPos": { "h": 1, "w": 24, "x": 0, - "y": 23 + "y": 20 }, "id": 15, "panels": [], @@ -1037,41 +1234,42 @@ "content": "", "dashLength": 10, "dashes": false, - "datasource": "${DS_INFLUXDB}", + "datasource": "${DS_INFLUXDB-HMCI}", "description": "", "editable": true, "error": false, "fieldConfig": { "defaults": { - "custom": {}, - "links": [] + "links": [], + "unit": "binBps" }, "overrides": [] }, - "fill": 0, - "fillGradient": 3, + "fill": 1, + "fillGradient": 2, "grid": {}, "gridPos": { "h": 6, "w": 12, "x": 0, - "y": 24 + "y": 21 }, "hiddenSeries": false, "id": 8, "legend": { "alignAsTable": false, - "avg": true, + "avg": false, "current": false, "hideEmpty": true, "hideZero": true, - "max": true, - "min": true, - "show": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, "sort": "avg", "sortDesc": true, "total": false, - "values": true + "values": false }, "lines": true, "linewidth": 1, @@ -1081,7 +1279,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "7.4.2", + "pluginVersion": "8.0.0", "pointradius": 5, "points": false, "renderer": "flot", @@ -1096,7 +1294,7 @@ "style": {}, "targets": [ { - "alias": "$tag_lparname recv", + "alias": "$tag_lparname", "dsType": "influxdb", "groupBy": [ { @@ -1175,7 +1373,7 @@ "yaxes": [ { "$$hashKey": "object:10101", - "format": "Bps", + "format": "binBps", "label": null, "logBase": 1, "max": null, @@ -1203,41 +1401,40 @@ "content": "", "dashLength": 10, "dashes": false, - "datasource": "${DS_INFLUXDB}", + "datasource": "${DS_INFLUXDB-HMCI}", "description": "", "editable": true, "error": false, "fieldConfig": { "defaults": { - "custom": {}, "links": [] }, "overrides": [] }, - "fill": 0, - "fillGradient": 3, + "fill": 1, + "fillGradient": 2, "grid": {}, "gridPos": { "h": 6, "w": 12, "x": 12, - "y": 24 + "y": 21 }, "hiddenSeries": false, "id": 16, "legend": { "alignAsTable": false, - "avg": true, + "avg": false, "current": false, "hideEmpty": true, "hideZero": true, - "max": true, - "min": true, - "show": false, + "max": false, + "min": false, + "show": true, "sort": "avg", "sortDesc": true, "total": false, - "values": true + "values": false }, "lines": true, "linewidth": 1, @@ -1247,7 +1444,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "7.4.2", + "pluginVersion": "8.0.0", "pointradius": 5, "points": false, "renderer": "flot", @@ -1365,12 +1562,12 @@ }, { "collapsed": false, - "datasource": "${DS_INFLUXDB}", + "datasource": "${DS_INFLUXDB-HMCI}", "gridPos": { "h": 1, "w": 24, "x": 0, - "y": 30 + "y": 27 }, "id": 21, "panels": [], @@ -1384,40 +1581,39 @@ "content": "", "dashLength": 10, "dashes": false, - "datasource": "${DS_INFLUXDB}", + "datasource": "${DS_INFLUXDB-HMCI}", "decimals": 2, "editable": true, "error": false, "fieldConfig": { "defaults": { - "custom": {}, "links": [] }, "overrides": [] }, - "fill": 1, + "fill": 0, "fillGradient": 0, "grid": {}, "gridPos": { - "h": 6, - "w": 24, + "h": 8, + "w": 14, "x": 0, - "y": 31 + "y": 28 }, "hiddenSeries": false, "id": 2, "legend": { - "alignAsTable": true, - "avg": true, + "alignAsTable": false, + "avg": false, "current": false, - "max": true, - "min": true, + "max": false, + "min": false, "rightSide": false, - "show": false, + "show": true, "sort": "avg", "sortDesc": true, "total": false, - "values": true + "values": false }, "lines": true, "linewidth": 1, @@ -1428,7 +1624,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "7.4.2", + "pluginVersion": "8.0.0", "pointradius": 5, "points": false, "renderer": "flot", @@ -1440,26 +1636,13 @@ "targets": [ { "alias": "$tag_lparname", - "dsType": "influxdb", "groupBy": [ { "params": [ - "$interval" + "$__interval" ], "type": "time" }, - { - "params": [ - "lparname" - ], - "type": "tag" - }, - { - "params": [ - "servername" - ], - "type": "tag" - }, { "params": [ "null" @@ -1468,16 +1651,18 @@ } ], "hide": false, - "measurement": "lpar_processor", + "measurement": "/^$ServerName$/", "orderByTime": "ASC", "policy": "default", + "query": "SELECT (last(\"utilizedProcUnits\") / last(\"maxProcUnits\")) * 100 AS \"usage\" FROM \"lpar_processor\" WHERE (\"servername\" =~ /^$ServerName$/ AND \"lparname\" =~ /^$LPAR$/) AND $timeFilter GROUP BY time($interval), \"lparname\", \"servername\" fill(null)", + "rawQuery": true, "refId": "A", "resultFormat": "time_series", "select": [ [ { "params": [ - "utilizedProcUnits" + "value" ], "type": "field" }, @@ -1487,32 +1672,21 @@ } ] ], - "tags": [ - { - "key": "servername", - "operator": "=~", - "value": "/^$ServerName$/" - }, - { - "condition": "AND", - "key": "lparname", - "operator": "=~", - "value": "/^$LPAR$/" - } - ] + "tags": [] } ], "thresholds": [], "timeFrom": null, "timeRegions": [], "timeShift": null, - "title": "Processor Units - Utilization", + "title": "Processor Units - Utilization Percentage", "tooltip": { "msResolution": false, "shared": true, - "sort": 2, + "sort": 0, "value_type": "individual" }, + "transformations": [], "type": "graph", "xaxis": { "buckets": null, @@ -1524,11 +1698,12 @@ "yaxes": [ { "$$hashKey": "object:4943", - "format": "short", - "label": "cores", + "decimals": null, + "format": "percent", + "label": "", "logBase": 1, - "max": null, - "min": null, + "max": "110", + "min": "0", "show": true }, { @@ -1546,14 +1721,118 @@ "alignLevel": null } }, + { + "datasource": "${DS_INFLUXDB-HMCI}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 2, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "#EAB839", + "value": 65 + }, + { + "color": "orange", + "value": 80 + }, + { + "color": "red", + "value": 95 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 10, + "x": 14, + "y": 28 + }, + "id": 34, + "links": [], + "options": { + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true, + "text": {} + }, + "pluginVersion": "8.0.0", + "targets": [ + { + "alias": "$tag_lparname", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "hide": false, + "measurement": "/^$ServerName$/", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT (last(\"utilizedProcUnits\") / last(\"maxProcUnits\")) * 100 AS \"usage\" FROM \"lpar_processor\" WHERE (\"servername\" =~ /^$ServerName$/ AND \"lparname\" =~ /^$LPAR$/) AND $timeFilter GROUP BY time($interval), \"lparname\", \"servername\" fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Processor Units - Utilization Percentage", + "transformations": [], + "type": "gauge" + }, { "collapsed": false, - "datasource": "${DS_INFLUXDB}", + "datasource": "${DS_INFLUXDB-HMCI}", "gridPos": { "h": 1, "w": 24, "x": 0, - "y": 37 + "y": 36 }, "id": 23, "panels": [], @@ -1562,12 +1841,13 @@ "type": "row" }, { - "datasource": "${DS_INFLUXDB}", + "datasource": "${DS_INFLUXDB-HMCI}", "description": "", "fieldConfig": { "defaults": { - "custom": {}, "mappings": [], + "max": 100, + "min": 0, "thresholds": { "mode": "absolute", "steps": [ @@ -1590,17 +1870,17 @@ "overrides": [] }, "gridPos": { - "h": 12, - "w": 24, + "h": 8, + "w": 12, "x": 0, - "y": 38 + "y": 37 }, "id": 9, "options": { "orientation": "auto", "reduceOptions": { "calcs": [ - "mean" + "lastNotNull" ], "fields": "", "values": false @@ -1609,7 +1889,118 @@ "showThresholdMarkers": true, "text": {} }, - "pluginVersion": "7.4.2", + "pluginVersion": "8.0.0", + "targets": [ + { + "alias": "$tag_lparname", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "lparname" + ], + "type": "tag" + }, + { + "params": [ + "previous" + ], + "type": "fill" + } + ], + "hide": false, + "measurement": "lpar_details", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "affinityScore" + ], + "type": "field" + }, + { + "params": [], + "type": "last" + } + ] + ], + "tags": [ + { + "key": "servername", + "operator": "=~", + "value": "/^$ServerName$/" + }, + { + "condition": "AND", + "key": "lparname", + "operator": "=~", + "value": "/^$LPAR$/" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "NUMA Affinity Score", + "type": "gauge" + }, + { + "cacheTimeout": null, + "datasource": "${DS_INFLUXDB-HMCI}", + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "decmbytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 37 + }, + "id": 33, + "links": [], + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.0.0", "targets": [ { "alias": "$tag_lparname", @@ -1635,7 +2026,7 @@ } ], "hide": false, - "measurement": "lpar_details", + "measurement": "lpar_memory", "orderByTime": "ASC", "policy": "default", "refId": "A", @@ -1644,13 +2035,13 @@ [ { "params": [ - "affinityScore" + "logicalMem" ], "type": "field" }, { "params": [], - "type": "mean" + "type": "last" } ] ], @@ -1671,12 +2062,12 @@ ], "timeFrom": null, "timeShift": null, - "title": "NUMA Affinity Score", - "type": "gauge" + "title": "Memory Assigned", + "type": "stat" } ], "refresh": "1m", - "schemaVersion": 27, + "schemaVersion": 30, "style": "dark", "tags": [ "Power" @@ -1687,7 +2078,7 @@ "allFormat": "regex values", "allValue": null, "current": {}, - "datasource": "${DS_INFLUXDB}", + "datasource": "${DS_INFLUXDB-HMCI}", "definition": "SHOW TAG VALUES FROM \"server_processor\" WITH KEY = \"servername\" WHERE time > now() - 24h", "description": null, "error": null, @@ -1705,7 +2096,6 @@ "skipUrlSync": false, "sort": 0, "tagValuesQuery": null, - "tags": [], "tagsQuery": null, "type": "query", "useTags": false @@ -1714,7 +2104,7 @@ "allFormat": "regex values", "allValue": null, "current": {}, - "datasource": "${DS_INFLUXDB}", + "datasource": "${DS_INFLUXDB-HMCI}", "definition": "SHOW TAG VALUES FROM \"lpar_processor\" WITH KEY = \"lparname\" WHERE servername =~ /$ServerName/", "description": null, "error": null, @@ -1732,7 +2122,6 @@ "skipUrlSync": false, "sort": 5, "tagValuesQuery": null, - "tags": [], "tagsQuery": null, "type": "query", "useTags": false @@ -1740,7 +2129,7 @@ ] }, "time": { - "from": "now-2d", + "from": "now-6h", "now": false, "to": "now-1m" }, @@ -1771,5 +2160,5 @@ "timezone": "browser", "title": "IBM Power - HMCi - Logical Partitions", "uid": "Xl7oHESGz", - "version": 20 -} + "version": 29 +} \ No newline at end of file diff --git a/doc/IBM Power - HMCi - System Energy-1617197422138.json b/doc/IBM Power - HMCi - System Energy-1623356319253.json similarity index 95% rename from doc/IBM Power - HMCi - System Energy-1617197422138.json rename to doc/IBM Power - HMCi - System Energy-1623356319253.json index d07aae6..9e7cab1 100644 --- a/doc/IBM Power - HMCi - System Energy-1617197422138.json +++ b/doc/IBM Power - HMCi - System Energy-1623356319253.json @@ -1,8 +1,8 @@ { "__inputs": [ { - "name": "DS_INFLUXDB", - "label": "InfluxDB", + "name": "DS_INFLUXDB-HMCI", + "label": "InfluxDB-hmci", "description": "", "type": "datasource", "pluginId": "influxdb", @@ -14,12 +14,12 @@ "type": "grafana", "id": "grafana", "name": "Grafana", - "version": "7.4.2" + "version": "8.0.0" }, { "type": "panel", "id": "graph", - "name": "Graph", + "name": "Graph (old)", "version": "" }, { @@ -53,7 +53,7 @@ "gnetId": null, "graphTooltip": 0, "id": null, - "iteration": 1617197417499, + "iteration": 1623356314349, "links": [], "panels": [ { @@ -61,11 +61,10 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "${DS_INFLUXDB}", + "datasource": "${DS_INFLUXDB-HMCI}", "description": "", "fieldConfig": { "defaults": { - "custom": {}, "links": [], "unit": "watt" }, @@ -97,7 +96,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "7.4.2", + "pluginVersion": "8.0.0", "pointradius": 2, "points": false, "renderer": "flot", @@ -200,10 +199,9 @@ } }, { - "datasource": "${DS_INFLUXDB}", + "datasource": "${DS_INFLUXDB-HMCI}", "fieldConfig": { "defaults": { - "custom": {}, "mappings": [], "thresholds": { "mode": "absolute", @@ -248,7 +246,7 @@ "text": {}, "textMode": "auto" }, - "pluginVersion": "7.4.2", + "pluginVersion": "8.0.0", "targets": [ { "alias": "$tag_servername", @@ -307,7 +305,7 @@ }, { "collapsed": false, - "datasource": "${DS_INFLUXDB}", + "datasource": "${DS_INFLUXDB-HMCI}", "gridPos": { "h": 1, "w": 24, @@ -321,14 +319,13 @@ "type": "row" }, { - "datasource": "${DS_INFLUXDB}", + "datasource": "${DS_INFLUXDB-HMCI}", "description": "Inlet air temperature.", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, - "custom": {}, "links": [], "mappings": [], "thresholds": { @@ -374,7 +371,7 @@ "text": {}, "textMode": "auto" }, - "pluginVersion": "7.4.2", + "pluginVersion": "8.0.0", "targets": [ { "alias": "$tag_servername - $tag_name", @@ -436,16 +433,11 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "${DS_INFLUXDB}", + "datasource": "${DS_INFLUXDB-HMCI}", "description": "", "fieldConfig": { "defaults": { - "custom": {}, "links": [], - "thresholds": { - "mode": "absolute", - "steps": [] - }, "unit": "celsius" }, "overrides": [] @@ -478,7 +470,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "7.4.2", + "pluginVersion": "8.0.0", "pointradius": 2, "points": false, "renderer": "flot", @@ -645,7 +637,7 @@ } ], "refresh": "1m", - "schemaVersion": 27, + "schemaVersion": 30, "style": "dark", "tags": [ "POWER" @@ -655,7 +647,7 @@ { "allValue": null, "current": {}, - "datasource": "${DS_INFLUXDB}", + "datasource": "${DS_INFLUXDB-HMCI}", "definition": "SHOW TAG VALUES FROM \"server_processor\" WITH KEY = \"servername\" WHERE time > now() - 24h", "description": null, "error": null, @@ -671,7 +663,6 @@ "skipUrlSync": false, "sort": 0, "tagValuesQuery": "", - "tags": [], "tagsQuery": "", "type": "query", "useTags": false @@ -698,5 +689,5 @@ "timezone": "", "title": "IBM Power - HMCi - System Energy", "uid": "oHcrgD1Mk", - "version": 20 -} + "version": 2 +} \ No newline at end of file diff --git a/doc/IBM Power - HMCi - System Resources-1617197455766.json b/doc/IBM Power - HMCi - System Resources-1623356293052.json similarity index 71% rename from doc/IBM Power - HMCi - System Resources-1617197455766.json rename to doc/IBM Power - HMCi - System Resources-1623356293052.json index dfd5838..a109ecc 100644 --- a/doc/IBM Power - HMCi - System Resources-1617197455766.json +++ b/doc/IBM Power - HMCi - System Resources-1623356293052.json @@ -1,8 +1,8 @@ { "__inputs": [ { - "name": "DS_INFLUXDB", - "label": "InfluxDB", + "name": "DS_INFLUXDB-HMCI", + "label": "InfluxDB-hmci", "description": "", "type": "datasource", "pluginId": "influxdb", @@ -10,28 +10,16 @@ } ], "__requires": [ - { - "type": "panel", - "id": "bargauge", - "name": "Bar gauge", - "version": "" - }, { "type": "grafana", "id": "grafana", "name": "Grafana", - "version": "7.4.2" + "version": "8.0.0" }, { "type": "panel", "id": "graph", - "name": "Graph", - "version": "" - }, - { - "type": "panel", - "id": "heatmap", - "name": "Heatmap", + "name": "Graph (old)", "version": "" }, { @@ -60,12 +48,12 @@ "gnetId": 1465, "graphTooltip": 0, "id": null, - "iteration": 1617197428882, + "iteration": 1623356287981, "links": [], "panels": [ { "collapsed": false, - "datasource": "${DS_INFLUXDB}", + "datasource": "${DS_INFLUXDB-HMCI}", "gridPos": { "h": 1, "w": 24, @@ -75,7 +63,7 @@ "id": 20, "panels": [], "repeat": "ServerName", - "title": "Processors - $ServerName", + "title": "Server - $ServerName", "type": "row" }, { @@ -84,19 +72,14 @@ "content": "", "dashLength": 10, "dashes": false, - "datasource": "${DS_INFLUXDB}", + "datasource": "${DS_INFLUXDB-HMCI}", "decimals": 2, "description": "", "editable": true, "error": false, "fieldConfig": { "defaults": { - "custom": {}, - "links": [], - "thresholds": { - "mode": "absolute", - "steps": [] - } + "links": [] }, "overrides": [] }, @@ -104,7 +87,7 @@ "fillGradient": 1, "grid": {}, "gridPos": { - "h": 7, + "h": 9, "w": 12, "x": 0, "y": 1 @@ -113,16 +96,16 @@ "id": 19, "legend": { "alignAsTable": false, - "avg": true, + "avg": false, "current": true, - "max": true, - "min": true, - "show": false, + "max": false, + "min": false, + "show": true, "total": false, "values": true }, "lines": true, - "linewidth": 2, + "linewidth": 1, "links": [], "mode": "", "nullPointMode": "connected", @@ -130,7 +113,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "7.4.2", + "pluginVersion": "8.0.0", "pointradius": 5, "points": false, "renderer": "flot", @@ -141,7 +124,7 @@ "style": {}, "targets": [ { - "alias": "$tag_poolname", + "alias": "$tag_poolname - $col - ", "dsType": "influxdb", "groupBy": [ { @@ -186,6 +169,12 @@ { "params": [], "type": "mean" + }, + { + "params": [ + "Utilized Proc. Units" + ], + "type": "alias" } ] ], @@ -248,26 +237,21 @@ "content": "", "dashLength": 10, "dashes": false, - "datasource": "${DS_INFLUXDB}", + "datasource": "${DS_INFLUXDB-HMCI}", "decimals": 2, "editable": true, "error": false, "fieldConfig": { "defaults": { - "custom": {}, - "links": [], - "thresholds": { - "mode": "absolute", - "steps": [] - } + "links": [] }, "overrides": [] }, - "fill": 0, - "fillGradient": 0, + "fill": 1, + "fillGradient": 1, "grid": {}, "gridPos": { - "h": 7, + "h": 9, "w": 12, "x": 12, "y": 1 @@ -276,16 +260,16 @@ "id": 2, "legend": { "alignAsTable": false, - "avg": true, - "current": true, - "max": true, + "avg": false, + "current": false, + "max": false, "min": false, - "show": false, + "show": true, "total": false, - "values": true + "values": false }, "lines": true, - "linewidth": 2, + "linewidth": 1, "links": [], "mode": "", "nullPointMode": "connected", @@ -293,7 +277,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "7.4.2", + "pluginVersion": "8.0.0", "pointradius": 5, "points": false, "renderer": "flot", @@ -552,147 +536,18 @@ "alignLevel": null } }, - { - "cards": { - "cardPadding": null, - "cardRound": null - }, - "color": { - "cardColor": "#b4ff00", - "colorScale": "sqrt", - "colorScheme": "interpolateBlues", - "exponent": 0.5, - "mode": "spectrum" - }, - "dataFormat": "timeseries", - "datasource": "${DS_INFLUXDB}", - "description": "", - "fieldConfig": { - "defaults": { - "custom": {}, - "thresholds": { - "mode": "absolute", - "steps": [] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 8 - }, - "heatmap": {}, - "hideZeroBuckets": true, - "highlightCards": true, - "id": 34, - "legend": { - "show": true - }, - "links": [], - "pluginVersion": "7.1.3", - "reverseYBuckets": false, - "targets": [ - { - "alias": "", - "dsType": "influxdb", - "groupBy": [ - { - "params": [ - "$interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "hide": false, - "measurement": "server_processor", - "orderByTime": "ASC", - "policy": "default", - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "utilizedProcUnits" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [ - { - "key": "servername", - "operator": "=~", - "value": "/^$ServerName$/" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Processor Utilization", - "tooltip": { - "show": true, - "showHistogram": true - }, - "type": "heatmap", - "xAxis": { - "show": true - }, - "xBucketNumber": null, - "xBucketSize": null, - "yAxis": { - "decimals": null, - "format": "short", - "logBase": 1, - "max": null, - "min": null, - "show": true, - "splitFactor": null - }, - "yBucketBound": "auto", - "yBucketNumber": null, - "yBucketSize": null - }, - { - "collapsed": false, - "datasource": "${DS_INFLUXDB}", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 32 - }, - "id": 22, - "panels": [], - "repeat": "ServerName", - "title": "Network & Storage I/O - $ServerName ", - "type": "row" - }, { "aliasColors": {}, "bars": false, "content": "", "dashLength": 10, "dashes": false, - "datasource": "${DS_INFLUXDB}", + "datasource": "${DS_INFLUXDB-HMCI}", + "description": "", "editable": true, "error": false, "fieldConfig": { "defaults": { - "custom": {}, "links": [] }, "overrides": [] @@ -701,28 +556,28 @@ "fillGradient": 1, "grid": {}, "gridPos": { - "h": 8, + "h": 9, "w": 12, "x": 0, - "y": 33 + "y": 10 }, "hiddenSeries": false, "id": 16, "legend": { - "alignAsTable": true, - "avg": true, + "alignAsTable": false, + "avg": false, "current": false, "hideEmpty": true, "hideZero": true, - "max": true, + "max": false, "min": false, "rightSide": false, - "show": false, + "show": true, "total": false, - "values": true + "values": false }, "lines": true, - "linewidth": 2, + "linewidth": 1, "links": [], "mode": "", "nullPointMode": "connected", @@ -730,7 +585,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "7.4.2", + "pluginVersion": "8.0.0", "pointradius": 5, "points": false, "renderer": "flot", @@ -802,7 +657,7 @@ "timeFrom": null, "timeRegions": [], "timeShift": null, - "title": "$ServerName - Physical Fiber Channel Adapters", + "title": "Physical Fiber Channel Adapters", "tooltip": { "msResolution": false, "shared": true, @@ -848,13 +703,12 @@ "content": "", "dashLength": 10, "dashes": false, - "datasource": "${DS_INFLUXDB}", + "datasource": "${DS_INFLUXDB-HMCI}", "description": "", "editable": true, "error": false, "fieldConfig": { "defaults": { - "custom": {}, "links": [] }, "overrides": [] @@ -863,25 +717,25 @@ "fillGradient": 2, "grid": {}, "gridPos": { - "h": 8, + "h": 9, "w": 12, "x": 12, - "y": 33 + "y": 10 }, "hiddenSeries": false, "id": 11, "legend": { - "alignAsTable": true, - "avg": true, + "alignAsTable": false, + "avg": false, "current": false, "hideEmpty": true, "hideZero": true, - "max": true, - "min": true, + "max": false, + "min": false, "rightSide": false, - "show": false, + "show": true, "total": false, - "values": true + "values": false }, "lines": true, "linewidth": 1, @@ -892,7 +746,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "7.4.2", + "pluginVersion": "8.0.0", "pointradius": 5, "points": false, "renderer": "flot", @@ -903,7 +757,7 @@ "style": {}, "targets": [ { - "alias": "VLAN $tag_vlanId recv", + "alias": "VLAN-$tag_vlanId $col", "dsType": "influxdb", "groupBy": [ { @@ -948,53 +802,14 @@ { "params": [], "type": "mean" + }, + { + "params": [ + "recv" + ], + "type": "alias" } - ] - ], - "tags": [ - { - "key": "servername", - "operator": "=~", - "value": "/^$ServerName$/" - } - ] - }, - { - "alias": "VLAN $tag_vlanId sent", - "dsType": "influxdb", - "groupBy": [ - { - "params": [ - "$interval" - ], - "type": "time" - }, - { - "params": [ - "servername" - ], - "type": "tag" - }, - { - "params": [ - "vlanId" - ], - "type": "tag" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "hide": false, - "measurement": "lpar_net_virtual", - "orderByTime": "ASC", - "policy": "default", - "refId": "B", - "resultFormat": "time_series", - "select": [ + ], [ { "params": [ @@ -1008,9 +823,15 @@ }, { "params": [ - "*-1" + " *-1" ], "type": "math" + }, + { + "params": [ + "sent" + ], + "type": "alias" } ] ], @@ -1027,7 +848,7 @@ "timeFrom": null, "timeRegions": [], "timeShift": null, - "title": "$ServerName - Network", + "title": "Network - Partitions", "tooltip": { "msResolution": false, "shared": true, @@ -1045,7 +866,7 @@ "yaxes": [ { "$$hashKey": "object:1686", - "format": "Bps", + "format": "binBps", "label": null, "logBase": 1, "max": null, @@ -1067,128 +888,157 @@ "alignLevel": null } }, - { - "collapsed": false, - "datasource": "${DS_INFLUXDB}", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 82 - }, - "id": 21, - "panels": [], - "repeat": "ServerName", - "title": "Partition Usage - $ServerName", - "type": "row" - }, { "aliasColors": {}, "bars": false, - "content": "", "dashLength": 10, "dashes": false, - "datasource": "${DS_INFLUXDB}", - "decimals": 2, - "editable": true, - "error": false, + "datasource": "${DS_INFLUXDB-HMCI}", + "description": "", "fieldConfig": { "defaults": { - "custom": {}, - "links": [] + "links": [], + "unit": "celsius" }, "overrides": [] }, - "fill": 2, - "fillGradient": 2, - "grid": {}, + "fill": 1, + "fillGradient": 1, "gridPos": { - "h": 7, + "h": 10, "w": 12, "x": 0, - "y": 83 + "y": 19 }, "hiddenSeries": false, - "id": 12, + "id": 26, "legend": { - "alignAsTable": true, - "avg": true, + "avg": false, "current": true, "hideEmpty": true, "hideZero": true, - "max": true, - "min": true, - "show": false, - "sort": "avg", - "sortDesc": true, + "max": false, + "min": false, + "show": true, "total": false, "values": true }, "lines": true, - "linewidth": 2, - "links": [], - "mode": "", - "nullPointMode": "connected", + "linewidth": 1, + "nullPointMode": "null", "options": { "alertThreshold": true }, "percentage": false, - "pluginVersion": "7.4.2", - "pointradius": 5, + "pluginVersion": "8.0.0", + "pointradius": 2, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, - "stack": true, + "stack": false, "steppedLine": false, - "style": {}, "targets": [ { - "alias": "$tag_lparname", - "dsType": "influxdb", + "alias": "$col", "groupBy": [ { "params": [ - "$interval" + "$__interval" ], "type": "time" }, { "params": [ - "lparname" + "system" ], "type": "tag" }, { "params": [ - "servername" - ], - "type": "tag" - }, - { - "params": [ - "null" + "linear" ], "type": "fill" } ], - "hide": false, - "measurement": "lpar_processor", + "measurement": "server_energy_thermal", "orderByTime": "ASC", "policy": "default", + "query": "SELECT mean(\"cpuTemperature*\") FROM \"server_energy_thermal\" WHERE (\"servername\" =~ /^$ServerName$/) AND $timeFilter GROUP BY time($__interval), \"system\", \"servername\" fill(linear)", + "rawQuery": false, "refId": "A", "resultFormat": "time_series", "select": [ [ { "params": [ - "utilizedProcUnits" + "cpuTemperature_1" ], "type": "field" }, { "params": [], "type": "mean" + }, + { + "params": [ + "CPU-1" + ], + "type": "alias" + } + ], + [ + { + "params": [ + "cpuTemperature_2" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + }, + { + "params": [ + "CPU-2" + ], + "type": "alias" + } + ], + [ + { + "params": [ + "cpuTemperature_3" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + }, + { + "params": [ + "CPU-3" + ], + "type": "alias" + } + ], + [ + { + "params": [ + "cpuTemperature_4" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + }, + { + "params": [ + "CPU-4" + ], + "type": "alias" } ] ], @@ -1197,12 +1047,6 @@ "key": "servername", "operator": "=~", "value": "/^$ServerName$/" - }, - { - "condition": "AND", - "key": "lparname", - "operator": "=~", - "value": "/^$LPAR$/" } ] } @@ -1211,9 +1055,8 @@ "timeFrom": null, "timeRegions": [], "timeShift": null, - "title": "LPAR Processor Utilization", + "title": "CPU Temperature", "tooltip": { - "msResolution": false, "shared": true, "sort": 2, "value_type": "individual" @@ -1228,16 +1071,17 @@ }, "yaxes": [ { - "$$hashKey": "object:4567", - "format": "short", - "label": "cores", + "$$hashKey": "object:5961", + "decimals": 0, + "format": "celsius", + "label": "", "logBase": 1, "max": null, - "min": "0", + "min": null, "show": true }, { - "$$hashKey": "object:4568", + "$$hashKey": "object:5962", "format": "short", "label": null, "logBase": 1, @@ -1252,59 +1096,58 @@ } }, { - "datasource": "${DS_INFLUXDB}", - "description": "", + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_INFLUXDB-HMCI}", "fieldConfig": { "defaults": { - "custom": {}, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "decmbytes" + "unit": "watt" }, "overrides": [] }, + "fill": 1, + "fillGradient": 0, "gridPos": { - "h": 7, + "h": 10, "w": 12, "x": 12, - "y": 83 + "y": 19 }, - "id": 23, - "links": [], + "hiddenSeries": false, + "id": 22, + "legend": { + "avg": false, + "current": true, + "max": false, + "min": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", "options": { - "displayMode": "gradient", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "mean" - ], - "fields": "", - "values": false - }, - "showUnfilled": true, - "text": {} + "alertThreshold": true }, - "pluginVersion": "7.4.2", + "percentage": false, + "pluginVersion": "8.0.0", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, "targets": [ { - "alias": "$tag_lparname", - "dsType": "influxdb", + "alias": "$tag_servername", "groupBy": [ { "params": [ - "$interval" + "$__interval" ], "type": "time" }, @@ -1316,19 +1159,12 @@ }, { "params": [ - "lparname" - ], - "type": "tag" - }, - { - "params": [ - "null" + "linear" ], "type": "fill" } ], - "hide": false, - "measurement": "lpar_memory", + "measurement": "server_energy_power", "orderByTime": "ASC", "policy": "default", "refId": "A", @@ -1337,7 +1173,7 @@ [ { "params": [ - "logicalMem" + "powerReading" ], "type": "field" }, @@ -1352,24 +1188,54 @@ "key": "servername", "operator": "=~", "value": "/^$ServerName$/" - }, - { - "condition": "AND", - "key": "lparname", - "operator": "=~", - "value": "/^$LPAR$/" } ] } ], + "thresholds": [], "timeFrom": null, + "timeRegions": [], "timeShift": null, - "title": "LPAR Memory Usage", - "type": "bargauge" + "title": "Power Consumption", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "watt", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } } ], "refresh": "1m", - "schemaVersion": 27, + "schemaVersion": 30, "style": "dark", "tags": [ "Power" @@ -1380,7 +1246,7 @@ "allFormat": "regex values", "allValue": null, "current": {}, - "datasource": "${DS_INFLUXDB}", + "datasource": "${DS_INFLUXDB-HMCI}", "definition": "SHOW TAG VALUES FROM \"server_processor\" WITH KEY = \"servername\" WHERE time > now() - 24h", "description": null, "error": null, @@ -1398,34 +1264,6 @@ "skipUrlSync": false, "sort": 0, "tagValuesQuery": null, - "tags": [], - "tagsQuery": null, - "type": "query", - "useTags": false - }, - { - "allFormat": "regex values", - "allValue": null, - "current": {}, - "datasource": "${DS_INFLUXDB}", - "definition": "SHOW TAG VALUES FROM \"lpar_processor\" WITH KEY = \"lparname\" WHERE servername =~ /$ServerName/", - "description": null, - "error": null, - "hide": 0, - "includeAll": true, - "label": "Partition", - "multi": true, - "multiFormat": "regex values", - "name": "LPAR", - "options": [], - "query": "SHOW TAG VALUES FROM \"lpar_processor\" WITH KEY = \"lparname\" WHERE servername =~ /$ServerName/", - "refresh": 1, - "refresh_on_load": false, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": null, - "tags": [], "tagsQuery": null, "type": "query", "useTags": false @@ -1464,5 +1302,5 @@ "timezone": "browser", "title": "IBM Power - HMCi - System Resources", "uid": "ClJhHPIGz", - "version": 26 -} + "version": 7 +} \ No newline at end of file diff --git a/doc/IBM Power - HMCi - Virtual I_O Servers-1617197498035.json b/doc/IBM Power - HMCi - Virtual I_O Servers-1623369593625.json similarity index 89% rename from doc/IBM Power - HMCi - Virtual I_O Servers-1617197498035.json rename to doc/IBM Power - HMCi - Virtual I_O Servers-1623369593625.json index 66ea70c..972c015 100644 --- a/doc/IBM Power - HMCi - Virtual I_O Servers-1617197498035.json +++ b/doc/IBM Power - HMCi - Virtual I_O Servers-1623369593625.json @@ -1,8 +1,8 @@ { "__inputs": [ { - "name": "DS_INFLUXDB", - "label": "InfluxDB", + "name": "DS_INFLUXDB-HMCI", + "label": "InfluxDB-hmci", "description": "", "type": "datasource", "pluginId": "influxdb", @@ -20,12 +20,12 @@ "type": "grafana", "id": "grafana", "name": "Grafana", - "version": "7.4.2" + "version": "8.0.0" }, { "type": "panel", "id": "graph", - "name": "Graph", + "name": "Graph (old)", "version": "" }, { @@ -60,11 +60,11 @@ "gnetId": 1465, "graphTooltip": 0, "id": null, - "iteration": 1617197467456, + "iteration": 1623369402365, "links": [], "panels": [ { - "datasource": "${DS_INFLUXDB}", + "datasource": "${DS_INFLUXDB-HMCI}", "description": "", "fieldConfig": { "defaults": { @@ -92,7 +92,7 @@ { "matcher": { "id": "byName", - "options": "lparname" + "options": "Name" }, "properties": [ { @@ -104,18 +104,34 @@ { "matcher": { "id": "byName", - "options": "affinityScore" + "options": "Affinity Score" }, "properties": [ { "id": "color", "value": { - "mode": "thresholds" + "mode": "continuous-RdYlGr" } }, { "id": "unit", "value": "percent" + }, + { + "id": "custom.displayMode", + "value": "basic" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "ID" + }, + "properties": [ + { + "id": "custom.width", + "value": 330 } ] } @@ -132,7 +148,7 @@ "showHeader": true, "sortBy": [] }, - "pluginVersion": "7.4.2", + "pluginVersion": "8.0.0", "targets": [ { "alias": "Read", @@ -199,17 +215,51 @@ ], "timeFrom": null, "timeShift": null, - "title": "", + "transformations": [ + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true + }, + "indexByName": { + "Time": 0, + "affinityScore": 4, + "id": 1, + "viosname": 2, + "viosstate": 3 + }, + "renameByName": { + "affinityScore": "Affinity Score", + "id": "ID", + "viosname": "Name", + "viosstate": "State" + } + } + }, + { + "id": "sortBy", + "options": { + "fields": {}, + "sort": [ + { + "field": "Name" + } + ] + } + } + ], "type": "table" }, { - "datasource": "${DS_INFLUXDB}", + "datasource": "${DS_INFLUXDB-HMCI}", "description": "", "fieldConfig": { "defaults": { - "custom": {}, "links": [], "mappings": [], + "max": 100, + "min": 0, "thresholds": { "mode": "absolute", "steps": [ @@ -238,7 +288,7 @@ "options": { "reduceOptions": { "calcs": [ - "mean" + "lastNotNull" ], "fields": "", "values": false @@ -247,7 +297,7 @@ "showThresholdMarkers": true, "text": {} }, - "pluginVersion": "7.4.2", + "pluginVersion": "8.0.0", "targets": [ { "alias": "$tag_viosname", @@ -288,7 +338,7 @@ }, { "params": [], - "type": "mean" + "type": "last" } ] ], @@ -318,19 +368,18 @@ "content": "", "dashLength": 10, "dashes": false, - "datasource": "${DS_INFLUXDB}", + "datasource": "${DS_INFLUXDB-HMCI}", "description": "", "editable": true, "error": false, "fieldConfig": { "defaults": { - "custom": {}, "links": [] }, "overrides": [] }, - "fill": 2, - "fillGradient": 2, + "fill": 1, + "fillGradient": 0, "grid": {}, "gridPos": { "h": 9, @@ -352,7 +401,7 @@ "values": false }, "lines": true, - "linewidth": 2, + "linewidth": 1, "links": [], "mode": "", "nullPointMode": "connected", @@ -360,7 +409,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "7.4.2", + "pluginVersion": "8.0.0", "pointradius": 5, "points": false, "renderer": "flot", @@ -371,7 +420,7 @@ "style": {}, "targets": [ { - "alias": "$tag_viosname", + "alias": "$tag_viosname - $col", "dsType": "influxdb", "groupBy": [ { @@ -410,6 +459,12 @@ { "params": [], "type": "mean" + }, + { + "params": [ + "utilized" + ], + "type": "alias" } ] ], @@ -478,13 +533,12 @@ "content": "", "dashLength": 10, "dashes": false, - "datasource": "${DS_INFLUXDB}", + "datasource": "${DS_INFLUXDB-HMCI}", "description": "", "editable": true, "error": false, "fieldConfig": { "defaults": { - "custom": {}, "links": [] }, "overrides": [] @@ -493,23 +547,23 @@ "fillGradient": 1, "grid": {}, "gridPos": { - "h": 9, - "w": 24, + "h": 18, + "w": 12, "x": 0, "y": 14 }, "hiddenSeries": false, "id": 18, "legend": { - "alignAsTable": true, - "avg": true, + "alignAsTable": false, + "avg": false, "current": false, - "max": true, + "max": false, "min": false, "rightSide": false, - "show": false, + "show": true, "total": false, - "values": true + "values": false }, "lines": true, "linewidth": 1, @@ -520,7 +574,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "7.4.2", + "pluginVersion": "8.0.0", "pointradius": 5, "points": false, "renderer": "flot", @@ -725,13 +779,12 @@ "content": "", "dashLength": 10, "dashes": false, - "datasource": "${DS_INFLUXDB}", + "datasource": "${DS_INFLUXDB-HMCI}", "description": "", "editable": true, "error": false, "fieldConfig": { "defaults": { - "custom": {}, "links": [] }, "overrides": [] @@ -740,23 +793,23 @@ "fillGradient": 1, "grid": {}, "gridPos": { - "h": 9, - "w": 24, - "x": 0, - "y": 23 + "h": 18, + "w": 12, + "x": 12, + "y": 14 }, "hiddenSeries": false, "id": 17, "legend": { - "alignAsTable": true, - "avg": true, + "alignAsTable": false, + "avg": false, "current": false, - "max": true, - "min": true, + "max": false, + "min": false, "rightSide": false, - "show": false, + "show": true, "total": false, - "values": true + "values": false }, "lines": true, "linewidth": 1, @@ -767,7 +820,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "7.4.2", + "pluginVersion": "8.0.0", "pointradius": 5, "points": false, "renderer": "flot", @@ -995,7 +1048,7 @@ } ], "refresh": "1m", - "schemaVersion": 27, + "schemaVersion": 30, "style": "dark", "tags": [ "Power", @@ -1008,7 +1061,7 @@ "allFormat": "regex values", "allValue": null, "current": {}, - "datasource": "${DS_INFLUXDB}", + "datasource": "${DS_INFLUXDB-HMCI}", "definition": "SHOW TAG VALUES FROM \"server_processor\" WITH KEY = \"servername\" WHERE time > now() - 24h", "description": null, "error": null, @@ -1026,7 +1079,6 @@ "skipUrlSync": false, "sort": 0, "tagValuesQuery": null, - "tags": [], "tagsQuery": null, "type": "query", "useTags": false @@ -1035,7 +1087,7 @@ "allFormat": "regex values", "allValue": null, "current": {}, - "datasource": "${DS_INFLUXDB}", + "datasource": "${DS_INFLUXDB-HMCI}", "definition": "SHOW TAG VALUES FROM \"vios_details\" WITH KEY = \"viosname\" WHERE servername =~ /$ServerName/ AND time > now() - 24h", "description": null, "error": null, @@ -1053,7 +1105,6 @@ "skipUrlSync": false, "sort": 0, "tagValuesQuery": null, - "tags": [], "tagsQuery": null, "type": "query", "useTags": false @@ -1092,5 +1143,5 @@ "timezone": "browser", "title": "IBM Power - HMCi - Virtual I/O Servers", "uid": "DDNEv5vGz", - "version": 18 -} + "version": 4 +} \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index c54020f..900db79 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,3 @@ id = hmci group = biz.nellemann.hmci -version = 1.2.1 +version = 1.2.2