2016-01-12 13:08:43 +01:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -e
|
2013-09-23 20:22:15 +02:00
|
|
|
|
|
|
|
queue=$1
|
|
|
|
|
|
|
|
if [ -z "$queue" ]; then
|
|
|
|
echo "Usage: $0 <queue-name>"
|
|
|
|
exit 2
|
|
|
|
fi
|
|
|
|
|
2013-10-04 19:19:57 +02:00
|
|
|
ZULIP_DIR=/home/zulip/deployments/current
|
2013-09-23 20:22:15 +02:00
|
|
|
STATE_DIR=/var/lib/nagios_state
|
|
|
|
STATE_FILE=$STATE_DIR/check-rabbitmq-consumers-$queue
|
|
|
|
|
2016-05-08 03:58:57 +02:00
|
|
|
"$ZULIP_DIR/scripts/nagios/check-rabbitmq-consumers" "--queue=$queue" &> "${STATE_FILE}-tmp";
|
2015-09-26 03:47:30 +02:00
|
|
|
mv "${STATE_FILE}-tmp" "$STATE_FILE"
|