1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-21 10:39:53 +00:00

Handle missing rabbitmqctl

This commit is contained in:
Stig Sandbeck Mathisen 2014-10-05 20:14:14 +02:00
parent bb206faee6
commit 8dda09085a

View file

@ -89,4 +89,11 @@ fi
# real work - i.e. display the data. Almost always this will be
# "value" subfield for every data field.
echo "connections.value $(HOME=$HOME rabbitmqctl list_connections | grep -v "^Listing" | grep -v "done.$" | wc -l)"
if hash rabbitmqctl >/dev/null 2>&1; then
connections=$(HOME=/tmp rabbitmqctl list_connections state | grep -c running)
else
echo "$0: Could not run rabbitmqctl" >&2
connections=U
fi
printf "connections.value %s\n" "$connections"