Revert float conversion of cpu_cores
Results in much uglier output, there are no decimal core counts.
This commit is contained in:
parent
fa8329ac3d
commit
714d4b6005
|
@ -75,10 +75,10 @@ class MonitoringPluginScript(MonitoringPlugin):
|
||||||
load_average = float(round(getloadavg()[0], 2))
|
load_average = float(round(getloadavg()[0], 2))
|
||||||
|
|
||||||
# Get the number of CPU cores
|
# 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
|
# 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)
|
# Set the health delta to 10 (subtract 10 from the total of 100)
|
||||||
health_delta = 50
|
health_delta = 50
|
||||||
# Craft a message that can be used by the clients
|
# Craft a message that can be used by the clients
|
||||||
|
|
Loading…
Reference in New Issue