This commit is contained in:
Cyberes 2024-01-14 13:10:15 -07:00
parent 227e1f8c75
commit 73ad7b40d6
1 changed files with 3 additions and 1 deletions

View File

@ -112,7 +112,9 @@ def main(args):
print_icinga2_check_status(f'Failed to get UPS status: data stale', nagios.STATE_CRIT) print_icinga2_check_status(f'Failed to get UPS status: data stale', nagios.STATE_CRIT)
sys.exit(nagios.STATE_CRIT) sys.exit(nagios.STATE_CRIT)
else: 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) sys.exit(nagios.STATE_UNKNOWN)
# Remove unwanted stats. # Remove unwanted stats.