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:
parent
bb206faee6
commit
8dda09085a
1 changed files with 8 additions and 1 deletions
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue