mirror of
https://github.com/zulip/zulip.git
synced 2025-10-30 11:33:51 +00:00
Move write-rabbitmq-consumers-state-file to scripts/nagios/.
This commit is contained in:
16
scripts/nagios/write-rabbitmq-consumers-state-file
Executable file
16
scripts/nagios/write-rabbitmq-consumers-state-file
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
queue=$1
|
||||
|
||||
if [ -z "$queue" ]; then
|
||||
echo "Usage: $0 <queue-name>"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
ZULIP_DIR=/home/zulip/deployments/current
|
||||
STATE_DIR=/var/lib/nagios_state
|
||||
STATE_FILE=$STATE_DIR/check-rabbitmq-consumers-$queue
|
||||
|
||||
"$ZULIP_DIR/scripts/nagios/check-rabbitmq-consumers" "--queue=$queue" &> "${STATE_FILE}-tmp";
|
||||
mv "${STATE_FILE}-tmp" "$STATE_FILE"
|
||||
Reference in New Issue
Block a user