mirror of https://github.com/zulip/zulip.git
queue: Monitor user_activity queue, now that it has a consumer.
Since this was using repead individual get() calls previously, it
could not be monitored for having a consumer. Add it in, by marking
it of queue type "consumer" (the default), and adding Nagios lines for
it.
Also adjust missedmessage_emails to be monitored; it stopped using
LoopQueueProcessingWorker in 5cec566cb9
, but was never added back
into the set of monitored consumers.
This commit is contained in:
parent
f9358d5330
commit
45c9c3cc30
|
@ -393,10 +393,27 @@ define service {
|
|||
contact_groups admins
|
||||
}
|
||||
|
||||
# The following queue workers batch-process events and thus can't be
|
||||
# monitored by checking for running consumers:
|
||||
#
|
||||
# user_activity, missedmessage_emails
|
||||
define service {
|
||||
use generic-service
|
||||
service_description Check rabbitmq missedmessage email consumers
|
||||
check_command check_rabbitmq_consumers!missedmessage_email
|
||||
# Workaround weird checks 40s after first error causing alerts
|
||||
# from a single failure because cron hasn't run again yet
|
||||
max_check_attempts 3
|
||||
hostgroup_name frontends
|
||||
contact_groups admins
|
||||
}
|
||||
|
||||
define service {
|
||||
use generic-service
|
||||
service_description Check rabbitmq user activity consumers
|
||||
check_command check_rabbitmq_consumers!user_activity
|
||||
# Workaround weird checks 40s after first error causing alerts
|
||||
# from a single failure because cron hasn't run again yet
|
||||
max_check_attempts 3
|
||||
hostgroup_name frontends
|
||||
contact_groups admins
|
||||
}
|
||||
|
||||
define service {
|
||||
use generic-service
|
||||
|
|
|
@ -434,7 +434,7 @@ class ConfirmationEmailWorker(QueueProcessingWorker):
|
|||
context=context,
|
||||
delay=datetime.timedelta(days=settings.INVITATION_LINK_VALIDITY_DAYS - 2))
|
||||
|
||||
@assign_queue('user_activity', queue_type="loop")
|
||||
@assign_queue('user_activity')
|
||||
class UserActivityWorker(LoopQueueProcessingWorker):
|
||||
"""The UserActivity queue is perhaps our highest-traffic queue, and
|
||||
requires some care to ensure it performs adequately.
|
||||
|
@ -515,7 +515,7 @@ class UserPresenceWorker(QueueProcessingWorker):
|
|||
status = event["status"]
|
||||
do_update_user_presence(user_profile, client, log_time, status)
|
||||
|
||||
@assign_queue('missedmessage_emails', queue_type="loop")
|
||||
@assign_queue('missedmessage_emails')
|
||||
class MissedMessageWorker(QueueProcessingWorker):
|
||||
# Aggregate all messages received over the last BATCH_DURATION
|
||||
# seconds to let someone finish sending a batch of messages and/or
|
||||
|
|
Loading…
Reference in New Issue