munin_plugins: Fix shellcheck warnings.

In puppet/zulip_ops/files/munin-plugins/rabbitmq_connections line 66:
echo "connections.value $(HOME=$HOME rabbitmqctl list_connections | grep -v "^Listing" | grep -v "done.$" | wc -l)"
                                                                                         ^-- SC2126: Consider using grep -c instead of grep|wc -l.

In puppet/zulip_ops/files/munin-plugins/rabbitmq_consumers line 32:
VHOST=${vhost:-"/"}
^-- SC2034: VHOST appears unused. Verify use (or export if used externally).

In puppet/zulip_ops/files/munin-plugins/rabbitmq_messages line 32:
VHOST=${vhost:-"/"}
^-- SC2034: VHOST appears unused. Verify use (or export if used externally).

In puppet/zulip_ops/files/munin-plugins/rabbitmq_messages_unacknowledged line 32:
VHOST=${vhost:-"/"}
^-- SC2034: VHOST appears unused. Verify use (or export if used externally).

In puppet/zulip_ops/files/munin-plugins/rabbitmq_messages_uncommitted line 32:
VHOST=${vhost:-"/"}
^-- SC2034: VHOST appears unused. Verify use (or export if used externally).

In puppet/zulip_ops/files/munin-plugins/rabbitmq_queue_memory line 32:
VHOST=${vhost:-"/"}
^-- SC2034: VHOST appears unused. Verify use (or export if used externally).

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
This commit is contained in:
Anders Kaseorg
2018-08-03 00:14:45 +00:00
committed by Tim Abbott
parent 16ed5d5e79
commit 5a0fecc2d5
6 changed files with 1 additions and 11 deletions

View File

@@ -63,4 +63,4 @@ 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)"
echo "connections.value $(HOME=$HOME rabbitmqctl list_connections | grep -v "^Listing" | grep -cv "done.$")"

View File

@@ -5,7 +5,6 @@
# Usage: Link or copy into /etc/munin/node.d/
#
# Parameters
# env.vhost <AMQ virtual host>
# env.queue_warn <warning queuesize>
# env.queue_crit <critical queuesize>
#
@@ -29,7 +28,6 @@ fi
# graphs should look.
HOME=/tmp/
VHOST=${vhost:-"/"}
QUEUES=$(HOME=$HOME rabbitmqctl list_queues name | \
grep -v '^Listing' | \
grep -v 'done\.$' | sed -e 's/[.=-]/_/g' )

View File

@@ -5,7 +5,6 @@
# Usage: Link or copy into /etc/munin/node.d/
#
# Parameters
# env.vhost <AMQ virtual host>
# env.queue_warn <warning queuesize>
# env.queue_crit <critical queuesize>
#
@@ -29,7 +28,6 @@ fi
# graphs should look.
HOME=/tmp/
VHOST=${vhost:-"/"}
QUEUES=$(HOME=$HOME rabbitmqctl list_queues name | \
grep -v '^Listing' | \
grep -v 'done\.$' | sed -e 's/[.=-]/_/g' )

View File

@@ -5,7 +5,6 @@
# Usage: Link or copy into /etc/munin/node.d/
#
# Parameters
# env.vhost <AMQ virtual host>
# env.queue_warn <warning queuesize>
# env.queue_crit <critical queuesize>
#
@@ -29,7 +28,6 @@ fi
# graphs should look.
HOME=/tmp/
VHOST=${vhost:-"/"}
QUEUES=$(HOME=$HOME rabbitmqctl list_queues name | \
grep -v '^Listing' | \
grep -v 'done\.$' | sed -e 's/[.=-]/_/g' )

View File

@@ -5,7 +5,6 @@
# Usage: Link or copy into /etc/munin/node.d/
#
# Parameters
# env.vhost <AMQ virtual host>
# env.queue_warn <warning queuesize>
# env.queue_crit <critical queuesize>
#
@@ -29,7 +28,6 @@ fi
# graphs should look.
HOME=/tmp/
VHOST=${vhost:-"/"}
QUEUES=$(HOME=$HOME rabbitmqctl list_queues name | \
grep -v '^Listing' | \
grep -v 'done\.$' | sed -e 's/[.=-]/_/g' )

View File

@@ -5,7 +5,6 @@
# Usage: Link or copy into /etc/munin/node.d/
#
# Parameters
# env.vhost <AMQ virtual host>
# env.queue_warn <warning queuesize>
# env.queue_crit <critical queuesize>
#
@@ -29,7 +28,6 @@ fi
# graphs should look.
HOME=/tmp/
VHOST=${vhost:-"/"}
QUEUES=$(rabbitmqctl list_queues name | \
grep -v '^Listing' | \
grep -v 'done\.$' | sed -e 's/[.=-]/_/g' )