mirror of
https://github.com/zulip/zulip.git
synced 2025-10-24 00:23:49 +00:00
check_send_receive_time: Print no output on success.
This commit is contained in:
committed by
Tim Abbott
parent
294fd914e1
commit
2bd60e8562
@@ -21,7 +21,7 @@ class kandra::prod_app_frontend_once {
|
|||||||
zulip::cron { 'check_send_receive_time':
|
zulip::cron { 'check_send_receive_time':
|
||||||
hour => '*',
|
hour => '*',
|
||||||
minute => '*',
|
minute => '*',
|
||||||
command => '/usr/lib/nagios/plugins/zulip_app_frontend/check_send_receive_time --site=https://$(/home/zulip/deployments/current/scripts/get-django-setting NAGIOS_BOT_HOST) >/dev/null',
|
command => '/usr/lib/nagios/plugins/zulip_app_frontend/check_send_receive_time --site=https://$(/home/zulip/deployments/current/scripts/get-django-setting NAGIOS_BOT_HOST)',
|
||||||
use_proxy => false,
|
use_proxy => false,
|
||||||
}
|
}
|
||||||
zulip::cron { 'check_user_zephyr_mirror_liveness':
|
zulip::cron { 'check_user_zephyr_mirror_liveness':
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ class kandra::profile::staging_app_frontend inherits kandra::profile::base {
|
|||||||
zulip::cron { 'check_send_receive_time':
|
zulip::cron { 'check_send_receive_time':
|
||||||
hour => '*',
|
hour => '*',
|
||||||
minute => '*',
|
minute => '*',
|
||||||
command => '/usr/lib/nagios/plugins/zulip_app_frontend/check_send_receive_time --site=https://$(/home/zulip/deployments/current/scripts/get-django-setting NAGIOS_BOT_HOST) >/dev/null',
|
command => '/usr/lib/nagios/plugins/zulip_app_frontend/check_send_receive_time --site=https://$(/home/zulip/deployments/current/scripts/get-django-setting NAGIOS_BOT_HOST)',
|
||||||
use_proxy => false,
|
use_proxy => false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,7 +64,8 @@ def report(state: str, timestamp: Any = None, msg: Optional[str] = None) -> NoRe
|
|||||||
with open(state_file_path + ".tmp", "w") as f:
|
with open(state_file_path + ".tmp", "w") as f:
|
||||||
f.write(f"{now}|{states[state]}|{state}|{msg}\n")
|
f.write(f"{now}|{states[state]}|{state}|{msg}\n")
|
||||||
os.rename(state_file_path + ".tmp", state_file_path)
|
os.rename(state_file_path + ".tmp", state_file_path)
|
||||||
print(f"{state}: {msg}")
|
if states[state] > 0:
|
||||||
|
print(f"{state}: {msg}")
|
||||||
sys.exit(states[state])
|
sys.exit(states[state])
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user