mirror of
https://github.com/cmur2/munin-rabbitmq.git
synced 2024-11-14 08:56:18 +01:00
Removed the sudo call to allow munin-node to configure the user and fixed a parsing error when a queue has a period in the name
This commit is contained in:
parent
d92adb6296
commit
7d6ba872e3
@ -61,4 +61,4 @@ fi
|
||||
# real work - i.e. display the data. Almost always this will be
|
||||
# "value" subfield for every data field.
|
||||
|
||||
echo "connections.value $(sudo rabbitmqctl list_connections | grep -v "^Listing" | grep -v "done.$" | wc -l)"
|
||||
echo "connections.value $(rabbitmqctl list_connections | grep -v "^Listing" | grep -v "done.$" | wc -l)"
|
||||
|
@ -29,9 +29,9 @@ fi
|
||||
# graphs should look.
|
||||
|
||||
VHOST=${vhost:-"/"}
|
||||
QUEUES=$(sudo rabbitmqctl list_queues -p $VHOST name | \
|
||||
QUEUES=$(rabbitmqctl list_queues -p $VHOST name | \
|
||||
grep -v '^Listing' | \
|
||||
grep -v 'done\.$')
|
||||
grep -v 'done\.$' | sed -e 's/\./_/g' )
|
||||
|
||||
if [ "$1" = "config" ]; then
|
||||
QUEUE_WARN=${queue_warn:-100}
|
||||
@ -69,6 +69,6 @@ fi
|
||||
# real work - i.e. display the data. Almost always this will be
|
||||
# "value" subfield for every data field.
|
||||
|
||||
sudo rabbitmqctl list_queues -p $VHOST name consumers| \
|
||||
rabbitmqctl list_queues -p $VHOST name consumers| \
|
||||
grep -v "^Listing" | grep -v "done.$" | \
|
||||
perl -nle'($q, $s) = split; $q =~ s/\./_/g; print("$q.value $s")'
|
||||
|
@ -29,9 +29,9 @@ fi
|
||||
# graphs should look.
|
||||
|
||||
VHOST=${vhost:-"/"}
|
||||
QUEUES=$(sudo rabbitmqctl list_queues -p $VHOST name | \
|
||||
QUEUES=$(rabbitmqctl list_queues -p $VHOST name | \
|
||||
grep -v '^Listing' | \
|
||||
grep -v 'done\.$')
|
||||
grep -v 'done\.$' | sed -e 's/\./_/g')
|
||||
|
||||
if [ "$1" = "config" ]; then
|
||||
QUEUE_WARN=${queue_warn:-10000}
|
||||
@ -69,6 +69,6 @@ fi
|
||||
# real work - i.e. display the data. Almost always this will be
|
||||
# "value" subfield for every data field.
|
||||
|
||||
sudo rabbitmqctl list_queues -p $VHOST | \
|
||||
rabbitmqctl list_queues -p $VHOST | \
|
||||
grep -v "^Listing" | grep -v "done.$" | \
|
||||
perl -nle'($q, $s) = split; $q =~ s/\./_/g; print("$q.value $s")'
|
||||
|
@ -29,7 +29,7 @@ fi
|
||||
# graphs should look.
|
||||
|
||||
VHOST=${vhost:-"/"}
|
||||
QUEUES=$(sudo rabbitmqctl list_queues -p $VHOST name | \
|
||||
QUEUES=$(rabbitmqctl list_queues -p $VHOST name | \
|
||||
grep -v '^Listing' | \
|
||||
grep -v 'done\.$')
|
||||
|
||||
@ -69,6 +69,6 @@ fi
|
||||
# real work - i.e. display the data. Almost always this will be
|
||||
# "value" subfield for every data field.
|
||||
|
||||
sudo rabbitmqctl list_queues -p $VHOST name messages_unacknowledged | \
|
||||
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")'
|
||||
|
@ -29,7 +29,7 @@ fi
|
||||
# graphs should look.
|
||||
|
||||
VHOST=${vhost:-"/"}
|
||||
QUEUES=$(sudo rabbitmqctl list_queues -p $VHOST name | \
|
||||
QUEUES=$(rabbitmqctl list_queues -p $VHOST name | \
|
||||
grep -v '^Listing' | \
|
||||
grep -v 'done\.$')
|
||||
|
||||
@ -69,6 +69,6 @@ fi
|
||||
# real work - i.e. display the data. Almost always this will be
|
||||
# "value" subfield for every data field.
|
||||
|
||||
sudo rabbitmqctl list_queues -p $VHOST name messages_uncommitted | \
|
||||
rabbitmqctl list_queues -p $VHOST name messages_uncommitted | \
|
||||
grep -v "^Listing" | grep -v "done.$" | \
|
||||
perl -nle'($q, $s) = split; $q =~ s/\./_/g; print("$q.value $s")'
|
||||
|
@ -29,9 +29,9 @@ fi
|
||||
# graphs should look.
|
||||
|
||||
VHOST=${vhost:-"/"}
|
||||
QUEUES=$(sudo rabbitmqctl list_queues -p $VHOST name | \
|
||||
QUEUES=$(rabbitmqctl list_queues -p $VHOST name | \
|
||||
grep -v '^Listing' | \
|
||||
grep -v 'done\.$')
|
||||
grep -v 'done\.$' | sed -e 's/\./_/g')
|
||||
|
||||
if [ "$1" = "config" ]; then
|
||||
QUEUE_WARN=${queue_warn:-10000}
|
||||
@ -69,6 +69,6 @@ fi
|
||||
# real work - i.e. display the data. Almost always this will be
|
||||
# "value" subfield for every data field.
|
||||
|
||||
sudo rabbitmqctl list_queues -p $VHOST name memory | \
|
||||
rabbitmqctl list_queues -p $VHOST name memory | \
|
||||
grep -v "^Listing" | grep -v "done.$" | \
|
||||
perl -nle'($q, $s) = split; $q =~ s/\./_/g; print("$q.value $s")'
|
||||
|
Loading…
Reference in New Issue
Block a user