From 9876f1b14e2a83fff9a9002f2b5985966900d83d Mon Sep 17 00:00:00 2001 From: Puneeth Chaganti Date: Mon, 8 Apr 2019 10:21:59 +0530 Subject: [PATCH] check_rabbitmq_queue: Fix the time period when we ignore long queues. The commit 87d180965709a47039d29f226646f739ebcdbbc6 changed the time when digests are sent by 3 hours to account for moving from the US East Coast to the West Coast, but didn't change the time period exception in the `check-rabbitmq-queue` script. Closes #5415 --- puppet/zulip/files/cron.d/send-digest-emails | 2 ++ scripts/nagios/check-rabbitmq-queue | 10 +++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/puppet/zulip/files/cron.d/send-digest-emails b/puppet/zulip/files/cron.d/send-digest-emails index a3cfe373d1..9f346d58c2 100644 --- a/puppet/zulip/files/cron.d/send-digest-emails +++ b/puppet/zulip/files/cron.d/send-digest-emails @@ -1,4 +1,6 @@ MAILTO=root # Send digest emails once a day. Time is in UTC. +# NOTE: If the time of this cron job is changed, fix the ignore long queue time +# period in `check-rabbitmq-queue`. 0 18 * * * zulip cd /home/zulip/deployments/current && ./manage.py enqueue_digest_emails diff --git a/scripts/nagios/check-rabbitmq-queue b/scripts/nagios/check-rabbitmq-queue index 19188e4803..8c71b441ee 100755 --- a/scripts/nagios/check-rabbitmq-queue +++ b/scripts/nagios/check-rabbitmq-queue @@ -52,12 +52,12 @@ warn_about = ", ".join(warn_queues) now = int(time.time()) now_struct = time.gmtime(now) -# While we are sending digest emails, at 11am each weekday, the mail -# queues can get backed up; don't alert on those. Additionally, -# certain workers (slow_queries and digest_emails) have a polling -# algorithm that means it's normal for them to accumulate items. +# While we are sending digest emails, at 1800 hrs (UTC) each weekday, the mail +# queues can get backed up; don't alert on those. Additionally, certain workers +# (slow_queries and digest_emails) have a polling algorithm that means it's +# normal for them to accumulate items. if not set(warn_queues) - set(("missedmessage_emails", "digest_emails", "slow_queries")) and \ - now_struct.tm_hour == 15 and now_struct.tm_min < 25: + now_struct.tm_hour == 18 and now_struct.tm_min < 25: status = 0 print("%s|%s|%s|processing digests, not alerting on elevated mail queues" % ( now, status, states[status]))