mirror of https://github.com/zulip/zulip.git
puppet: Factor out writing the rabbitmq consumer check state file into its own script
This temporarily breaks the rabbitmq consumer checks for the user_activity and notify_tornado queues because their state files were renamed to match their queue names. It will be fixed for staging in the next commit. (imported from commit a6aaa330a1134d8ddffe8f4959deb12b219f241a)
This commit is contained in:
parent
101a70a7ce
commit
6e54ca3045
|
@ -2,7 +2,7 @@ SHELL=/bin/bash
|
|||
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
||||
USER=root
|
||||
|
||||
* * * * * root /home/humbug/humbug-deployments/current/bots/check-rabbitmq-consumers --queue=notify_tornado &> /var/lib/nagios_state/check-rabbitmq-consumers-tornado-tmp; mv /var/lib/nagios_state/check-rabbitmq-consumers-tornado-tmp /var/lib/nagios_state/check-rabbitmq-consumers-tornado
|
||||
* * * * * root /home/humbug/humbug-deployments/current/bots/check-rabbitmq-consumers --queue=user_activity &> /var/lib/nagios_state/check-rabbitmq-consumers-useractivity-tmp; mv /var/lib/nagios_state/check-rabbitmq-consumers-useractivity-tmp /var/lib/nagios_state/check-rabbitmq-consumers-useractivity
|
||||
* * * * * root /home/humbug/humbug-deployments/current/bots/check-rabbitmq-consumers --queue=invites &> /var/lib/nagios_state/check-rabbitmq-consumers-invites-tmp; mv /var/lib/nagios_state/check-rabbitmq-consumers-invites-tmp /var/lib/nagios_state/check-rabbitmq-consumers-invites
|
||||
* * * * * root /home/humbug/humbug-deployments/current/bots/check-rabbitmq-consumers --queue=signups &> /var/lib/nagios_state/check-rabbitmq-consumers-signups-tmp; mv /var/lib/nagios_state/check-rabbitmq-consumers-signups-tmp /var/lib/nagios_state/check-rabbitmq-consumers-signups
|
||||
* * * * * root /home/humbug/humbug-deployments/current/tools/write-rabbitmq-consumers-state-file notify_tornado
|
||||
* * * * * root /home/humbug/humbug-deployments/current/tools/write-rabbitmq-consumers-state-file user_activity
|
||||
* * * * * root /home/humbug/humbug-deployments/current/tools/write-rabbitmq-consumers-state-file invites
|
||||
* * * * * root /home/humbug/humbug-deployments/current/tools/write-rabbitmq-consumers-state-file signups
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
#!/bin/bash -e
|
||||
|
||||
queue=$1
|
||||
|
||||
if [ -z "$queue" ]; then
|
||||
echo "Usage: $0 <queue-name>"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
ZULIP_DIR=/home/humbug/humbug-deployments/current
|
||||
STATE_DIR=/var/lib/nagios_state
|
||||
STATE_FILE=$STATE_DIR/check-rabbitmq-consumers-$queue
|
||||
|
||||
$ZULIP_DIR/bots/check-rabbitmq-consumers --queue=$queue &> ${STATE_FILE}-tmp;
|
||||
mv ${STATE_FILE}-tmp $STATE_FILE
|
Loading…
Reference in New Issue