fix
This commit is contained in:
parent
2ff284e09a
commit
b6149a7918
|
@ -31,7 +31,7 @@ def main(args):
|
||||||
check_timeout = check["attrs"]["check_timeout"] or args.default_timeout
|
check_timeout = check["attrs"]["check_timeout"] or args.default_timeout
|
||||||
|
|
||||||
# If the check is overdue.
|
# If the check is overdue.
|
||||||
if current_time - last_check_time > check_interval + check_timeout:
|
if current_time - last_check_time > check_interval + check_timeout and check['attrs']['state'] != 3:
|
||||||
headers = {'Accept': 'application/json', 'Content-Type': 'application/json'}
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json'}
|
||||||
next_check_time = last_check_time + check_interval + check_timeout
|
next_check_time = last_check_time + check_interval + check_timeout
|
||||||
check_filter = f'host.name=="{check["attrs"]["host_name"]}" && service.name=="{check["attrs"]["name"]}"'
|
check_filter = f'host.name=="{check["attrs"]["host_name"]}" && service.name=="{check["attrs"]["name"]}"'
|
||||||
|
|
Loading…
Reference in New Issue