Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
check_send_receive_time: Print no output on success.
Alex Vandiver2bd60e8562bb
diff --git a/puppet/kandra/manifests/prod_app_frontend_once.pp b/puppet/kandra/manifests/prod_app_frontend_once.ppindex 6ae2469e5eb..e53750a1eee 100644--- a/puppet/kandra/manifests/prod_app_frontend_once.pp+++ b/puppet/kandra/manifests/prod_app_frontend_once.pp@@ -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':diff --git a/puppet/kandra/manifests/profile/staging_app_frontend.pp b/puppet/kandra/manifests/profile/staging_app_frontend.ppindex d9700f36c4e..78ebb8ffc5e 100644--- a/puppet/kandra/manifests/profile/staging_app_frontend.pp+++ b/puppet/kandra/manifests/profile/staging_app_frontend.pp@@ -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,}}diff --git a/puppet/zulip/files/nagios_plugins/zulip_app_frontend/check_send_receive_time b/puppet/zulip/files/nagios_plugins/zulip_app_frontend/check_send_receive_timeindex 50ef47f1cd4..e63e8d3c094 100755--- a/puppet/zulip/files/nagios_plugins/zulip_app_frontend/check_send_receive_time+++ b/puppet/zulip/files/nagios_plugins/zulip_app_frontend/check_send_receive_time@@ -64,7 +64,8 @@ def report(state: str, timestamp: Any = None, msg: Optional[str] = None) -> NoRewith 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])