From 714d4b6005731da19e3f3b7be28889905ed82dae Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Sat, 16 Sep 2023 23:06:07 -0400 Subject: [PATCH] Revert float conversion of cpu_cores Results in much uglier output, there are no decimal core counts. --- node-daemon/plugins/load | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/node-daemon/plugins/load b/node-daemon/plugins/load index c9fba488..8febce50 100644 --- a/node-daemon/plugins/load +++ b/node-daemon/plugins/load @@ -75,10 +75,10 @@ class MonitoringPluginScript(MonitoringPlugin): load_average = float(round(getloadavg()[0], 2)) # Get the number of CPU cores - cpu_cores = float(cpu_count()) + cpu_cores = cpu_count() # Check that the load average is greater or equal to the cpu count - if load_average > cpu_cores: + if load_average > float(cpu_cores): # Set the health delta to 10 (subtract 10 from the total of 100) health_delta = 50 # Craft a message that can be used by the clients