From b6149a79181949a7f9752bbaffd3ea272a34e2bf Mon Sep 17 00:00:00 2001 From: Cyberes Date: Wed, 22 Nov 2023 23:39:33 -0700 Subject: [PATCH] fix --- fail-overdue.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fail-overdue.py b/fail-overdue.py index 6642c77..490862e 100644 --- a/fail-overdue.py +++ b/fail-overdue.py @@ -31,7 +31,7 @@ def main(args): check_timeout = check["attrs"]["check_timeout"] or args.default_timeout # 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'} next_check_time = last_check_time + check_interval + check_timeout check_filter = f'host.name=="{check["attrs"]["host_name"]}" && service.name=="{check["attrs"]["name"]}"'