mirror of
https://github.com/cmur2/munin-rabbitmq.git
synced 2025-06-15 16:30:24 +02:00
Adds a HOME env. variable when calling to rabbitmqctl
This commit is contained in:
@ -28,8 +28,9 @@ fi
|
||||
# If run with the "config"-parameter, give out information on how the
|
||||
# graphs should look.
|
||||
|
||||
HOME=/tmp/
|
||||
VHOST=${vhost:-"/"}
|
||||
QUEUES=$(rabbitmqctl list_queues -p $VHOST name | \
|
||||
QUEUES=$(HOME=$HOME rabbitmqctl list_queues -p $VHOST name | \
|
||||
grep -v '^Listing' | \
|
||||
grep -v 'done\.$' | sed -e 's/[.-=]/_/g' )
|
||||
|
||||
@ -69,6 +70,6 @@ fi
|
||||
# real work - i.e. display the data. Almost always this will be
|
||||
# "value" subfield for every data field.
|
||||
|
||||
rabbitmqctl list_queues -p $VHOST name messages_unacknowledged | \
|
||||
HOME=$HOME rabbitmqctl list_queues -p $VHOST name messages_unacknowledged | \
|
||||
grep -v "^Listing" | grep -v "done.$" | \
|
||||
perl -nle'($q, $s) = split; $q =~ s/[.-=]/_/g; print("$q.value $s")'
|
||||
|
Reference in New Issue
Block a user