diff --git a/rabbitmq-connections b/rabbitmq-connections index 72a1039..a38c083 100755 --- a/rabbitmq-connections +++ b/rabbitmq-connections @@ -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)" diff --git a/rabbitmq-consumers b/rabbitmq-consumers index 52ee6fe..f190192 100755 --- a/rabbitmq-consumers +++ b/rabbitmq-consumers @@ -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")' diff --git a/rabbitmq-messages b/rabbitmq-messages index 95a6f76..f951eeb 100755 --- a/rabbitmq-messages +++ b/rabbitmq-messages @@ -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")' diff --git a/rabbitmq-messages_unacknowledged b/rabbitmq-messages_unacknowledged index c6ec429..5d8b637 100755 --- a/rabbitmq-messages_unacknowledged +++ b/rabbitmq-messages_unacknowledged @@ -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")' diff --git a/rabbitmq-messages_uncommitted b/rabbitmq-messages_uncommitted index 49b1adb..d6d6c9e 100755 --- a/rabbitmq-messages_uncommitted +++ b/rabbitmq-messages_uncommitted @@ -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")' diff --git a/rabbitmq-queue_memory b/rabbitmq-queue_memory index 1cb300e..aa75a4c 100755 --- a/rabbitmq-queue_memory +++ b/rabbitmq-queue_memory @@ -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")'