mirror of
https://github.com/cmur2/munin-rabbitmq.git
synced 2025-06-15 16:30:24 +02:00
Fix compatibility for RabbitMQ 3.7
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
#!/bin/bash
|
||||
#
|
||||
# Plugin to monitor the number of connections to RabbitMQ
|
||||
#
|
||||
# Usage: Link or copy into /etc/munin/node.d/
|
||||
@ -27,11 +27,11 @@ fi
|
||||
HOME=/tmp/
|
||||
|
||||
# If run with the "config"-parameter, give out information on how the
|
||||
# graphs should look.
|
||||
# graphs should look.
|
||||
|
||||
if [ "$1" = "config" ]; then
|
||||
CONN_WARN=${queue_warn:-500}
|
||||
CONN_CRIT=${queue_crit:-1000}
|
||||
CONN_WARN=${queue_warn:-500}
|
||||
CONN_CRIT=${queue_crit:-1000}
|
||||
|
||||
# The host name this plugin is for. (Can be overridden to have
|
||||
# one machine answer for several)
|
||||
@ -63,4 +63,6 @@ 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 "total.value $(HOME=$HOME rabbitmqctl list_connections | grep -v "^Listing" | grep -v "done.$" | grep -v "\.\.\." | wc -l)"
|
||||
echo "secure.value $(HOME=$HOME rabbitmqctl list_connections ssl | grep -v "^Listing" | grep -v "done.$" | grep -v "\.\.\." | grep "true" | wc -l)"
|
||||
echo "insecure.value $(HOME=$HOME rabbitmqctl list_connections ssl | grep -v "^Listing" | grep -v "done.$" | grep -v "\.\.\." | grep "false" | wc -l)"
|
||||
|
Reference in New Issue
Block a user