fix preformace data of lmsensors
This commit is contained in:
4
check_lmsensors.py
Normal file → Executable file
4
check_lmsensors.py
Normal file → Executable file
@@ -30,7 +30,7 @@ try:
|
||||
def format_dict(d):
|
||||
result = ""
|
||||
for key, value in d.items():
|
||||
result += f"'{key}'={value}°C;{threshold_warning};{threshold_critical}\n"
|
||||
result += f"|'{key}'={value}°C;{threshold_warning};{threshold_critical}\n"
|
||||
return result
|
||||
|
||||
def get_data():
|
||||
@@ -56,7 +56,7 @@ try:
|
||||
elif exit_code == 1: message = "SENSORS WARNING"
|
||||
elif exit_code == 2: message = "SENSORS CRITICAL"
|
||||
else: message = "SOMETHINGS WRONG"
|
||||
message += "|"+format_dict(data)
|
||||
message += format_dict(data)
|
||||
|
||||
finally:
|
||||
print(message)
|
||||
|
||||
Reference in New Issue
Block a user