1
0

fix preformace data of lmsensors

This commit is contained in:
2020-02-20 16:16:04 +01:00
parent 146a13c79e
commit 9de1476bf7

4
check_lmsensors.py Normal file → Executable file
View 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)