1
0
mirror of https://github.com/cmur2/munin-rabbitmq.git synced 2024-12-22 12:54:27 +01:00

Handle queues with periods and dashes in the name, in display and config

This commit is contained in:
Adam Lowry 2010-03-31 16:44:18 -07:00
parent d92adb6296
commit d634e46e75
5 changed files with 10 additions and 10 deletions

View File

@ -31,7 +31,7 @@ fi
VHOST=${vhost:-"/"} VHOST=${vhost:-"/"}
QUEUES=$(sudo rabbitmqctl list_queues -p $VHOST name | \ QUEUES=$(sudo rabbitmqctl list_queues -p $VHOST name | \
grep -v '^Listing' | \ grep -v '^Listing' | \
grep -v 'done\.$') grep -v 'done\.$' | sed -e 's/[.-]/_/g' )
if [ "$1" = "config" ]; then if [ "$1" = "config" ]; then
QUEUE_WARN=${queue_warn:-100} QUEUE_WARN=${queue_warn:-100}
@ -71,4 +71,4 @@ fi
sudo rabbitmqctl list_queues -p $VHOST name consumers| \ sudo rabbitmqctl list_queues -p $VHOST name consumers| \
grep -v "^Listing" | grep -v "done.$" | \ grep -v "^Listing" | grep -v "done.$" | \
perl -nle'($q, $s) = split; $q =~ s/\./_/g; print("$q.value $s")' perl -nle'($q, $s) = split; $q =~ s/[.-]/_/g; print("$q.value $s")'

View File

@ -31,7 +31,7 @@ fi
VHOST=${vhost:-"/"} VHOST=${vhost:-"/"}
QUEUES=$(sudo rabbitmqctl list_queues -p $VHOST name | \ QUEUES=$(sudo rabbitmqctl list_queues -p $VHOST name | \
grep -v '^Listing' | \ grep -v '^Listing' | \
grep -v 'done\.$') grep -v 'done\.$' | sed -e 's/[.-]/_/g' )
if [ "$1" = "config" ]; then if [ "$1" = "config" ]; then
QUEUE_WARN=${queue_warn:-10000} QUEUE_WARN=${queue_warn:-10000}
@ -71,4 +71,4 @@ fi
sudo rabbitmqctl list_queues -p $VHOST | \ sudo rabbitmqctl list_queues -p $VHOST | \
grep -v "^Listing" | grep -v "done.$" | \ grep -v "^Listing" | grep -v "done.$" | \
perl -nle'($q, $s) = split; $q =~ s/\./_/g; print("$q.value $s")' perl -nle'($q, $s) = split; $q =~ s/[.-]/_/g; print("$q.value $s")'

View File

@ -31,7 +31,7 @@ fi
VHOST=${vhost:-"/"} VHOST=${vhost:-"/"}
QUEUES=$(sudo rabbitmqctl list_queues -p $VHOST name | \ QUEUES=$(sudo rabbitmqctl list_queues -p $VHOST name | \
grep -v '^Listing' | \ grep -v '^Listing' | \
grep -v 'done\.$') grep -v 'done\.$' | sed -e 's/[.-]/_/g' )
if [ "$1" = "config" ]; then if [ "$1" = "config" ]; then
QUEUE_WARN=${queue_warn:-10000} QUEUE_WARN=${queue_warn:-10000}
@ -71,4 +71,4 @@ fi
sudo rabbitmqctl list_queues -p $VHOST name messages_unacknowledged | \ sudo rabbitmqctl list_queues -p $VHOST name messages_unacknowledged | \
grep -v "^Listing" | grep -v "done.$" | \ grep -v "^Listing" | grep -v "done.$" | \
perl -nle'($q, $s) = split; $q =~ s/\./_/g; print("$q.value $s")' perl -nle'($q, $s) = split; $q =~ s/[.-]/_/g; print("$q.value $s")'

View File

@ -31,7 +31,7 @@ fi
VHOST=${vhost:-"/"} VHOST=${vhost:-"/"}
QUEUES=$(sudo rabbitmqctl list_queues -p $VHOST name | \ QUEUES=$(sudo rabbitmqctl list_queues -p $VHOST name | \
grep -v '^Listing' | \ grep -v '^Listing' | \
grep -v 'done\.$') grep -v 'done\.$' | sed -e 's/[.-]/_/g' )
if [ "$1" = "config" ]; then if [ "$1" = "config" ]; then
QUEUE_WARN=${queue_warn:-10000} QUEUE_WARN=${queue_warn:-10000}
@ -71,4 +71,4 @@ fi
sudo rabbitmqctl list_queues -p $VHOST name messages_uncommitted | \ sudo rabbitmqctl list_queues -p $VHOST name messages_uncommitted | \
grep -v "^Listing" | grep -v "done.$" | \ grep -v "^Listing" | grep -v "done.$" | \
perl -nle'($q, $s) = split; $q =~ s/\./_/g; print("$q.value $s")' perl -nle'($q, $s) = split; $q =~ s/[.-]/_/g; print("$q.value $s")'

View File

@ -31,7 +31,7 @@ fi
VHOST=${vhost:-"/"} VHOST=${vhost:-"/"}
QUEUES=$(sudo rabbitmqctl list_queues -p $VHOST name | \ QUEUES=$(sudo rabbitmqctl list_queues -p $VHOST name | \
grep -v '^Listing' | \ grep -v '^Listing' | \
grep -v 'done\.$') grep -v 'done\.$' | sed -e 's/[.-]/_/g' )
if [ "$1" = "config" ]; then if [ "$1" = "config" ]; then
QUEUE_WARN=${queue_warn:-10000} QUEUE_WARN=${queue_warn:-10000}
@ -71,4 +71,4 @@ fi
sudo rabbitmqctl list_queues -p $VHOST name memory | \ sudo rabbitmqctl list_queues -p $VHOST name memory | \
grep -v "^Listing" | grep -v "done.$" | \ grep -v "^Listing" | grep -v "done.$" | \
perl -nle'($q, $s) = split; $q =~ s/\./_/g; print("$q.value $s")' perl -nle'($q, $s) = split; $q =~ s/[.-]/_/g; print("$q.value $s")'