Merged in issue/01 (pull request #6)

Issue/01

Approved-by: Mark Nellemann <mark.nellemann@gmail.com>
This commit is contained in:
Mark Nellemann 2020-10-20 07:14:41 +00:00
commit bbb10cce71
2 changed files with 11 additions and 4 deletions

View file

@ -1,3 +1,3 @@
id = hmci id = hmci
group = biz.nellemann.hmci group = biz.nellemann.hmci
version = 0.2.2 version = 0.2.3

View file

@ -152,12 +152,20 @@ class Insights {
void writeMetricsForManagedSystems() { void writeMetricsForManagedSystems() {
systems.forEach((systemId, system) -> influxClient.writeManagedSystem(system)); try {
systems.forEach((systemId, system) -> influxClient.writeManagedSystem(system));
} catch (NullPointerException npe) {
log.warn("writeMetricsForManagedSystems() - NPE: " + npe.toString());
}
} }
void writeMetricsForLogicalPartitions() { void writeMetricsForLogicalPartitions() {
partitions.forEach((partitionId, partition) -> influxClient.writeLogicalPartition(partition)); try {
partitions.forEach((partitionId, partition) -> influxClient.writeLogicalPartition(partition));
} catch (NullPointerException npe) {
log.warn("writeMetricsForLogicalPartitions() - NPE: " + npe.toString());
}
} }
@ -174,7 +182,6 @@ class Insights {
Runtime.getRuntime().addShutdownHook(shutdownHook); Runtime.getRuntime().addShutdownHook(shutdownHook);
do { do {
try { try {
getMetricsForSystems(); getMetricsForSystems();
getMetricsForPartitions(); getMetricsForPartitions();