mirror of https://github.com/zulip/zulip.git
check_send_receive_time: Print no output on success.
This commit is contained in:
parent
294fd914e1
commit
2bd60e8562
|
@ -21,7 +21,7 @@ class kandra::prod_app_frontend_once {
|
|||
zulip::cron { 'check_send_receive_time':
|
||||
hour => '*',
|
||||
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,
|
||||
}
|
||||
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':
|
||||
hour => '*',
|
||||
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,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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:
|
||||
f.write(f"{now}|{states[state]}|{state}|{msg}\n")
|
||||
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])
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue