From a7ad8635e219404ad26689a506c3befb5938df83 Mon Sep 17 00:00:00 2001 From: Cyberes Date: Thu, 7 Mar 2024 14:11:08 -0700 Subject: [PATCH] oops --- check_systemd_timer.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/check_systemd_timer.py b/check_systemd_timer.py index 287a709..f8ff3f1 100755 --- a/check_systemd_timer.py +++ b/check_systemd_timer.py @@ -75,10 +75,8 @@ def check_timer(timer_name): if err: quit_check(f'{err}', nagios.STATE_UNKNOWN) - print(next_elapse) - if next_elapse['left'] < 0 or next_elapse['passed'] < 0: - quit_check(f'Timer is negative? Left: {next_elapse["left"]}. Passed: {next_elapse["passed"]}', nagios.STATE_UNKNOWN) + quit_check(f'Timer is negative??? Left: {next_elapse["left"]}. Passed: {next_elapse["passed"]}', nagios.STATE_UNKNOWN) local_tz = tz.tzlocal() next_elapse_str = next_elapse['next'].replace(tzinfo=local_tz).strftime('%a %Y-%m-%d %H:%M %Z')