Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

check_send_receive_time: Use machine.deploy_type to check "staging".

Alex Vandiverf42153f67021
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_time
index d47344e5a57..0562853bc4c 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
@@ -33,6 +33,7 @@ from django.conf import settings
from zerver.models.realms import get_realm
from zerver.models.users import get_system_bot
+from zproject.config import get_config
usage = """Usage: send-receive.py [options] [config]
@@ -88,7 +89,7 @@ def get_zulips() -> List[Dict[str, Any]]:
internal_realm_id = get_realm(settings.SYSTEM_BOT_REALM).id
if (
- "staging" in options.site
+ get_config("machine", "deploy_type") == "staging"
and settings.NAGIOS_STAGING_SEND_BOT is not None
and settings.NAGIOS_STAGING_RECEIVE_BOT is not None
):