Skip to content
Snippets Groups Projects
Commit 40bff947 authored by root's avatar root
Browse files

check_ups_eaton temperature checks ignored if value is missing.

parent 12628f3c
No related branches found
No related tags found
No related merge requests found
......@@ -171,13 +171,14 @@ OUTPUT_TEXT += " Load: " + str(xupsOutputLoad) + "%"
OUTPUT_TEXT += " Runtime: " + str(xupsBatTimeRemaining / 60) + "m"
OUTPUT_TEXT += " Batteries Last Replaced: " + xupsBatteryLastReplacedDate
OUTPUT_TEXT += " Temperature: " + str(envTemperature) + "C"
if (envTemperature >= int(options.tempCrit)):
if (EXIT_CODE < STATE_CRITICAL):
EXIT_CODE = STATE_CRITICAL
elif (envTemperature >= int(options.tempWarn)):
if (EXIT_CODE < STATE_WARNING):
EXIT_CODE = STATE_WARNING
if temperatureOutput:
OUTPUT_TEXT += " Temperature: " + str(envTemperature) + "C"
if (envTemperature >= int(options.tempCrit)):
if (EXIT_CODE < STATE_CRITICAL):
EXIT_CODE = STATE_CRITICAL
elif (envTemperature >= int(options.tempWarn)):
if (EXIT_CODE < STATE_WARNING):
EXIT_CODE = STATE_WARNING
# Perfdata
PERFDATA += " xupsInputFrequency=" + str(xupsInputFrequency)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment