Merged in development (pull request #20)
Work on graphs and some cleanup
This commit is contained in:
commit
76bc7b4d7e
10
README.md
10
README.md
|
@ -6,7 +6,7 @@ Metrics includes:
|
||||||
|
|
||||||
- *Managed Systems* - the physical Power servers
|
- *Managed Systems* - the physical Power servers
|
||||||
- *Logical Partitions* - the virtualized servers running AIX, Linux and IBM-i (AS/400)
|
- *Logical Partitions* - the virtualized servers running AIX, Linux and IBM-i (AS/400)
|
||||||
- *Virtual I/O Servers* - the i/o partition(s) taking care of network and storage
|
- *Virtual I/O Servers* - the i/o partition(s) virtualizing network and storage
|
||||||
- *Energy* - power consumption and temperatures (needs to be enabled and is not available for Power7, E870, E880 and E980)
|
- *Energy* - power consumption and temperatures (needs to be enabled and is not available for Power7, E870, E880 and E980)
|
||||||
|
|
||||||
![architecture](https://bitbucket.org/mnellemann/hmci/downloads/HMCi.png)
|
![architecture](https://bitbucket.org/mnellemann/hmci/downloads/HMCi.png)
|
||||||
|
@ -71,7 +71,7 @@ Install *HMCi* on a host, which can connect to the Power HMC through HTTPS, and
|
||||||
|
|
||||||
### Compatibility with nextract Plus
|
### Compatibility with nextract Plus
|
||||||
|
|
||||||
From version 1.2 *HMCi* is made compatible with the similar [nextract Plus](https://www.ibm.com/support/pages/nextract-plus-hmc-rest-api-performance-statistics) tool from Nigel Griffiths. This means you can use the excellent Grafana [dashboards](https://grafana.com/grafana/dashboards/13819) made by Nigel with *HMCi*.
|
From version 1.2 *HMCi* is made compatible with the similar [nextract Plus](https://www.ibm.com/support/pages/nextract-plus-hmc-rest-api-performance-statistics) tool from Nigel Griffiths. This means that the Grafana [dashboards](https://grafana.com/grafana/dashboards/13819) made by Nigel are compatible with *HMCi*.
|
||||||
|
|
||||||
### Start InfluxDB and Grafana at boot on RedHat 7+
|
### Start InfluxDB and Grafana at boot on RedHat 7+
|
||||||
|
|
||||||
|
@ -110,7 +110,7 @@ Restart the HMCi service on *systemd* based Linux systems:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
systemctl restart hmci
|
systemctl restart hmci
|
||||||
journalctl -u hmci # to check log output
|
journalctl -f -u hmci # to check log output
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
@ -119,11 +119,10 @@ journalctl -u hmci # to check log output
|
||||||
To install (or upgrade) on AIX, you need to pass the *--ignoreos* flag to the *rpm* command:
|
To install (or upgrade) on AIX, you need to pass the *--ignoreos* flag to the *rpm* command:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
rpm -i --ignoreos hmci-x.y.z-n.noarch.rpm
|
rpm -Uvh --ignoreos hmci-x.y.z-n.noarch.rpm
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Grafana Screenshots
|
## Grafana Screenshots
|
||||||
|
|
||||||
Below are screenshots of the provided Grafana dashboards (found in the **doc/** folder), which can be used as a starting point.
|
Below are screenshots of the provided Grafana dashboards (found in the **doc/** folder), which can be used as a starting point.
|
||||||
|
@ -132,6 +131,7 @@ Below are screenshots of the provided Grafana dashboards (found in the **doc/**
|
||||||
- [hmci-vois.png](https://bitbucket.org/mnellemann/hmci/downloads/hmci-vios-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)
|
- [hmci-lpars](https://bitbucket.org/mnellemann/hmci/downloads/hmci-lpars-dashboard.png)
|
||||||
|
|
||||||
|
|
||||||
## Known problems
|
## Known problems
|
||||||
|
|
||||||
### Incomplete test of metrics
|
### Incomplete test of metrics
|
||||||
|
|
20
build.gradle
20
build.gradle
|
@ -19,8 +19,8 @@ repositories {
|
||||||
dependencies {
|
dependencies {
|
||||||
annotationProcessor 'info.picocli:picocli-codegen:4.6.1'
|
annotationProcessor 'info.picocli:picocli-codegen:4.6.1'
|
||||||
implementation 'info.picocli:picocli:4.6.1'
|
implementation 'info.picocli:picocli:4.6.1'
|
||||||
implementation 'org.jsoup:jsoup:1.14.1'
|
implementation 'org.jsoup:jsoup:1.14.3'
|
||||||
implementation 'com.squareup.okhttp3:okhttp:4.9.1'
|
implementation 'com.squareup.okhttp3:okhttp:4.9.2'
|
||||||
implementation 'com.squareup.moshi:moshi:1.12.0'
|
implementation 'com.squareup.moshi:moshi:1.12.0'
|
||||||
implementation 'com.serjltt.moshi:moshi-lazy-adapters:2.2'
|
implementation 'com.serjltt.moshi:moshi-lazy-adapters:2.2'
|
||||||
implementation 'org.tomlj:tomlj:1.0.0'
|
implementation 'org.tomlj:tomlj:1.0.0'
|
||||||
|
@ -29,12 +29,13 @@ dependencies {
|
||||||
implementation 'org.slf4j:slf4j-simple:1.7.32'
|
implementation 'org.slf4j:slf4j-simple:1.7.32'
|
||||||
|
|
||||||
testImplementation 'org.spockframework:spock-core:2.0-groovy-3.0'
|
testImplementation 'org.spockframework:spock-core:2.0-groovy-3.0'
|
||||||
testImplementation 'com.squareup.okhttp3:mockwebserver:4.9.1'
|
testImplementation 'com.squareup.okhttp3:mockwebserver:4.9.2'
|
||||||
testImplementation 'org.slf4j:slf4j-simple:1.7.32'
|
testImplementation 'org.slf4j:slf4j-simple:1.7.32'
|
||||||
}
|
}
|
||||||
|
|
||||||
application {
|
application {
|
||||||
mainClass.set('biz.nellemann.hmci.Application')
|
mainClass.set('biz.nellemann.hmci.Application')
|
||||||
|
applicationDefaultJvmArgs = [ "-server", "-Xms256m", "-Xmx1024m", "-XX:+UseG1GC" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
test {
|
test {
|
||||||
|
@ -78,7 +79,7 @@ buildDeb {
|
||||||
}
|
}
|
||||||
|
|
||||||
jacoco {
|
jacoco {
|
||||||
toolVersion = "0.8.6"
|
toolVersion = "0.8.7"
|
||||||
}
|
}
|
||||||
|
|
||||||
jacocoTestReport {
|
jacocoTestReport {
|
||||||
|
@ -95,7 +96,7 @@ jacocoTestCoverageVerification {
|
||||||
violationRules {
|
violationRules {
|
||||||
rule {
|
rule {
|
||||||
limit {
|
limit {
|
||||||
minimum = 0.4 // TODO: Raise when more tests are implemented
|
minimum = 0.5 // TODO: Raise when more tests are implemented
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -117,5 +118,14 @@ jar {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tasks.create("packages") {
|
||||||
|
group "build"
|
||||||
|
|
||||||
|
dependsOn ":build"
|
||||||
|
dependsOn ":buildDeb"
|
||||||
|
dependsOn ":buildRpm"
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
sourceCompatibility = 1.8
|
sourceCompatibility = 1.8
|
||||||
targetCompatibility = 1.8
|
targetCompatibility = 1.8
|
||||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -3,9 +3,9 @@ Description=HMC Insights Service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
#User=nobody
|
#User=nobody
|
||||||
#Group=nogroup
|
#Group=nobody
|
||||||
TimeoutStartSec=0
|
TimeoutSec=20
|
||||||
Restart=always
|
Restart=on-failure
|
||||||
ExecStart=/opt/hmci/bin/hmci
|
ExecStart=/opt/hmci/bin/hmci
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
id = hmci
|
id = hmci
|
||||||
group = biz.nellemann.hmci
|
group = biz.nellemann.hmci
|
||||||
version = 1.2.3
|
version = 1.2.5
|
||||||
|
|
|
@ -59,8 +59,7 @@ class HmcInstance implements Runnable {
|
||||||
if(configHmc.trace != null) {
|
if(configHmc.trace != null) {
|
||||||
try {
|
try {
|
||||||
traceDir = new File(configHmc.trace);
|
traceDir = new File(configHmc.trace);
|
||||||
traceDir.mkdirs();
|
if(traceDir.mkdirs() && traceDir.canWrite()) {
|
||||||
if(traceDir.canWrite()) {
|
|
||||||
doTrace = true;
|
doTrace = true;
|
||||||
} else {
|
} else {
|
||||||
log.warn("HmcInstance() - can't write to trace dir: " + traceDir.toString());
|
log.warn("HmcInstance() - can't write to trace dir: " + traceDir.toString());
|
||||||
|
@ -155,12 +154,12 @@ class HmcInstance implements Runnable {
|
||||||
hmcRestClient.enableEnergyMonitoring(system);
|
hmcRestClient.enableEnergyMonitoring(system);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get LPAR's for this system
|
// Get partitions for this system
|
||||||
try {
|
try {
|
||||||
hmcRestClient.getLogicalPartitionsForManagedSystem(system).forEach(tmpPartitions::put);
|
tmpPartitions.putAll(hmcRestClient.getLogicalPartitionsForManagedSystem(system));
|
||||||
if(!tmpPartitions.isEmpty()) {
|
if(!tmpPartitions.isEmpty()) {
|
||||||
partitions.clear();
|
partitions.clear();
|
||||||
tmpPartitions.forEach(partitions::put);
|
partitions.putAll(tmpPartitions);
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.warn("discover() - getLogicalPartitions", e);
|
log.warn("discover() - getLogicalPartitions", e);
|
||||||
|
@ -205,7 +204,7 @@ class HmcInstance implements Runnable {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
// Get LPAR's for this system
|
// Get partitions for this system
|
||||||
partitions.forEach((partitionId, partition) -> {
|
partitions.forEach((partitionId, partition) -> {
|
||||||
|
|
||||||
// Get and process metrics for this partition
|
// Get and process metrics for this partition
|
||||||
|
|
|
@ -167,7 +167,7 @@ public class HmcRestClient {
|
||||||
Map<String,ManagedSystem> managedSystemsMap = new HashMap<>();
|
Map<String,ManagedSystem> managedSystemsMap = new HashMap<>();
|
||||||
|
|
||||||
// Do not try to parse empty response
|
// Do not try to parse empty response
|
||||||
if(responseBody == null || responseBody.isEmpty() || responseBody.length() <= 1) {
|
if(responseBody == null || responseBody.length() <= 1) {
|
||||||
responseErrors++;
|
responseErrors++;
|
||||||
return managedSystemsMap;
|
return managedSystemsMap;
|
||||||
}
|
}
|
||||||
|
@ -207,7 +207,7 @@ public class HmcRestClient {
|
||||||
Map<String, LogicalPartition> partitionMap = new HashMap<>();
|
Map<String, LogicalPartition> partitionMap = new HashMap<>();
|
||||||
|
|
||||||
// Do not try to parse empty response
|
// Do not try to parse empty response
|
||||||
if(responseBody == null || responseBody.isEmpty() || responseBody.length() <= 1) {
|
if(responseBody == null || responseBody.length() <= 1) {
|
||||||
responseErrors++;
|
responseErrors++;
|
||||||
return partitionMap;
|
return partitionMap;
|
||||||
}
|
}
|
||||||
|
@ -247,7 +247,7 @@ public class HmcRestClient {
|
||||||
String jsonBody = null;
|
String jsonBody = null;
|
||||||
|
|
||||||
// Do not try to parse empty response
|
// Do not try to parse empty response
|
||||||
if(responseBody == null || responseBody.isEmpty() || responseBody.length() <= 1) {
|
if(responseBody == null || responseBody.length() <= 1) {
|
||||||
responseErrors++;
|
responseErrors++;
|
||||||
log.warn("getPcmDataForManagedSystem() - empty response, skipping: " + system.name);
|
log.warn("getPcmDataForManagedSystem() - empty response, skipping: " + system.name);
|
||||||
return null;
|
return null;
|
||||||
|
@ -256,9 +256,9 @@ public class HmcRestClient {
|
||||||
try {
|
try {
|
||||||
Document doc = Jsoup.parse(responseBody);
|
Document doc = Jsoup.parse(responseBody);
|
||||||
Element entry = doc.select("feed > entry").first();
|
Element entry = doc.select("feed > entry").first();
|
||||||
Element link = entry.select("link[href]").first();
|
Element link = Objects.requireNonNull(entry).select("link[href]").first();
|
||||||
|
|
||||||
if(link.attr("type").equals("application/json")) {
|
if(Objects.requireNonNull(link).attr("type").equals("application/json")) {
|
||||||
String href = link.attr("href");
|
String href = link.attr("href");
|
||||||
log.trace("getPcmDataForManagedSystem() - json url: " + href);
|
log.trace("getPcmDataForManagedSystem() - json url: " + href);
|
||||||
jsonBody = sendGetRequest(new URL(href));
|
jsonBody = sendGetRequest(new URL(href));
|
||||||
|
@ -285,7 +285,7 @@ public class HmcRestClient {
|
||||||
String jsonBody = null;
|
String jsonBody = null;
|
||||||
|
|
||||||
// Do not try to parse empty response
|
// Do not try to parse empty response
|
||||||
if(responseBody == null || responseBody.isEmpty() || responseBody.length() <= 1) {
|
if(responseBody == null || responseBody.length() <= 1) {
|
||||||
responseErrors++;
|
responseErrors++;
|
||||||
log.warn("getPcmDataForLogicalPartition() - empty response, skipping: " + partition.name);
|
log.warn("getPcmDataForLogicalPartition() - empty response, skipping: " + partition.name);
|
||||||
return null;
|
return null;
|
||||||
|
@ -294,9 +294,9 @@ public class HmcRestClient {
|
||||||
try {
|
try {
|
||||||
Document doc = Jsoup.parse(responseBody);
|
Document doc = Jsoup.parse(responseBody);
|
||||||
Element entry = doc.select("feed > entry").first();
|
Element entry = doc.select("feed > entry").first();
|
||||||
Element link = entry.select("link[href]").first();
|
Element link = Objects.requireNonNull(entry).select("link[href]").first();
|
||||||
|
|
||||||
if(link.attr("type").equals("application/json")) {
|
if(Objects.requireNonNull(link).attr("type").equals("application/json")) {
|
||||||
String href = link.attr("href");
|
String href = link.attr("href");
|
||||||
log.trace("getPcmDataForLogicalPartition() - json url: " + href);
|
log.trace("getPcmDataForLogicalPartition() - json url: " + href);
|
||||||
jsonBody = sendGetRequest(new URL(href));
|
jsonBody = sendGetRequest(new URL(href));
|
||||||
|
@ -325,7 +325,7 @@ public class HmcRestClient {
|
||||||
//log.info(responseBody);
|
//log.info(responseBody);
|
||||||
|
|
||||||
// Do not try to parse empty response
|
// Do not try to parse empty response
|
||||||
if(responseBody == null || responseBody.isEmpty() || responseBody.length() <= 1) {
|
if(responseBody == null || responseBody.length() <= 1) {
|
||||||
responseErrors++;
|
responseErrors++;
|
||||||
log.trace("getPcmDataForEnergy() - empty response");
|
log.trace("getPcmDataForEnergy() - empty response");
|
||||||
return null;
|
return null;
|
||||||
|
@ -334,9 +334,9 @@ public class HmcRestClient {
|
||||||
try {
|
try {
|
||||||
Document doc = Jsoup.parse(responseBody);
|
Document doc = Jsoup.parse(responseBody);
|
||||||
Element entry = doc.select("feed > entry").first();
|
Element entry = doc.select("feed > entry").first();
|
||||||
Element link = entry.select("link[href]").first();
|
Element link = Objects.requireNonNull(entry).select("link[href]").first();
|
||||||
|
|
||||||
if(link.attr("type").equals("application/json")) {
|
if(Objects.requireNonNull(link).attr("type").equals("application/json")) {
|
||||||
String href = link.attr("href");
|
String href = link.attr("href");
|
||||||
log.trace("getPcmDataForEnergy() - json url: " + href);
|
log.trace("getPcmDataForEnergy() - json url: " + href);
|
||||||
jsonBody = sendGetRequest(new URL(href));
|
jsonBody = sendGetRequest(new URL(href));
|
||||||
|
@ -363,7 +363,7 @@ public class HmcRestClient {
|
||||||
String jsonBody = null;
|
String jsonBody = null;
|
||||||
|
|
||||||
// Do not try to parse empty response
|
// Do not try to parse empty response
|
||||||
if(responseBody == null || responseBody.isEmpty() || responseBody.length() <= 1) {
|
if(responseBody == null || responseBody.length() <= 1) {
|
||||||
responseErrors++;
|
responseErrors++;
|
||||||
log.warn("enableEnergyMonitoring() - empty response");
|
log.warn("enableEnergyMonitoring() - empty response");
|
||||||
return;
|
return;
|
||||||
|
@ -374,16 +374,16 @@ public class HmcRestClient {
|
||||||
doc.outputSettings().prettyPrint(false);
|
doc.outputSettings().prettyPrint(false);
|
||||||
doc.outputSettings().charset("US-ASCII");
|
doc.outputSettings().charset("US-ASCII");
|
||||||
Element entry = doc.select("feed > entry").first();
|
Element entry = doc.select("feed > entry").first();
|
||||||
Element link1 = entry.select("EnergyMonitoringCapable").first();
|
Element link1 = Objects.requireNonNull(entry).select("EnergyMonitoringCapable").first();
|
||||||
Element link2 = entry.select("EnergyMonitorEnabled").first();
|
Element link2 = entry.select("EnergyMonitorEnabled").first();
|
||||||
|
|
||||||
if(link1.text().equals("true")) {
|
if(Objects.requireNonNull(link1).text().equals("true")) {
|
||||||
log.debug("enableEnergyMonitoring() - EnergyMonitoringCapable == true");
|
log.debug("enableEnergyMonitoring() - EnergyMonitoringCapable == true");
|
||||||
if(link2.text().equals("false")) {
|
if(Objects.requireNonNull(link2).text().equals("false")) {
|
||||||
//log.warn("enableEnergyMonitoring() - EnergyMonitorEnabled == false");
|
//log.warn("enableEnergyMonitoring() - EnergyMonitorEnabled == false");
|
||||||
link2.text("true");
|
link2.text("true");
|
||||||
|
|
||||||
Document content = Jsoup.parse(doc.select("Content").first().html(), "", Parser.xmlParser());
|
Document content = Jsoup.parse(Objects.requireNonNull(doc.select("Content").first()).html(), "", Parser.xmlParser());
|
||||||
content.outputSettings().escapeMode(Entities.EscapeMode.xhtml);
|
content.outputSettings().escapeMode(Entities.EscapeMode.xhtml);
|
||||||
content.outputSettings().prettyPrint(false);
|
content.outputSettings().prettyPrint(false);
|
||||||
content.outputSettings().charset("UTF-8");
|
content.outputSettings().charset("UTF-8");
|
||||||
|
@ -514,7 +514,7 @@ public class HmcRestClient {
|
||||||
final SSLContext sslContext = SSLContext.getInstance("SSL");
|
final SSLContext sslContext = SSLContext.getInstance("SSL");
|
||||||
sslContext.init(null, trustAllCerts, new SecureRandom());
|
sslContext.init(null, trustAllCerts, new SecureRandom());
|
||||||
|
|
||||||
// Create an ssl socket factory with our all-trusting manager
|
// Create a ssl socket factory with our all-trusting manager
|
||||||
final SSLSocketFactory sslSocketFactory = sslContext.getSocketFactory();
|
final SSLSocketFactory sslSocketFactory = sslContext.getSocketFactory();
|
||||||
|
|
||||||
OkHttpClient.Builder builder = new OkHttpClient.Builder();
|
OkHttpClient.Builder builder = new OkHttpClient.Builder();
|
||||||
|
|
|
@ -55,7 +55,7 @@ class LogicalPartition extends MetaSystem {
|
||||||
Map<String, String> tagsMap = new HashMap<>();
|
Map<String, String> tagsMap = new HashMap<>();
|
||||||
tagsMap.put("servername", system.name);
|
tagsMap.put("servername", system.name);
|
||||||
tagsMap.put("lparname", name);
|
tagsMap.put("lparname", name);
|
||||||
log.trace("getDetails() - tags: " + tagsMap.toString());
|
log.trace("getDetails() - tags: " + tagsMap);
|
||||||
|
|
||||||
Map<String, Object> fieldsMap = new HashMap<>();
|
Map<String, Object> fieldsMap = new HashMap<>();
|
||||||
fieldsMap.put("id", metrics.systemUtil.sample.lparsUtil.id);
|
fieldsMap.put("id", metrics.systemUtil.sample.lparsUtil.id);
|
||||||
|
@ -63,7 +63,7 @@ class LogicalPartition extends MetaSystem {
|
||||||
fieldsMap.put("state", metrics.systemUtil.sample.lparsUtil.state);
|
fieldsMap.put("state", metrics.systemUtil.sample.lparsUtil.state);
|
||||||
fieldsMap.put("osType", metrics.systemUtil.sample.lparsUtil.osType);
|
fieldsMap.put("osType", metrics.systemUtil.sample.lparsUtil.osType);
|
||||||
fieldsMap.put("affinityScore", metrics.systemUtil.sample.lparsUtil.affinityScore);
|
fieldsMap.put("affinityScore", metrics.systemUtil.sample.lparsUtil.affinityScore);
|
||||||
log.trace("getDetails() - fields: " + fieldsMap.toString());
|
log.trace("getDetails() - fields: " + fieldsMap);
|
||||||
|
|
||||||
list.add(new Measurement(tagsMap, fieldsMap));
|
list.add(new Measurement(tagsMap, fieldsMap));
|
||||||
return list;
|
return list;
|
||||||
|
@ -78,12 +78,12 @@ class LogicalPartition extends MetaSystem {
|
||||||
Map<String, String> tagsMap = new HashMap<>();
|
Map<String, String> tagsMap = new HashMap<>();
|
||||||
tagsMap.put("servername", system.name);
|
tagsMap.put("servername", system.name);
|
||||||
tagsMap.put("lparname", name);
|
tagsMap.put("lparname", name);
|
||||||
log.trace("getMemoryMetrics() - tags: " + tagsMap.toString());
|
log.trace("getMemoryMetrics() - tags: " + tagsMap);
|
||||||
|
|
||||||
Map<String, Object> fieldsMap = new HashMap<>();
|
Map<String, Object> fieldsMap = new HashMap<>();
|
||||||
fieldsMap.put("logicalMem", metrics.systemUtil.sample.lparsUtil.memory.logicalMem);
|
fieldsMap.put("logicalMem", metrics.systemUtil.sample.lparsUtil.memory.logicalMem);
|
||||||
fieldsMap.put("backedPhysicalMem", metrics.systemUtil.sample.lparsUtil.memory.backedPhysicalMem);
|
fieldsMap.put("backedPhysicalMem", metrics.systemUtil.sample.lparsUtil.memory.backedPhysicalMem);
|
||||||
log.trace("getMemoryMetrics() - fields: " + fieldsMap.toString());
|
log.trace("getMemoryMetrics() - fields: " + fieldsMap);
|
||||||
|
|
||||||
list.add(new Measurement(tagsMap, fieldsMap));
|
list.add(new Measurement(tagsMap, fieldsMap));
|
||||||
return list;
|
return list;
|
||||||
|
@ -98,7 +98,7 @@ class LogicalPartition extends MetaSystem {
|
||||||
HashMap<String, String> tagsMap = new HashMap<>();
|
HashMap<String, String> tagsMap = new HashMap<>();
|
||||||
tagsMap.put("servername", system.name);
|
tagsMap.put("servername", system.name);
|
||||||
tagsMap.put("lparname", name);
|
tagsMap.put("lparname", name);
|
||||||
log.trace("getProcessorMetrics() - tags: " + tagsMap.toString());
|
log.trace("getProcessorMetrics() - tags: " + tagsMap);
|
||||||
|
|
||||||
HashMap<String, Object> fieldsMap = new HashMap<>();
|
HashMap<String, Object> fieldsMap = new HashMap<>();
|
||||||
fieldsMap.put("utilizedProcUnits", metrics.systemUtil.sample.lparsUtil.processor.utilizedProcUnits);
|
fieldsMap.put("utilizedProcUnits", metrics.systemUtil.sample.lparsUtil.processor.utilizedProcUnits);
|
||||||
|
@ -115,7 +115,7 @@ class LogicalPartition extends MetaSystem {
|
||||||
fieldsMap.put("mode", metrics.systemUtil.sample.lparsUtil.processor.mode);
|
fieldsMap.put("mode", metrics.systemUtil.sample.lparsUtil.processor.mode);
|
||||||
fieldsMap.put("weight", metrics.systemUtil.sample.lparsUtil.processor.weight);
|
fieldsMap.put("weight", metrics.systemUtil.sample.lparsUtil.processor.weight);
|
||||||
fieldsMap.put("poolId", metrics.systemUtil.sample.lparsUtil.processor.poolId);
|
fieldsMap.put("poolId", metrics.systemUtil.sample.lparsUtil.processor.poolId);
|
||||||
log.trace("getProcessorMetrics() - fields: " + fieldsMap.toString());
|
log.trace("getProcessorMetrics() - fields: " + fieldsMap);
|
||||||
|
|
||||||
list.add(new Measurement(tagsMap, fieldsMap));
|
list.add(new Measurement(tagsMap, fieldsMap));
|
||||||
return list;
|
return list;
|
||||||
|
@ -136,7 +136,7 @@ class LogicalPartition extends MetaSystem {
|
||||||
tagsMap.put("viosId", adapter.viosId.toString());
|
tagsMap.put("viosId", adapter.viosId.toString());
|
||||||
tagsMap.put("vlanId", adapter.vlanId.toString());
|
tagsMap.put("vlanId", adapter.vlanId.toString());
|
||||||
tagsMap.put("vswitchId", adapter.vswitchId.toString());
|
tagsMap.put("vswitchId", adapter.vswitchId.toString());
|
||||||
log.trace("getVirtualEthernetAdapterMetrics() - tags: " + tagsMap.toString());
|
log.trace("getVirtualEthernetAdapterMetrics() - tags: " + tagsMap);
|
||||||
|
|
||||||
HashMap<String, Object> fieldsMap = new HashMap<>();
|
HashMap<String, Object> fieldsMap = new HashMap<>();
|
||||||
fieldsMap.put("droppedPackets", adapter.droppedPackets);
|
fieldsMap.put("droppedPackets", adapter.droppedPackets);
|
||||||
|
@ -153,7 +153,7 @@ class LogicalPartition extends MetaSystem {
|
||||||
fieldsMap.put("transferredBytes", adapter.transferredBytes);
|
fieldsMap.put("transferredBytes", adapter.transferredBytes);
|
||||||
fieldsMap.put("transferredPhysicalBytes", adapter.transferredPhysicalBytes);
|
fieldsMap.put("transferredPhysicalBytes", adapter.transferredPhysicalBytes);
|
||||||
fieldsMap.put("sharedEthernetAdapterId", adapter.sharedEthernetAdapterId);
|
fieldsMap.put("sharedEthernetAdapterId", adapter.sharedEthernetAdapterId);
|
||||||
log.trace("getVirtualEthernetAdapterMetrics() - fields: " + fieldsMap.toString());
|
log.trace("getVirtualEthernetAdapterMetrics() - fields: " + fieldsMap);
|
||||||
|
|
||||||
list.add(new Measurement(tagsMap, fieldsMap));
|
list.add(new Measurement(tagsMap, fieldsMap));
|
||||||
});
|
});
|
||||||
|
@ -174,7 +174,7 @@ class LogicalPartition extends MetaSystem {
|
||||||
tagsMap.put("viosId", adapter.viosId.toString());
|
tagsMap.put("viosId", adapter.viosId.toString());
|
||||||
tagsMap.put("location", adapter.physicalLocation);
|
tagsMap.put("location", adapter.physicalLocation);
|
||||||
tagsMap.put("id", adapter.id);
|
tagsMap.put("id", adapter.id);
|
||||||
log.trace("getVirtualGenericAdapterMetrics() - tags: " + tagsMap.toString());
|
log.trace("getVirtualGenericAdapterMetrics() - tags: " + tagsMap);
|
||||||
|
|
||||||
HashMap<String, Object> fieldsMap = new HashMap<>();
|
HashMap<String, Object> fieldsMap = new HashMap<>();
|
||||||
fieldsMap.put("numOfReads", adapter.numOfReads);
|
fieldsMap.put("numOfReads", adapter.numOfReads);
|
||||||
|
@ -182,7 +182,7 @@ class LogicalPartition extends MetaSystem {
|
||||||
fieldsMap.put("writeBytes", adapter.writeBytes);
|
fieldsMap.put("writeBytes", adapter.writeBytes);
|
||||||
fieldsMap.put("readBytes", adapter.readBytes);
|
fieldsMap.put("readBytes", adapter.readBytes);
|
||||||
fieldsMap.put("type", adapter.type);
|
fieldsMap.put("type", adapter.type);
|
||||||
log.trace("getVirtualGenericAdapterMetrics() - fields: " + fieldsMap.toString());
|
log.trace("getVirtualGenericAdapterMetrics() - fields: " + fieldsMap);
|
||||||
|
|
||||||
list.add(new Measurement(tagsMap, fieldsMap));
|
list.add(new Measurement(tagsMap, fieldsMap));
|
||||||
});
|
});
|
||||||
|
@ -201,7 +201,7 @@ class LogicalPartition extends MetaSystem {
|
||||||
tagsMap.put("lparname", name);
|
tagsMap.put("lparname", name);
|
||||||
tagsMap.put("viosId", adapter.viosId.toString());
|
tagsMap.put("viosId", adapter.viosId.toString());
|
||||||
tagsMap.put("location", adapter.physicalLocation);
|
tagsMap.put("location", adapter.physicalLocation);
|
||||||
log.trace("getVirtualFibreChannelAdapterMetrics() - tags: " + tagsMap.toString());
|
log.trace("getVirtualFibreChannelAdapterMetrics() - tags: " + tagsMap);
|
||||||
|
|
||||||
HashMap<String, Object> fieldsMap = new HashMap<>();
|
HashMap<String, Object> fieldsMap = new HashMap<>();
|
||||||
fieldsMap.put("numOfReads", adapter.numOfReads);
|
fieldsMap.put("numOfReads", adapter.numOfReads);
|
||||||
|
@ -213,7 +213,7 @@ class LogicalPartition extends MetaSystem {
|
||||||
fieldsMap.put("transferredByte", adapter.transmittedBytes); // TODO: Must be error in dashboard, remove when checked.
|
fieldsMap.put("transferredByte", adapter.transmittedBytes); // TODO: Must be error in dashboard, remove when checked.
|
||||||
//fieldsMap.put("wwpn", adapter.wwpn);
|
//fieldsMap.put("wwpn", adapter.wwpn);
|
||||||
//fieldsMap.put("wwpn2", adapter.wwpn2);
|
//fieldsMap.put("wwpn2", adapter.wwpn2);
|
||||||
log.trace("getVirtualFibreChannelAdapterMetrics() - fields: " + fieldsMap.toString());
|
log.trace("getVirtualFibreChannelAdapterMetrics() - fields: " + fieldsMap);
|
||||||
|
|
||||||
list.add(new Measurement(tagsMap, fieldsMap));
|
list.add(new Measurement(tagsMap, fieldsMap));
|
||||||
});
|
});
|
||||||
|
|
|
@ -58,7 +58,7 @@ class ManagedSystem extends MetaSystem {
|
||||||
|
|
||||||
HashMap<String, String> tagsMap = new HashMap<>();
|
HashMap<String, String> tagsMap = new HashMap<>();
|
||||||
tagsMap.put("servername", name);
|
tagsMap.put("servername", name);
|
||||||
log.trace("getDetails() - tags: " + tagsMap.toString());
|
log.trace("getDetails() - tags: " + tagsMap);
|
||||||
|
|
||||||
Map<String, Object> fieldsMap = new HashMap<>();
|
Map<String, Object> fieldsMap = new HashMap<>();
|
||||||
fieldsMap.put("mtm", String.format("%s-%s %s", type, model, serialNumber));
|
fieldsMap.put("mtm", String.format("%s-%s %s", type, model, serialNumber));
|
||||||
|
@ -69,7 +69,7 @@ class ManagedSystem extends MetaSystem {
|
||||||
fieldsMap.put("name", name);
|
fieldsMap.put("name", name);
|
||||||
fieldsMap.put("utilizedProcUnits", metrics.systemUtil.sample.systemFirmwareUtil.utilizedProcUnits);
|
fieldsMap.put("utilizedProcUnits", metrics.systemUtil.sample.systemFirmwareUtil.utilizedProcUnits);
|
||||||
fieldsMap.put("assignedMem", metrics.systemUtil.sample.systemFirmwareUtil.assignedMem);
|
fieldsMap.put("assignedMem", metrics.systemUtil.sample.systemFirmwareUtil.assignedMem);
|
||||||
log.trace("getDetails() - fields: " + fieldsMap.toString());
|
log.trace("getDetails() - fields: " + fieldsMap);
|
||||||
|
|
||||||
list.add(new Measurement(tagsMap, fieldsMap));
|
list.add(new Measurement(tagsMap, fieldsMap));
|
||||||
return list;
|
return list;
|
||||||
|
@ -83,7 +83,7 @@ class ManagedSystem extends MetaSystem {
|
||||||
|
|
||||||
HashMap<String, String> tagsMap = new HashMap<>();
|
HashMap<String, String> tagsMap = new HashMap<>();
|
||||||
tagsMap.put("servername", name);
|
tagsMap.put("servername", name);
|
||||||
log.trace("getMemoryMetrics() - tags: " + tagsMap.toString());
|
log.trace("getMemoryMetrics() - tags: " + tagsMap);
|
||||||
|
|
||||||
Map<String, Object> fieldsMap = new HashMap<>();
|
Map<String, Object> fieldsMap = new HashMap<>();
|
||||||
fieldsMap.put("totalMem", metrics.systemUtil.sample.serverUtil.memory.totalMem);
|
fieldsMap.put("totalMem", metrics.systemUtil.sample.serverUtil.memory.totalMem);
|
||||||
|
@ -91,7 +91,7 @@ class ManagedSystem extends MetaSystem {
|
||||||
fieldsMap.put("configurableMem", metrics.systemUtil.sample.serverUtil.memory.configurableMem);
|
fieldsMap.put("configurableMem", metrics.systemUtil.sample.serverUtil.memory.configurableMem);
|
||||||
fieldsMap.put("assignedMemToLpars", metrics.systemUtil.sample.serverUtil.memory.assignedMemToLpars);
|
fieldsMap.put("assignedMemToLpars", metrics.systemUtil.sample.serverUtil.memory.assignedMemToLpars);
|
||||||
fieldsMap.put("virtualPersistentMem", metrics.systemUtil.sample.serverUtil.memory.virtualPersistentMem);
|
fieldsMap.put("virtualPersistentMem", metrics.systemUtil.sample.serverUtil.memory.virtualPersistentMem);
|
||||||
log.trace("getMemoryMetrics() - fields: " + fieldsMap.toString());
|
log.trace("getMemoryMetrics() - fields: " + fieldsMap);
|
||||||
|
|
||||||
list.add(new Measurement(tagsMap, fieldsMap));
|
list.add(new Measurement(tagsMap, fieldsMap));
|
||||||
return list;
|
return list;
|
||||||
|
@ -105,14 +105,14 @@ class ManagedSystem extends MetaSystem {
|
||||||
|
|
||||||
HashMap<String, String> tagsMap = new HashMap<>();
|
HashMap<String, String> tagsMap = new HashMap<>();
|
||||||
tagsMap.put("servername", name);
|
tagsMap.put("servername", name);
|
||||||
log.trace("getProcessorMetrics() - tags: " + tagsMap.toString());
|
log.trace("getProcessorMetrics() - tags: " + tagsMap);
|
||||||
|
|
||||||
HashMap<String, Object> fieldsMap = new HashMap<>();
|
HashMap<String, Object> fieldsMap = new HashMap<>();
|
||||||
fieldsMap.put("totalProcUnits", metrics.systemUtil.sample.serverUtil.processor.totalProcUnits);
|
fieldsMap.put("totalProcUnits", metrics.systemUtil.sample.serverUtil.processor.totalProcUnits);
|
||||||
fieldsMap.put("utilizedProcUnits", metrics.systemUtil.sample.serverUtil.processor.utilizedProcUnits);
|
fieldsMap.put("utilizedProcUnits", metrics.systemUtil.sample.serverUtil.processor.utilizedProcUnits);
|
||||||
fieldsMap.put("availableProcUnits", metrics.systemUtil.sample.serverUtil.processor.availableProcUnits);
|
fieldsMap.put("availableProcUnits", metrics.systemUtil.sample.serverUtil.processor.availableProcUnits);
|
||||||
fieldsMap.put("configurableProcUnits", metrics.systemUtil.sample.serverUtil.processor.configurableProcUnits);
|
fieldsMap.put("configurableProcUnits", metrics.systemUtil.sample.serverUtil.processor.configurableProcUnits);
|
||||||
log.trace("getProcessorMetrics() - fields: " + fieldsMap.toString());
|
log.trace("getProcessorMetrics() - fields: " + fieldsMap);
|
||||||
|
|
||||||
list.add(new Measurement(tagsMap, fieldsMap));
|
list.add(new Measurement(tagsMap, fieldsMap));
|
||||||
return list;
|
return list;
|
||||||
|
@ -128,7 +128,7 @@ class ManagedSystem extends MetaSystem {
|
||||||
tagsMap.put("servername", name);
|
tagsMap.put("servername", name);
|
||||||
tagsMap.put("pool", sharedProcessorPool.id);
|
tagsMap.put("pool", sharedProcessorPool.id);
|
||||||
tagsMap.put("poolname", sharedProcessorPool.name);
|
tagsMap.put("poolname", sharedProcessorPool.name);
|
||||||
log.trace("getSharedProcessorPools() - tags: " + tagsMap.toString());
|
log.trace("getSharedProcessorPools() - tags: " + tagsMap);
|
||||||
|
|
||||||
HashMap<String, Object> fieldsMap = new HashMap<>();
|
HashMap<String, Object> fieldsMap = new HashMap<>();
|
||||||
fieldsMap.put("assignedProcUnits", sharedProcessorPool.assignedProcUnits);
|
fieldsMap.put("assignedProcUnits", sharedProcessorPool.assignedProcUnits);
|
||||||
|
@ -136,7 +136,7 @@ class ManagedSystem extends MetaSystem {
|
||||||
fieldsMap.put("utilizedProcUnits", sharedProcessorPool.utilizedProcUnits);
|
fieldsMap.put("utilizedProcUnits", sharedProcessorPool.utilizedProcUnits);
|
||||||
fieldsMap.put("borrowedProcUnits", sharedProcessorPool.borrowedProcUnits);
|
fieldsMap.put("borrowedProcUnits", sharedProcessorPool.borrowedProcUnits);
|
||||||
fieldsMap.put("configuredProcUnits", sharedProcessorPool.configuredProcUnits);
|
fieldsMap.put("configuredProcUnits", sharedProcessorPool.configuredProcUnits);
|
||||||
log.trace("getSharedProcessorPools() - fields: " + fieldsMap.toString());
|
log.trace("getSharedProcessorPools() - fields: " + fieldsMap);
|
||||||
|
|
||||||
list.add(new Measurement(tagsMap, fieldsMap));
|
list.add(new Measurement(tagsMap, fieldsMap));
|
||||||
});
|
});
|
||||||
|
@ -152,7 +152,7 @@ class ManagedSystem extends MetaSystem {
|
||||||
|
|
||||||
HashMap<String, String> tagsMap = new HashMap<>();
|
HashMap<String, String> tagsMap = new HashMap<>();
|
||||||
tagsMap.put("servername", name);
|
tagsMap.put("servername", name);
|
||||||
log.trace("getPhysicalProcessorPool() - tags: " + tagsMap.toString());
|
log.trace("getPhysicalProcessorPool() - tags: " + tagsMap);
|
||||||
|
|
||||||
HashMap<String, Object> fieldsMap = new HashMap<>();
|
HashMap<String, Object> fieldsMap = new HashMap<>();
|
||||||
fieldsMap.put("assignedProcUnits", metrics.systemUtil.sample.serverUtil.physicalProcessorPool.assignedProcUnits);
|
fieldsMap.put("assignedProcUnits", metrics.systemUtil.sample.serverUtil.physicalProcessorPool.assignedProcUnits);
|
||||||
|
@ -160,7 +160,7 @@ class ManagedSystem extends MetaSystem {
|
||||||
fieldsMap.put("utilizedProcUnits", metrics.systemUtil.sample.serverUtil.physicalProcessorPool.utilizedProcUnits);
|
fieldsMap.put("utilizedProcUnits", metrics.systemUtil.sample.serverUtil.physicalProcessorPool.utilizedProcUnits);
|
||||||
fieldsMap.put("configuredProcUnits", metrics.systemUtil.sample.serverUtil.physicalProcessorPool.configuredProcUnits);
|
fieldsMap.put("configuredProcUnits", metrics.systemUtil.sample.serverUtil.physicalProcessorPool.configuredProcUnits);
|
||||||
fieldsMap.put("borrowedProcUnits", metrics.systemUtil.sample.serverUtil.physicalProcessorPool.borrowedProcUnits);
|
fieldsMap.put("borrowedProcUnits", metrics.systemUtil.sample.serverUtil.physicalProcessorPool.borrowedProcUnits);
|
||||||
log.trace("getPhysicalProcessorPool() - fields: " + fieldsMap.toString());
|
log.trace("getPhysicalProcessorPool() - fields: " + fieldsMap);
|
||||||
|
|
||||||
list.add(new Measurement(tagsMap, fieldsMap));
|
list.add(new Measurement(tagsMap, fieldsMap));
|
||||||
return list;
|
return list;
|
||||||
|
@ -176,14 +176,14 @@ class ManagedSystem extends MetaSystem {
|
||||||
HashMap<String, String> tagsMap = new HashMap<>();
|
HashMap<String, String> tagsMap = new HashMap<>();
|
||||||
tagsMap.put("servername", name);
|
tagsMap.put("servername", name);
|
||||||
tagsMap.put("viosname", vios.name);
|
tagsMap.put("viosname", vios.name);
|
||||||
log.trace("getViosDetails() - tags: " + tagsMap.toString());
|
log.trace("getViosDetails() - tags: " + tagsMap);
|
||||||
|
|
||||||
HashMap<String, Object> fieldsMap = new HashMap<>();
|
HashMap<String, Object> fieldsMap = new HashMap<>();
|
||||||
fieldsMap.put("viosid", vios.id);
|
fieldsMap.put("viosid", vios.id);
|
||||||
fieldsMap.put("viosstate", vios.state);
|
fieldsMap.put("viosstate", vios.state);
|
||||||
fieldsMap.put("viosname", vios.name);
|
fieldsMap.put("viosname", vios.name);
|
||||||
fieldsMap.put("affinityScore", vios.affinityScore);
|
fieldsMap.put("affinityScore", vios.affinityScore);
|
||||||
log.trace("getViosDetails() - fields: " + fieldsMap.toString());
|
log.trace("getViosDetails() - fields: " + fieldsMap);
|
||||||
|
|
||||||
list.add(new Measurement(tagsMap, fieldsMap));
|
list.add(new Measurement(tagsMap, fieldsMap));
|
||||||
});
|
});
|
||||||
|
@ -201,7 +201,7 @@ class ManagedSystem extends MetaSystem {
|
||||||
HashMap<String, String> tagsMap = new HashMap<>();
|
HashMap<String, String> tagsMap = new HashMap<>();
|
||||||
tagsMap.put("servername", name);
|
tagsMap.put("servername", name);
|
||||||
tagsMap.put("viosname", vios.name);
|
tagsMap.put("viosname", vios.name);
|
||||||
log.trace("getViosMemoryMetrics() - tags: " + tagsMap.toString());
|
log.trace("getViosMemoryMetrics() - tags: " + tagsMap);
|
||||||
|
|
||||||
HashMap<String, Object> fieldsMap = new HashMap<>();
|
HashMap<String, Object> fieldsMap = new HashMap<>();
|
||||||
Number assignedMem = getNumberMetricObject(vios.memory.assignedMem);
|
Number assignedMem = getNumberMetricObject(vios.memory.assignedMem);
|
||||||
|
@ -216,7 +216,7 @@ class ManagedSystem extends MetaSystem {
|
||||||
Number usedMemPct = (utilizedMem.intValue() * 100 ) / assignedMem.intValue();
|
Number usedMemPct = (utilizedMem.intValue() * 100 ) / assignedMem.intValue();
|
||||||
fieldsMap.put("utilizedPct", usedMemPct.floatValue());
|
fieldsMap.put("utilizedPct", usedMemPct.floatValue());
|
||||||
}
|
}
|
||||||
log.trace("getViosMemoryMetrics() - fields: " + fieldsMap.toString());
|
log.trace("getViosMemoryMetrics() - fields: " + fieldsMap);
|
||||||
|
|
||||||
list.add(new Measurement(tagsMap, fieldsMap));
|
list.add(new Measurement(tagsMap, fieldsMap));
|
||||||
});
|
});
|
||||||
|
@ -234,7 +234,7 @@ class ManagedSystem extends MetaSystem {
|
||||||
HashMap<String, String> tagsMap = new HashMap<>();
|
HashMap<String, String> tagsMap = new HashMap<>();
|
||||||
tagsMap.put("servername", name);
|
tagsMap.put("servername", name);
|
||||||
tagsMap.put("viosname", vios.name);
|
tagsMap.put("viosname", vios.name);
|
||||||
log.trace("getViosProcessorMetrics() - tags: " + tagsMap.toString());
|
log.trace("getViosProcessorMetrics() - tags: " + tagsMap);
|
||||||
|
|
||||||
HashMap<String, Object> fieldsMap = new HashMap<>();
|
HashMap<String, Object> fieldsMap = new HashMap<>();
|
||||||
fieldsMap.put("utilizedProcUnits", vios.processor.utilizedProcUnits);
|
fieldsMap.put("utilizedProcUnits", vios.processor.utilizedProcUnits);
|
||||||
|
@ -249,7 +249,8 @@ class ManagedSystem extends MetaSystem {
|
||||||
fieldsMap.put("timeSpentWaitingForDispatch", vios.processor.timePerInstructionExecution);
|
fieldsMap.put("timeSpentWaitingForDispatch", vios.processor.timePerInstructionExecution);
|
||||||
fieldsMap.put("timePerInstructionExecution", vios.processor.timeSpentWaitingForDispatch);
|
fieldsMap.put("timePerInstructionExecution", vios.processor.timeSpentWaitingForDispatch);
|
||||||
fieldsMap.put("weight", vios.processor.weight);
|
fieldsMap.put("weight", vios.processor.weight);
|
||||||
log.trace("getViosProcessorMetrics() - fields: " + fieldsMap.toString());
|
fieldsMap.put("mode", vios.processor.mode);
|
||||||
|
log.trace("getViosProcessorMetrics() - fields: " + fieldsMap);
|
||||||
|
|
||||||
list.add(new Measurement(tagsMap, fieldsMap));
|
list.add(new Measurement(tagsMap, fieldsMap));
|
||||||
});
|
});
|
||||||
|
@ -267,11 +268,11 @@ class ManagedSystem extends MetaSystem {
|
||||||
HashMap<String, String> tagsMap = new HashMap<>();
|
HashMap<String, String> tagsMap = new HashMap<>();
|
||||||
tagsMap.put("servername", name);
|
tagsMap.put("servername", name);
|
||||||
tagsMap.put("viosname", vios.name);
|
tagsMap.put("viosname", vios.name);
|
||||||
log.trace("getViosNetworkLpars() - tags: " + tagsMap.toString());
|
log.trace("getViosNetworkLpars() - tags: " + tagsMap);
|
||||||
|
|
||||||
HashMap<String, Object> fieldsMap = new HashMap<>();
|
HashMap<String, Object> fieldsMap = new HashMap<>();
|
||||||
fieldsMap.put("clientlpars", vios.network.clientLpars.size());
|
fieldsMap.put("clientlpars", vios.network.clientLpars.size());
|
||||||
log.trace("getViosNetworkLpars() - fields: " + fieldsMap.toString());
|
log.trace("getViosNetworkLpars() - fields: " + fieldsMap);
|
||||||
|
|
||||||
list.add(new Measurement(tagsMap, fieldsMap));
|
list.add(new Measurement(tagsMap, fieldsMap));
|
||||||
});
|
});
|
||||||
|
@ -293,7 +294,7 @@ class ManagedSystem extends MetaSystem {
|
||||||
tagsMap.put("viosname", vios.name);
|
tagsMap.put("viosname", vios.name);
|
||||||
//tagsMap.put("id", adapter.id);
|
//tagsMap.put("id", adapter.id);
|
||||||
tagsMap.put("location", adapter.physicalLocation);
|
tagsMap.put("location", adapter.physicalLocation);
|
||||||
log.trace("getViosNetworkSharedAdapters() - tags: " + tagsMap.toString());
|
log.trace("getViosNetworkSharedAdapters() - tags: " + tagsMap);
|
||||||
|
|
||||||
HashMap<String, Object> fieldsMap = new HashMap<>();
|
HashMap<String, Object> fieldsMap = new HashMap<>();
|
||||||
fieldsMap.put("id", adapter.id);
|
fieldsMap.put("id", adapter.id);
|
||||||
|
@ -304,8 +305,7 @@ class ManagedSystem extends MetaSystem {
|
||||||
fieldsMap.put("receivedPackets", adapter.receivedPackets);
|
fieldsMap.put("receivedPackets", adapter.receivedPackets);
|
||||||
fieldsMap.put("droppedPackets", adapter.droppedPackets);
|
fieldsMap.put("droppedPackets", adapter.droppedPackets);
|
||||||
fieldsMap.put("transferredBytes", adapter.transferredBytes);
|
fieldsMap.put("transferredBytes", adapter.transferredBytes);
|
||||||
fieldsMap.put("physicalLocation", adapter.physicalLocation);
|
log.trace("getViosNetworkSharedAdapters() - fields: " + fieldsMap);
|
||||||
log.trace("getViosNetworkSharedAdapters() - fields: " + fieldsMap.toString());
|
|
||||||
|
|
||||||
list.add(new Measurement(tagsMap, fieldsMap));
|
list.add(new Measurement(tagsMap, fieldsMap));
|
||||||
});
|
});
|
||||||
|
@ -331,7 +331,7 @@ class ManagedSystem extends MetaSystem {
|
||||||
tagsMap.put("systemname", name);
|
tagsMap.put("systemname", name);
|
||||||
tagsMap.put("viosname", vios.name);
|
tagsMap.put("viosname", vios.name);
|
||||||
tagsMap.put("location", adapter.physicalLocation);
|
tagsMap.put("location", adapter.physicalLocation);
|
||||||
log.trace("getViosNetworkVirtualAdapters() - tags: " + tagsMap.toString());
|
log.trace("getViosNetworkVirtualAdapters() - tags: " + tagsMap);
|
||||||
|
|
||||||
HashMap<String, Object> fieldsMap = new HashMap<>();
|
HashMap<String, Object> fieldsMap = new HashMap<>();
|
||||||
fieldsMap.put("droppedPackets", adapter.droppedPackets);
|
fieldsMap.put("droppedPackets", adapter.droppedPackets);
|
||||||
|
@ -347,8 +347,7 @@ class ManagedSystem extends MetaSystem {
|
||||||
fieldsMap.put("sentPhysicalPackets", adapter.sentPhysicalPackets);
|
fieldsMap.put("sentPhysicalPackets", adapter.sentPhysicalPackets);
|
||||||
fieldsMap.put("transferredBytes", adapter.transferredBytes);
|
fieldsMap.put("transferredBytes", adapter.transferredBytes);
|
||||||
fieldsMap.put("transferredPhysicalBytes", adapter.transferredPhysicalBytes);
|
fieldsMap.put("transferredPhysicalBytes", adapter.transferredPhysicalBytes);
|
||||||
fieldsMap.put("physicalLocation", adapter.physicalLocation);
|
log.trace("getViosNetworkVirtualAdapters() - fields: " + fieldsMap);
|
||||||
log.trace("getViosNetworkVirtualAdapters() - fields: " + fieldsMap.toString());
|
|
||||||
|
|
||||||
list.add(new Measurement(tagsMap, fieldsMap));
|
list.add(new Measurement(tagsMap, fieldsMap));
|
||||||
});
|
});
|
||||||
|
@ -373,7 +372,7 @@ class ManagedSystem extends MetaSystem {
|
||||||
tagsMap.put("servername", name);
|
tagsMap.put("servername", name);
|
||||||
tagsMap.put("viosname", vios.name);
|
tagsMap.put("viosname", vios.name);
|
||||||
tagsMap.put("location", adapter.physicalLocation);
|
tagsMap.put("location", adapter.physicalLocation);
|
||||||
log.trace("getViosNetworkGenericAdapters() - tags: " + tagsMap.toString());
|
log.trace("getViosNetworkGenericAdapters() - tags: " + tagsMap);
|
||||||
|
|
||||||
HashMap<String, Object> fieldsMap = new HashMap<>();
|
HashMap<String, Object> fieldsMap = new HashMap<>();
|
||||||
fieldsMap.put("sentBytes", adapter.sentBytes);
|
fieldsMap.put("sentBytes", adapter.sentBytes);
|
||||||
|
@ -382,7 +381,7 @@ class ManagedSystem extends MetaSystem {
|
||||||
fieldsMap.put("receivedPackets", adapter.receivedPackets);
|
fieldsMap.put("receivedPackets", adapter.receivedPackets);
|
||||||
fieldsMap.put("droppedPackets", adapter.droppedPackets);
|
fieldsMap.put("droppedPackets", adapter.droppedPackets);
|
||||||
fieldsMap.put("transferredBytes", adapter.transferredBytes);
|
fieldsMap.put("transferredBytes", adapter.transferredBytes);
|
||||||
log.trace("getViosNetworkGenericAdapters() - fields: " + fieldsMap.toString());
|
log.trace("getViosNetworkGenericAdapters() - fields: " + fieldsMap);
|
||||||
|
|
||||||
list.add(new Measurement(tagsMap, fieldsMap));
|
list.add(new Measurement(tagsMap, fieldsMap));
|
||||||
});
|
});
|
||||||
|
@ -401,11 +400,11 @@ class ManagedSystem extends MetaSystem {
|
||||||
HashMap<String, String> tagsMap = new HashMap<>();
|
HashMap<String, String> tagsMap = new HashMap<>();
|
||||||
tagsMap.put("servername", name);
|
tagsMap.put("servername", name);
|
||||||
tagsMap.put("viosname", vios.name);
|
tagsMap.put("viosname", vios.name);
|
||||||
log.trace("getViosStorageLpars() - tags: " + tagsMap.toString());
|
log.trace("getViosStorageLpars() - tags: " + tagsMap);
|
||||||
|
|
||||||
HashMap<String, Object> fieldsMap = new HashMap<>();
|
HashMap<String, Object> fieldsMap = new HashMap<>();
|
||||||
fieldsMap.put("clientlpars", vios.storage.clientLpars.size());
|
fieldsMap.put("clientlpars", vios.storage.clientLpars.size());
|
||||||
log.trace("getViosStorageLpars() - fields: " + fieldsMap.toString());
|
log.trace("getViosStorageLpars() - fields: " + fieldsMap);
|
||||||
|
|
||||||
list.add(new Measurement(tagsMap, fieldsMap));
|
list.add(new Measurement(tagsMap, fieldsMap));
|
||||||
});
|
});
|
||||||
|
@ -427,7 +426,7 @@ class ManagedSystem extends MetaSystem {
|
||||||
tagsMap.put("servername", name);
|
tagsMap.put("servername", name);
|
||||||
tagsMap.put("viosname", vios.name);
|
tagsMap.put("viosname", vios.name);
|
||||||
tagsMap.put("location", adapter.physicalLocation);
|
tagsMap.put("location", adapter.physicalLocation);
|
||||||
log.trace("getViosStorageFiberChannelAdapters() - tags: " + tagsMap.toString());
|
log.trace("getViosStorageFiberChannelAdapters() - tags: " + tagsMap);
|
||||||
|
|
||||||
HashMap<String, Object> fieldsMap = new HashMap<>();
|
HashMap<String, Object> fieldsMap = new HashMap<>();
|
||||||
fieldsMap.put("numOfReads", adapter.numOfReads);
|
fieldsMap.put("numOfReads", adapter.numOfReads);
|
||||||
|
@ -435,8 +434,7 @@ class ManagedSystem extends MetaSystem {
|
||||||
fieldsMap.put("readBytes", adapter.readBytes);
|
fieldsMap.put("readBytes", adapter.readBytes);
|
||||||
fieldsMap.put("writeBytes", adapter.writeBytes);
|
fieldsMap.put("writeBytes", adapter.writeBytes);
|
||||||
fieldsMap.put("transmittedBytes", adapter.transmittedBytes);
|
fieldsMap.put("transmittedBytes", adapter.transmittedBytes);
|
||||||
fieldsMap.put("physicalLocation", adapter.physicalLocation);
|
log.trace("getViosStorageFiberChannelAdapters() - fields: " + fieldsMap);
|
||||||
log.trace("getViosStorageFiberChannelAdapters() - fields: " + fieldsMap.toString());
|
|
||||||
|
|
||||||
list.add(new Measurement(tagsMap, fieldsMap));
|
list.add(new Measurement(tagsMap, fieldsMap));
|
||||||
});
|
});
|
||||||
|
@ -494,7 +492,7 @@ class ManagedSystem extends MetaSystem {
|
||||||
tagsMap.put("viosname", vios.name);
|
tagsMap.put("viosname", vios.name);
|
||||||
tagsMap.put("id", adapter.id);
|
tagsMap.put("id", adapter.id);
|
||||||
tagsMap.put("location", adapter.physicalLocation);
|
tagsMap.put("location", adapter.physicalLocation);
|
||||||
log.trace("getViosStoragePhysicalAdapters() - tags: " + tagsMap.toString());
|
log.trace("getViosStoragePhysicalAdapters() - tags: " + tagsMap);
|
||||||
|
|
||||||
HashMap<String, Object> fieldsMap = new HashMap<>();
|
HashMap<String, Object> fieldsMap = new HashMap<>();
|
||||||
fieldsMap.put("numOfReads", adapter.numOfReads);
|
fieldsMap.put("numOfReads", adapter.numOfReads);
|
||||||
|
@ -503,8 +501,7 @@ class ManagedSystem extends MetaSystem {
|
||||||
fieldsMap.put("writeBytes", adapter.writeBytes);
|
fieldsMap.put("writeBytes", adapter.writeBytes);
|
||||||
fieldsMap.put("transmittedBytes", adapter.transmittedBytes);
|
fieldsMap.put("transmittedBytes", adapter.transmittedBytes);
|
||||||
fieldsMap.put("type", adapter.type);
|
fieldsMap.put("type", adapter.type);
|
||||||
fieldsMap.put("physicalLocation", adapter.physicalLocation);
|
log.trace("getViosStoragePhysicalAdapters() - fields: " + fieldsMap);
|
||||||
log.trace("getViosStoragePhysicalAdapters() - fields: " + fieldsMap.toString());
|
|
||||||
|
|
||||||
list.add(new Measurement(tagsMap, fieldsMap));
|
list.add(new Measurement(tagsMap, fieldsMap));
|
||||||
});
|
});
|
||||||
|
@ -529,7 +526,7 @@ class ManagedSystem extends MetaSystem {
|
||||||
tagsMap.put("viosname", vios.name);
|
tagsMap.put("viosname", vios.name);
|
||||||
tagsMap.put("location", adapter.physicalLocation);
|
tagsMap.put("location", adapter.physicalLocation);
|
||||||
tagsMap.put("id", adapter.id);
|
tagsMap.put("id", adapter.id);
|
||||||
log.trace("getViosStorageVirtualAdapters() - tags: " + tagsMap.toString());
|
log.trace("getViosStorageVirtualAdapters() - tags: " + tagsMap);
|
||||||
|
|
||||||
HashMap<String, Object> fieldsMap = new HashMap<>();
|
HashMap<String, Object> fieldsMap = new HashMap<>();
|
||||||
fieldsMap.put("numOfReads", adapter.numOfReads);
|
fieldsMap.put("numOfReads", adapter.numOfReads);
|
||||||
|
@ -538,8 +535,7 @@ class ManagedSystem extends MetaSystem {
|
||||||
fieldsMap.put("writeBytes", adapter.writeBytes);
|
fieldsMap.put("writeBytes", adapter.writeBytes);
|
||||||
fieldsMap.put("transmittedBytes", adapter.transmittedBytes);
|
fieldsMap.put("transmittedBytes", adapter.transmittedBytes);
|
||||||
fieldsMap.put("type", adapter.type);
|
fieldsMap.put("type", adapter.type);
|
||||||
fieldsMap.put("physicalLocation", adapter.physicalLocation);
|
log.trace("getViosStorageVirtualAdapters() - fields: " + fieldsMap);
|
||||||
log.trace("getViosStorageVirtualAdapters() - fields: " + fieldsMap.toString());
|
|
||||||
|
|
||||||
list.add(new Measurement(tagsMap, fieldsMap));
|
list.add(new Measurement(tagsMap, fieldsMap));
|
||||||
});
|
});
|
||||||
|
|
|
@ -48,11 +48,11 @@ class SystemEnergy extends MetaSystem {
|
||||||
|
|
||||||
HashMap<String, String> tagsMap = new HashMap<>();
|
HashMap<String, String> tagsMap = new HashMap<>();
|
||||||
tagsMap.put("servername", system.name);
|
tagsMap.put("servername", system.name);
|
||||||
log.trace("getPowerMetrics() - tags: " + tagsMap.toString());
|
log.trace("getPowerMetrics() - tags: " + tagsMap);
|
||||||
|
|
||||||
Map<String, Object> fieldsMap = new HashMap<>();
|
Map<String, Object> fieldsMap = new HashMap<>();
|
||||||
fieldsMap.put("powerReading", metrics.systemUtil.sample.energyUtil.powerUtil.powerReading);
|
fieldsMap.put("powerReading", metrics.systemUtil.sample.energyUtil.powerUtil.powerReading);
|
||||||
log.trace("getPowerMetrics() - fields: " + fieldsMap.toString());
|
log.trace("getPowerMetrics() - fields: " + fieldsMap);
|
||||||
|
|
||||||
list.add(new Measurement(tagsMap, fieldsMap));
|
list.add(new Measurement(tagsMap, fieldsMap));
|
||||||
return list;
|
return list;
|
||||||
|
@ -65,7 +65,7 @@ class SystemEnergy extends MetaSystem {
|
||||||
|
|
||||||
HashMap<String, String> tagsMap = new HashMap<>();
|
HashMap<String, String> tagsMap = new HashMap<>();
|
||||||
tagsMap.put("servername", system.name);
|
tagsMap.put("servername", system.name);
|
||||||
log.trace("getThermalMetrics() - tags: " + tagsMap.toString());
|
log.trace("getThermalMetrics() - tags: " + tagsMap);
|
||||||
|
|
||||||
Map<String, Object> fieldsMap = new HashMap<>();
|
Map<String, Object> fieldsMap = new HashMap<>();
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ class SystemEnergy extends MetaSystem {
|
||||||
fieldsMap.put("baseboardTemperature_" + t.entityInstance, t.temperatureReading);
|
fieldsMap.put("baseboardTemperature_" + t.entityInstance, t.temperatureReading);
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
log.trace("getThermalMetrics() - fields: " + fieldsMap.toString());
|
log.trace("getThermalMetrics() - fields: " + fieldsMap);
|
||||||
list.add(new Measurement(tagsMap, fieldsMap));
|
list.add(new Measurement(tagsMap, fieldsMap));
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package biz.nellemann.hmci.pcm;
|
package biz.nellemann.hmci.pcm;
|
||||||
|
|
||||||
public class EnergyUtil {
|
public final class EnergyUtil {
|
||||||
public PowerUtil powerUtil = new PowerUtil();
|
public final PowerUtil powerUtil = new PowerUtil();
|
||||||
public ThermalUtil thermalUtil = new ThermalUtil();
|
public final ThermalUtil thermalUtil = new ThermalUtil();
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@ package biz.nellemann.hmci.pcm;
|
||||||
|
|
||||||
import com.serjltt.moshi.adapters.FirstElement;
|
import com.serjltt.moshi.adapters.FirstElement;
|
||||||
|
|
||||||
public class FiberChannelAdapter {
|
public final class FiberChannelAdapter {
|
||||||
|
|
||||||
public String id = "";
|
public String id = "";
|
||||||
public String wwpn = "";
|
public String wwpn = "";
|
||||||
|
|
|
@ -2,10 +2,7 @@ package biz.nellemann.hmci.pcm;
|
||||||
|
|
||||||
import com.serjltt.moshi.adapters.FirstElement;
|
import com.serjltt.moshi.adapters.FirstElement;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
public final class GenericAdapter {
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class GenericAdapter {
|
|
||||||
|
|
||||||
public String id = "";
|
public String id = "";
|
||||||
public String type = "";
|
public String type = "";
|
||||||
|
|
|
@ -2,7 +2,7 @@ package biz.nellemann.hmci.pcm;
|
||||||
|
|
||||||
import com.serjltt.moshi.adapters.FirstElement;
|
import com.serjltt.moshi.adapters.FirstElement;
|
||||||
|
|
||||||
public class GenericPhysicalAdapters {
|
public final class GenericPhysicalAdapters {
|
||||||
|
|
||||||
public String id = "";
|
public String id = "";
|
||||||
public String type = "";
|
public String type = "";
|
||||||
|
|
|
@ -3,7 +3,7 @@ package biz.nellemann.hmci.pcm;
|
||||||
import com.serjltt.moshi.adapters.FirstElement;
|
import com.serjltt.moshi.adapters.FirstElement;
|
||||||
|
|
||||||
|
|
||||||
public class GenericVirtualAdapter {
|
public final class GenericVirtualAdapter {
|
||||||
|
|
||||||
public String id = "";
|
public String id = "";
|
||||||
public String type = "";
|
public String type = "";
|
||||||
|
|
|
@ -2,7 +2,7 @@ package biz.nellemann.hmci.pcm;
|
||||||
|
|
||||||
import com.serjltt.moshi.adapters.FirstElement;
|
import com.serjltt.moshi.adapters.FirstElement;
|
||||||
|
|
||||||
public class LparMemory {
|
public final class LparMemory {
|
||||||
|
|
||||||
@FirstElement
|
@FirstElement
|
||||||
public Number logicalMem = 0.0;
|
public Number logicalMem = 0.0;
|
||||||
|
|
|
@ -2,7 +2,7 @@ package biz.nellemann.hmci.pcm;
|
||||||
|
|
||||||
import com.serjltt.moshi.adapters.FirstElement;
|
import com.serjltt.moshi.adapters.FirstElement;
|
||||||
|
|
||||||
public class LparProcessor {
|
public final class LparProcessor {
|
||||||
|
|
||||||
public Integer poolId = 0;
|
public Integer poolId = 0;
|
||||||
public Integer weight = 0;
|
public Integer weight = 0;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package biz.nellemann.hmci.pcm;
|
package biz.nellemann.hmci.pcm;
|
||||||
|
|
||||||
public class LparUtil {
|
public final class LparUtil {
|
||||||
|
|
||||||
public Integer id = 0;
|
public Integer id = 0;
|
||||||
public String uuid = "";
|
public String uuid = "";
|
||||||
|
@ -10,9 +10,9 @@ public class LparUtil {
|
||||||
public String osType = "";
|
public String osType = "";
|
||||||
public Number affinityScore = 0.0f;
|
public Number affinityScore = 0.0f;
|
||||||
|
|
||||||
public LparMemory memory = new LparMemory();
|
public final LparMemory memory = new LparMemory();
|
||||||
public LparProcessor processor = new LparProcessor();
|
public final LparProcessor processor = new LparProcessor();
|
||||||
public Network network = new Network();
|
public final Network network = new Network();
|
||||||
public Storage storage = new Storage();
|
public final Storage storage = new Storage();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,11 +3,11 @@ package biz.nellemann.hmci.pcm;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class Network {
|
public final class Network {
|
||||||
|
|
||||||
public List<String> clientLpars = new ArrayList<>();
|
public final List<String> clientLpars = new ArrayList<>();
|
||||||
public List<GenericAdapter> genericAdapters = new ArrayList<>();
|
public final List<GenericAdapter> genericAdapters = new ArrayList<>();
|
||||||
public List<SharedAdapter> sharedAdapters = new ArrayList<>();
|
public final List<SharedAdapter> sharedAdapters = new ArrayList<>();
|
||||||
public List<VirtualEthernetAdapter> virtualEthernetAdapters = new ArrayList<>();
|
public final List<VirtualEthernetAdapter> virtualEthernetAdapters = new ArrayList<>();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package biz.nellemann.hmci.pcm;
|
package biz.nellemann.hmci.pcm;
|
||||||
|
|
||||||
public class PcmData {
|
public final class PcmData {
|
||||||
|
|
||||||
public SystemUtil systemUtil = new SystemUtil();
|
public final SystemUtil systemUtil = new SystemUtil();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,10 +2,7 @@ package biz.nellemann.hmci.pcm;
|
||||||
|
|
||||||
import com.serjltt.moshi.adapters.FirstElement;
|
import com.serjltt.moshi.adapters.FirstElement;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
public final class PhysicalProcessorPool {
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class PhysicalProcessorPool {
|
|
||||||
|
|
||||||
@FirstElement
|
@FirstElement
|
||||||
public Number assignedProcUnits = 0.0;
|
public Number assignedProcUnits = 0.0;
|
||||||
|
|
|
@ -3,7 +3,7 @@ package biz.nellemann.hmci.pcm;
|
||||||
|
|
||||||
import com.serjltt.moshi.adapters.FirstElement;
|
import com.serjltt.moshi.adapters.FirstElement;
|
||||||
|
|
||||||
public class PowerUtil {
|
public final class PowerUtil {
|
||||||
|
|
||||||
@FirstElement
|
@FirstElement
|
||||||
public Number powerReading = 0.0;
|
public Number powerReading = 0.0;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package biz.nellemann.hmci.pcm;
|
package biz.nellemann.hmci.pcm;
|
||||||
|
|
||||||
public class SampleInfo {
|
public final class SampleInfo {
|
||||||
|
|
||||||
public String timeStamp = "";
|
public String timeStamp = "";
|
||||||
public Integer status = 0;
|
public Integer status = 0;
|
||||||
|
|
|
@ -2,7 +2,7 @@ package biz.nellemann.hmci.pcm;
|
||||||
|
|
||||||
import com.serjltt.moshi.adapters.FirstElement;
|
import com.serjltt.moshi.adapters.FirstElement;
|
||||||
|
|
||||||
public class ServerMemory {
|
public final class ServerMemory {
|
||||||
|
|
||||||
@FirstElement
|
@FirstElement
|
||||||
public Number totalMem = 0.0;
|
public Number totalMem = 0.0;
|
||||||
|
|
|
@ -2,7 +2,7 @@ package biz.nellemann.hmci.pcm;
|
||||||
|
|
||||||
import com.serjltt.moshi.adapters.FirstElement;
|
import com.serjltt.moshi.adapters.FirstElement;
|
||||||
|
|
||||||
public class ServerProcessor {
|
public final class ServerProcessor {
|
||||||
|
|
||||||
@FirstElement
|
@FirstElement
|
||||||
public Number totalProcUnits = 0.0;
|
public Number totalProcUnits = 0.0;
|
||||||
|
|
|
@ -3,11 +3,11 @@ package biz.nellemann.hmci.pcm;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class ServerUtil {
|
public final class ServerUtil {
|
||||||
|
|
||||||
public ServerProcessor processor = new ServerProcessor();
|
public final ServerProcessor processor = new ServerProcessor();
|
||||||
public ServerMemory memory = new ServerMemory();
|
public final ServerMemory memory = new ServerMemory();
|
||||||
public PhysicalProcessorPool physicalProcessorPool = new PhysicalProcessorPool();
|
public final PhysicalProcessorPool physicalProcessorPool = new PhysicalProcessorPool();
|
||||||
public List<SharedProcessorPool> sharedProcessorPool = new ArrayList<>();
|
public final List<SharedProcessorPool> sharedProcessorPool = new ArrayList<>();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@ package biz.nellemann.hmci.pcm;
|
||||||
|
|
||||||
import com.serjltt.moshi.adapters.FirstElement;
|
import com.serjltt.moshi.adapters.FirstElement;
|
||||||
|
|
||||||
public class SharedAdapter {
|
public final class SharedAdapter {
|
||||||
|
|
||||||
public String id = "";
|
public String id = "";
|
||||||
public String type = "";
|
public String type = "";
|
||||||
|
|
|
@ -2,7 +2,7 @@ package biz.nellemann.hmci.pcm;
|
||||||
|
|
||||||
import com.serjltt.moshi.adapters.FirstElement;
|
import com.serjltt.moshi.adapters.FirstElement;
|
||||||
|
|
||||||
public class SharedProcessorPool {
|
public final class SharedProcessorPool {
|
||||||
|
|
||||||
public String id = "";
|
public String id = "";
|
||||||
public String name = "";
|
public String name = "";
|
||||||
|
|
|
@ -3,12 +3,12 @@ package biz.nellemann.hmci.pcm;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class Storage {
|
public final class Storage {
|
||||||
|
|
||||||
public List<String> clientLpars = new ArrayList<>();
|
public final List<String> clientLpars = new ArrayList<>();
|
||||||
public List<GenericPhysicalAdapters> genericPhysicalAdapters = new ArrayList<>();
|
public final List<GenericPhysicalAdapters> genericPhysicalAdapters = new ArrayList<>();
|
||||||
public List<GenericVirtualAdapter> genericVirtualAdapters = new ArrayList<>();
|
public final List<GenericVirtualAdapter> genericVirtualAdapters = new ArrayList<>();
|
||||||
public List<FiberChannelAdapter> fiberChannelAdapters = new ArrayList<>();
|
public final List<FiberChannelAdapter> fiberChannelAdapters = new ArrayList<>();
|
||||||
public List<VirtualFiberChannelAdapter> virtualFiberChannelAdapters = new ArrayList<>();
|
public final List<VirtualFiberChannelAdapter> virtualFiberChannelAdapters = new ArrayList<>();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,10 +2,7 @@ package biz.nellemann.hmci.pcm;
|
||||||
|
|
||||||
import com.serjltt.moshi.adapters.FirstElement;
|
import com.serjltt.moshi.adapters.FirstElement;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
public final class SystemFirmware {
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class SystemFirmware {
|
|
||||||
|
|
||||||
@FirstElement
|
@FirstElement
|
||||||
public Number utilizedProcUnits = 0.0;
|
public Number utilizedProcUnits = 0.0;
|
||||||
|
|
|
@ -3,7 +3,7 @@ package biz.nellemann.hmci.pcm;
|
||||||
import com.serjltt.moshi.adapters.FirstElement;
|
import com.serjltt.moshi.adapters.FirstElement;
|
||||||
import com.squareup.moshi.Json;
|
import com.squareup.moshi.Json;
|
||||||
|
|
||||||
public class SystemUtil {
|
public final class SystemUtil {
|
||||||
|
|
||||||
public UtilInfo utilInfo;
|
public UtilInfo utilInfo;
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ package biz.nellemann.hmci.pcm;
|
||||||
|
|
||||||
import com.serjltt.moshi.adapters.FirstElement;
|
import com.serjltt.moshi.adapters.FirstElement;
|
||||||
|
|
||||||
public class Temperature {
|
public final class Temperature {
|
||||||
|
|
||||||
public String entityId = "";
|
public String entityId = "";
|
||||||
public String entityInstance = "";
|
public String entityInstance = "";
|
||||||
|
|
|
@ -3,10 +3,10 @@ package biz.nellemann.hmci.pcm;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class ThermalUtil {
|
public final class ThermalUtil {
|
||||||
|
|
||||||
public List<Temperature> inletTemperatures = new ArrayList<>();
|
public final List<Temperature> inletTemperatures = new ArrayList<>();
|
||||||
public List<Temperature> cpuTemperatures = new ArrayList<>();
|
public final List<Temperature> cpuTemperatures = new ArrayList<>();
|
||||||
public List<Temperature> baseboardTemperatures = new ArrayList<>();
|
public final List<Temperature> baseboardTemperatures = new ArrayList<>();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,10 +2,7 @@ package biz.nellemann.hmci.pcm;
|
||||||
|
|
||||||
import com.serjltt.moshi.adapters.FirstElement;
|
import com.serjltt.moshi.adapters.FirstElement;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
public final class UtilInfo {
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class UtilInfo {
|
|
||||||
|
|
||||||
public String version = "";
|
public String version = "";
|
||||||
public String metricType = "";
|
public String metricType = "";
|
||||||
|
|
|
@ -5,16 +5,16 @@ import com.serjltt.moshi.adapters.FirstElement;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class UtilSample {
|
public final class UtilSample {
|
||||||
|
|
||||||
public String sampleType = "";
|
public String sampleType = "";
|
||||||
public SampleInfo sampleInfo = new SampleInfo();
|
public final SampleInfo sampleInfo = new SampleInfo();
|
||||||
public SystemFirmware systemFirmwareUtil = new SystemFirmware();
|
public final SystemFirmware systemFirmwareUtil = new SystemFirmware();
|
||||||
public ServerUtil serverUtil = new ServerUtil();
|
public final ServerUtil serverUtil = new ServerUtil();
|
||||||
public EnergyUtil energyUtil = new EnergyUtil();
|
public final EnergyUtil energyUtil = new EnergyUtil();
|
||||||
public List<ViosUtil> viosUtil = new ArrayList<>();
|
public final List<ViosUtil> viosUtil = new ArrayList<>();
|
||||||
|
|
||||||
@FirstElement
|
@FirstElement
|
||||||
public LparUtil lparsUtil = new LparUtil();
|
public final LparUtil lparsUtil = new LparUtil();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@ package biz.nellemann.hmci.pcm;
|
||||||
|
|
||||||
import com.serjltt.moshi.adapters.FirstElement;
|
import com.serjltt.moshi.adapters.FirstElement;
|
||||||
|
|
||||||
public class ViosMemory {
|
public final class ViosMemory {
|
||||||
|
|
||||||
@FirstElement
|
@FirstElement
|
||||||
public Number assignedMem = 0.0;
|
public Number assignedMem = 0.0;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package biz.nellemann.hmci.pcm;
|
package biz.nellemann.hmci.pcm;
|
||||||
|
|
||||||
public class ViosUtil {
|
public final class ViosUtil {
|
||||||
|
|
||||||
public String id = "";
|
public String id = "";
|
||||||
public String uuid = "";
|
public String uuid = "";
|
||||||
|
@ -8,9 +8,9 @@ public class ViosUtil {
|
||||||
public String state = "";
|
public String state = "";
|
||||||
public Integer affinityScore = 0;
|
public Integer affinityScore = 0;
|
||||||
|
|
||||||
public ViosMemory memory = new ViosMemory();
|
public final ViosMemory memory = new ViosMemory();
|
||||||
public LparProcessor processor = new LparProcessor();
|
public final LparProcessor processor = new LparProcessor();
|
||||||
public Network network = new Network();
|
public final Network network = new Network();
|
||||||
public Storage storage = new Storage();
|
public final Storage storage = new Storage();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@ package biz.nellemann.hmci.pcm;
|
||||||
import com.serjltt.moshi.adapters.FirstElement;
|
import com.serjltt.moshi.adapters.FirstElement;
|
||||||
|
|
||||||
|
|
||||||
public class VirtualEthernetAdapter {
|
public final class VirtualEthernetAdapter {
|
||||||
|
|
||||||
public String physicalLocation = "";
|
public String physicalLocation = "";
|
||||||
public Integer vlanId = 0;
|
public Integer vlanId = 0;
|
||||||
|
|
|
@ -2,10 +2,7 @@ package biz.nellemann.hmci.pcm;
|
||||||
|
|
||||||
import com.serjltt.moshi.adapters.FirstElement;
|
import com.serjltt.moshi.adapters.FirstElement;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
public final class VirtualFiberChannelAdapter {
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class VirtualFiberChannelAdapter {
|
|
||||||
|
|
||||||
public String wwpn = "";
|
public String wwpn = "";
|
||||||
public String wwpn2 = "";
|
public String wwpn2 = "";
|
||||||
|
|
|
@ -135,8 +135,165 @@ class ManagedSystemTest extends Specification {
|
||||||
|
|
||||||
then:
|
then:
|
||||||
listOfMeasurements.size() == 2
|
listOfMeasurements.size() == 2
|
||||||
|
listOfMeasurements.first().fields['mode'] == "share_idle_procs_active"
|
||||||
listOfMeasurements.first().fields['entitledProcUnits'] == 1.0
|
listOfMeasurements.first().fields['entitledProcUnits'] == 1.0
|
||||||
listOfMeasurements.first().fields['utilizedCappedProcUnits'] == 0.12
|
listOfMeasurements.first().fields['utilizedCappedProcUnits'] == 0.12
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void "test getViosNetworkLpars"() {
|
||||||
|
|
||||||
|
setup:
|
||||||
|
def testFile = new File(getClass().getResource('/pcm-data-managed-system.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")
|
||||||
|
|
||||||
|
when:
|
||||||
|
system.processMetrics(testJson)
|
||||||
|
List<Measurement> listOfMeasurements = system.getViosNetworkLpars()
|
||||||
|
|
||||||
|
then:
|
||||||
|
listOfMeasurements.size() == 2
|
||||||
|
listOfMeasurements.first().tags['viosname'] == "VIOS1"
|
||||||
|
listOfMeasurements.first().fields['clientlpars'] == 1
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void "test getViosNetworkSharedAdapters"() {
|
||||||
|
|
||||||
|
setup:
|
||||||
|
def testFile = new File(getClass().getResource('/pcm-data-managed-system.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")
|
||||||
|
|
||||||
|
when:
|
||||||
|
system.processMetrics(testJson)
|
||||||
|
List<Measurement> listOfMeasurements = system.getViosNetworkSharedAdapters()
|
||||||
|
|
||||||
|
then:
|
||||||
|
listOfMeasurements.size() == 2
|
||||||
|
listOfMeasurements.first().tags['viosname'] == "VIOS1"
|
||||||
|
listOfMeasurements.first().tags['location'] == "U8247.22L.213C1BA-V1-C2-T1"
|
||||||
|
listOfMeasurements.first().fields['type'] == "sea"
|
||||||
|
listOfMeasurements.first().fields['transferredBytes'] == 14180.2d
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void "test getViosNetworkVirtualAdapters"() {
|
||||||
|
|
||||||
|
setup:
|
||||||
|
def testFile = new File(getClass().getResource('/pcm-data-managed-system.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")
|
||||||
|
|
||||||
|
when:
|
||||||
|
system.processMetrics(testJson)
|
||||||
|
List<Measurement> listOfMeasurements = system.getViosNetworkVirtualAdapters()
|
||||||
|
|
||||||
|
then:
|
||||||
|
listOfMeasurements.size() == 4
|
||||||
|
listOfMeasurements.first().tags['viosname'] == "VIOS1"
|
||||||
|
listOfMeasurements.first().tags['location'] == "U8247.22L.213C1BA-V1-C2"
|
||||||
|
listOfMeasurements.first().tags['vswitchid'] == "0"
|
||||||
|
listOfMeasurements.first().fields['transferredBytes'] == 8245.4d
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void "test getViosNetworkGenericAdapters"() {
|
||||||
|
|
||||||
|
setup:
|
||||||
|
def testFile = new File(getClass().getResource('/pcm-data-managed-system.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")
|
||||||
|
|
||||||
|
when:
|
||||||
|
system.processMetrics(testJson)
|
||||||
|
List<Measurement> listOfMeasurements = system.getViosNetworkGenericAdapters()
|
||||||
|
|
||||||
|
then:
|
||||||
|
listOfMeasurements.size() == 6
|
||||||
|
listOfMeasurements.first().tags['viosname'] == "VIOS1"
|
||||||
|
listOfMeasurements.first().tags['location'] == "U78CB.001.WZS0BYF-P1-C10-T3"
|
||||||
|
listOfMeasurements.first().fields['receivedBytes'] == 1614.567d
|
||||||
|
listOfMeasurements.first().fields['sentBytes'] == 3511.833d
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void "test getViosStorageLpars"() {
|
||||||
|
|
||||||
|
setup:
|
||||||
|
def testFile = new File(getClass().getResource('/pcm-data-managed-system.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")
|
||||||
|
|
||||||
|
when:
|
||||||
|
system.processMetrics(testJson)
|
||||||
|
List<Measurement> listOfMeasurements = system.getViosStorageLpars()
|
||||||
|
|
||||||
|
then:
|
||||||
|
listOfMeasurements.size() == 2
|
||||||
|
listOfMeasurements.first().tags['viosname'] == "VIOS1"
|
||||||
|
listOfMeasurements.first().fields['clientlpars'] == 1
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void "test getViosStorageFiberChannelAdapters"() {
|
||||||
|
|
||||||
|
setup:
|
||||||
|
def testFile = new File(getClass().getResource('/pcm-data-managed-system.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")
|
||||||
|
|
||||||
|
when:
|
||||||
|
system.processMetrics(testJson)
|
||||||
|
List<Measurement> listOfMeasurements = system.getViosStorageFiberChannelAdapters()
|
||||||
|
|
||||||
|
then:
|
||||||
|
listOfMeasurements.size() == 4
|
||||||
|
listOfMeasurements.first().tags['viosname'] == "VIOS1"
|
||||||
|
listOfMeasurements.first().tags['location'] == "U78CB.001.WZS0BYF-P1-C12-T1"
|
||||||
|
listOfMeasurements.first().fields['numOfReads'] == 0.0
|
||||||
|
listOfMeasurements.first().fields['numOfWrites'] == 0.067d
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void "test getViosStoragePhysicalAdapters"() {
|
||||||
|
|
||||||
|
setup:
|
||||||
|
def testFile = new File(getClass().getResource('/pcm-data-managed-system.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")
|
||||||
|
|
||||||
|
when:
|
||||||
|
system.processMetrics(testJson)
|
||||||
|
List<Measurement> listOfMeasurements = system.getViosStoragePhysicalAdapters()
|
||||||
|
|
||||||
|
then:
|
||||||
|
listOfMeasurements.size() == 2
|
||||||
|
listOfMeasurements.first().tags['viosname'] == "VIOS1"
|
||||||
|
listOfMeasurements.first().tags['location'] == "U78CB.001.WZS0BYF-P1-C14-T1"
|
||||||
|
listOfMeasurements.first().fields['numOfReads'] == 0.0
|
||||||
|
listOfMeasurements.first().fields['numOfWrites'] == 19.467d
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void "test getViosStorageVirtualAdapters"() {
|
||||||
|
|
||||||
|
setup:
|
||||||
|
def testFile = new File(getClass().getResource('/pcm-data-managed-system.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")
|
||||||
|
|
||||||
|
when:
|
||||||
|
system.processMetrics(testJson)
|
||||||
|
List<Measurement> listOfMeasurements = system.getViosStorageVirtualAdapters()
|
||||||
|
|
||||||
|
then:
|
||||||
|
listOfMeasurements.size() == 3
|
||||||
|
listOfMeasurements.first().tags['viosname'] == "VIOS1"
|
||||||
|
listOfMeasurements.first().tags['location'] == "U8247.22L.213C1BA-V1-C6"
|
||||||
|
listOfMeasurements.first().fields['numOfReads'] == 0.0
|
||||||
|
listOfMeasurements.first().fields['numOfWrites'] == 0.0
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,4 +23,40 @@ class SystemEnergyTest extends Specification {
|
||||||
system.energy.metrics.systemUtil.sample.energyUtil.thermalUtil.baseboardTemperatures.first().temperatureReading == 45.0
|
system.energy.metrics.systemUtil.sample.energyUtil.thermalUtil.baseboardTemperatures.first().temperatureReading == 45.0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void "test power readings for ManagedSystem Energy"() {
|
||||||
|
|
||||||
|
setup:
|
||||||
|
def testFile = new File(getClass().getResource('/pcm-data-energy.json').toURI())
|
||||||
|
def testJson = testFile.getText('UTF-8')
|
||||||
|
|
||||||
|
when:
|
||||||
|
ManagedSystem system = new ManagedSystem("e09834d1-c930-3883-bdad-405d8e26e166", "Test Name","Test Type", "Test Model", "Test S/N")
|
||||||
|
system.energy.processMetrics(testJson)
|
||||||
|
List<Measurement> measurements = system.energy.getPowerMetrics()
|
||||||
|
|
||||||
|
then:
|
||||||
|
measurements.first().tags.get('servername') == 'Test Name'
|
||||||
|
measurements.first().fields.get('powerReading') == 542.0f
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void "test thermal readings for ManagedSystem Energy"() {
|
||||||
|
|
||||||
|
setup:
|
||||||
|
def testFile = new File(getClass().getResource('/pcm-data-energy.json').toURI())
|
||||||
|
def testJson = testFile.getText('UTF-8')
|
||||||
|
|
||||||
|
when:
|
||||||
|
ManagedSystem system = new ManagedSystem("e09834d1-c930-3883-bdad-405d8e26e166", "Test Name","Test Type", "Test Model", "Test S/N")
|
||||||
|
system.energy.processMetrics(testJson)
|
||||||
|
List<Measurement> measurements = system.energy.getThermalMetrics()
|
||||||
|
|
||||||
|
then:
|
||||||
|
measurements.first().tags.get('servername') == 'Test Name'
|
||||||
|
measurements.first().fields.get('cpuTemperature_1') == 46.0f
|
||||||
|
measurements.first().fields.get('cpuTemperature_2') == 54.0f
|
||||||
|
measurements.first().fields.get('inletTemperature_1') == 26.0f
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue