minor
This commit is contained in:
parent
683dba8519
commit
c2969a1094
|
@ -69,7 +69,7 @@ async def main(args):
|
|||
return_msg = f'message send time was {elapsed_time} seconds'
|
||||
else:
|
||||
return_code = nagios.STATE_OK
|
||||
return_msg = 'message send successful'
|
||||
return_msg = f'message send successful, took {elapsed_time} seconds'
|
||||
|
||||
print_icinga2_check_status(return_msg, return_code, perfdata=perfdata)
|
||||
sys.exit(return_code)
|
||||
|
@ -87,4 +87,9 @@ if __name__ == "__main__":
|
|||
parser.add_argument('--critical', type=int, default=30, help='Critical level for message send time.')
|
||||
args = parser.parse_args()
|
||||
|
||||
try:
|
||||
asyncio.run(main(args))
|
||||
except Exception as e:
|
||||
print(f"UNKNOWN: exception\n{e}")
|
||||
print(traceback.format_exc())
|
||||
sys.exit(nagios.UNKNOWN)
|
||||
|
|
Loading…
Reference in New Issue