From 73ad7b40d6cce8e4091bfbe78a25873627742293 Mon Sep 17 00:00:00 2001 From: Cyberes Date: Sun, 14 Jan 2024 13:10:15 -0700 Subject: [PATCH] fix --- check_nut.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/check_nut.py b/check_nut.py index 442f93b..2ec4b07 100644 --- a/check_nut.py +++ b/check_nut.py @@ -112,7 +112,9 @@ def main(args): print_icinga2_check_status(f'Failed to get UPS status: data stale', nagios.STATE_CRIT) sys.exit(nagios.STATE_CRIT) else: - print_icinga2_check_status(f'Failed to get UPS status: {e}', nagios.STATE_UNKNOWN) + print_icinga2_check_status(f'Failed to get UPS status: {e} - "{e.output}"', nagios.STATE_UNKNOWN) + else: + print_icinga2_check_status(f'Failed to get UPS status: {e}', nagios.STATE_UNKNOWN) sys.exit(nagios.STATE_UNKNOWN) # Remove unwanted stats.