Quick fix, catch null exceptions when getting metrics data.
This commit is contained in:
parent
350ff8c354
commit
27468b2637
|
@ -152,12 +152,20 @@ class Insights {
|
|||
|
||||
|
||||
void writeMetricsForManagedSystems() {
|
||||
try {
|
||||
systems.forEach((systemId, system) -> influxClient.writeManagedSystem(system));
|
||||
} catch (NullPointerException npe) {
|
||||
log.warn("writeMetricsForManagedSystems() - NPE: " + npe.toString());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void writeMetricsForLogicalPartitions() {
|
||||
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);
|
||||
|
||||
do {
|
||||
|
||||
try {
|
||||
getMetricsForSystems();
|
||||
getMetricsForPartitions();
|
||||
|
|
Loading…
Reference in a new issue