fix
This commit is contained in:
parent
227e1f8c75
commit
73ad7b40d6
|
@ -111,6 +111,8 @@ def main(args):
|
||||||
if len(lines) and 'data stale' in lines[0].lower():
|
if len(lines) and 'data stale' in lines[0].lower():
|
||||||
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:
|
||||||
|
print_icinga2_check_status(f'Failed to get UPS status: {e} - "{e.output}"', nagios.STATE_UNKNOWN)
|
||||||
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}', nagios.STATE_UNKNOWN)
|
||||||
sys.exit(nagios.STATE_UNKNOWN)
|
sys.exit(nagios.STATE_UNKNOWN)
|
||||||
|
|
Loading…
Reference in New Issue