This commit is contained in:
Cyberes 2024-03-07 14:11:08 -07:00
parent efc3c010f9
commit a7ad8635e2
1 changed files with 1 additions and 3 deletions

View File

@ -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')