1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-21 18:41:03 +00:00

- have some dirs

This commit is contained in:
Steve Schnepp 2012-02-13 18:24:46 +01:00
parent 0b089ea777
commit 08346aac58
687 changed files with 0 additions and 0 deletions

View file

@ -0,0 +1,51 @@
#!/bin/sh
#
#Author: Juned Memon
#www.TipsNtrapS.com
#mail:juned.memon@tipsntraps.com
# If run with the "autoconf"-parameter, give our opinion on wether we
# should be run on this system or not. This is optinal, and only used by
# munin-config. In the case of this plugin, we should most probably
# always be included.
if [ "$1" = "autoconf" ]; then
echo yes
exit 0
fi
# If run with the "config"-parameter, give out information on how the
# graphs should look.
if [ "$1" = "config" ]; then
# The title of the graph
echo 'graph_title RabbitMQ connections'
# Arguments to "rrdtool graph". In this case, tell it that the
# lower limit of the graph is '0', and that 1k=1000 (not 1024)
echo 'graph_args --base 1000 -l 0'
# The Y-axis label
echo 'graph_vlabel connections'
# We want Cur/Min/Avg/Max unscaled (i.e. 0.42 load instead of
# 420 milliload)
#echo 'graph_scale no'
echo 'graph_category RabbitMQ'
echo "connections.label Connections"
echo "connections.warning 500"
echo "connections.critical 1000"
echo "connections.info Number of active connections"
echo 'graph_info Shows the number of connections to RabbitMQ'
# Last, if run with the "config"-parameter, quit here (don't
# display any data)
exit 0
fi
# If not run with any parameters at all (or only unknown ones), do the
# real work - i.e. display the data. Almost always this will be
# "value" subfield for every data field.
echo "connections.value $(rabbitmqctl list_connections -q | wc -l)"

View file

@ -0,0 +1,51 @@
#!/bin/sh
#
#Author: Juned Memon
#www.TipsNtrapS.com
#mail:juned.memon@tipsntraps.com
# If run with the "autoconf"-parameter, give our opinion on wether we
# should be run on this system or not. This is optinal, and only used by
# munin-config. In the case of this plugin, we should most probably
# always be included.
if [ "$1" = "autoconf" ]; then
echo yes
exit 0
fi
# If run with the "config"-parameter, give out information on how the
# graphs should look.
VHOST="/"
QUEUE="ViApiQueue"
if [ "$1" = "config" ]; then
# The title of the graph
echo "graph_title RabbitMQ $VHOST consumers"
# Arguments to "rrdtool graph". In this case, tell it that the
# lower limit of the graph is '0', and that 1k=1000 (not 1024)
echo 'graph_args --base 1000 -l 0'
# The Y-axis label
echo 'graph_vlabel consumers'
# We want Cur/Min/Avg/Max unscaled (i.e. 0.42 load instead of
# 420 milliload)
#echo 'graph_scale no'
echo 'graph_category RabbitMQ'
echo "$QUEUE.label $QUEUE"
echo "$QUEUE.warning $QUEUE_WARN"
echo "$QUEUE.critical $QUEUE_CRIT"
echo "$QUEUE.info Active consumers for $QUEUE"
echo 'graph_info Lists active consumers for a queue.'
# Last, if run with the "config"-parameter, quit here (don't
# display any data)
exit 0
fi
# If not run with any parameters at all (or only unknown ones), do the
# real work - i.e. display the data. Almost always this will be
# "value" subfield for every data field.
rabbitmqctl list_queues -p $VHOST name consumers -q | grep $QUEUE |perl -nle'($q, $s) = split; $q =~ s/[.-=]/_/g; print("$q.value $s")'

View file

@ -0,0 +1,52 @@
#!/bin/sh
#
#Author: Juned Memon
#www.TipsNtrapS.com
#mail:juned.memon@tipsntraps.com
# If run with the "autoconf"-parameter, give our opinion on wether we
# should be run on this system or not. This is optinal, and only used by
# munin-config. In the case of this plugin, we should most probably
# always be included.
if [ "$1" = "autoconf" ]; then
echo yes
exit 0
fi
# If run with the "config"-parameter, give out information on how the
# graphs should look.
VHOST="/"
QUEUE="ViApiQueue"
if [ "$1" = "config" ]; then
# The title of the graph
echo "graph_title RabbitMQ $VHOST Number of Messages in queue $QUEUE"
# Arguments to "rrdtool graph". In this case, tell it that the
# lower limit of the graph is '0', and that 1k=1000 (not 1024)
echo 'graph_args --base 1000 -l 0'
# The Y-axis label
echo 'graph_vlabel queue_size'
# We want Cur/Min/Avg/Max unscaled (i.e. 0.42 load instead of
# 420 milliload)
#echo 'graph_scale no'
echo 'graph_category RabbitMQ'
echo "$QUEUE.label $QUEUE"
echo "$QUEUE.warning 10"
echo "$QUEUE.critical 20"
echo "$QUEUE.info Queue size for $QUEUE"
echo "graph_info Lists how many messages are in queue $QUEUE"
# Last, if run with the "config"-parameter, quit here (don't
# display any data)
exit 0
fi
# If not run with any parameters at all (or only unknown ones), do the
# real work - i.e. display the data. Almost always this will be
# "value" subfield for every data field.
rabbitmqctl list_queues -p $VHOST -q | grep $QUEUE |perl -nle'($q, $s) = split; $q =~ s/[.-=]/_/g; print("$q.value $s")'

View file

@ -0,0 +1,51 @@
#!/bin/sh
#
#Author: Juned Memon
#www.TipsNtrapS.com
#mail:juned.memon@tipsntraps.com
# If run with the "autoconf"-parameter, give our opinion on wether we
# should be run on this system or not. This is optinal, and only used by
# munin-config. In the case of this plugin, we should most probably
# always be included.
if [ "$1" = "autoconf" ]; then
echo yes
exit 0
fi
# If run with the "config"-parameter, give out information on how the
# graphs should look.
VHOST="/"
QUEUE="ViApiQueue"
if [ "$1" = "config" ]; then
# The title of the graph
echo "graph_title RabbitMQ $VHOST Unacknowledged Messages"
# Arguments to "rrdtool graph". In this case, tell it that the
# lower limit of the graph is '0', and that 1k=1000 (not 1024)
echo 'graph_args --base 1000 -l 0'
# The Y-axis label
echo 'graph_vlabel unacknowledged'
# We want Cur/Min/Avg/Max unscaled (i.e. 0.42 load instead of
# 420 milliload)
#echo 'graph_scale no'
echo 'graph_category RabbitMQ'
echo "$QUEUE.label $QUEUE"
echo "$QUEUE.warning 10000"
echo "$QUEUE.critical 20000"
echo "$QUEUE.info Unacknowledged messages for $QUEUE"
echo "graph_info Lists how many Unacknowledged messages in queue $QUEUE"
# Last, if run with the "config"-parameter, quit here (don't
# display any data)
exit 0
fi
# If not run with any parameters at all (or only unknown ones), do the
# real work - i.e. display the data. Almost always this will be
# "value" subfield for every data field.
rabbitmqctl list_queues -p $VHOST name messages_unacknowledged -q | grep $QUEUE |perl -nle'($q, $s) = split; $q =~ s/[.-=]/_/g; print("$q.value $s")'

View file

@ -0,0 +1,54 @@
#!/bin/sh
#
#Author: Juned Memon
#www.TipsNtrapS.com
#mail:juned.memon@tipsntraps.com
# If run with the "autoconf"-parameter, give our opinion on wether we
# should be run on this system or not. This is optinal, and only used by
# munin-config. In the case of this plugin, we should most probably
# always be included.
if [ "$1" = "autoconf" ]; then
echo yes
exit 0
fi
# If run with the "config"-parameter, give out information on how the
# graphs should look.
VHOST="/"
QUEUE="ViApiQueue"
if [ "$1" = "config" ]; then
# The title of the graph
echo "graph_title RabbitMQ $VHOST Memory used by $QUEUES"
# Arguments to "rrdtool graph". In this case, tell it that the
# lower limit of the graph is '0', and that 1k=1000 (not 1024)
echo 'graph_args --base 1024 --vertical-label Bytes -l 0'
# The Y-axis label
echo 'graph_vlabel memory'
# We want Cur/Min/Avg/Max unscaled (i.e. 0.42 load instead of
# 420 milliload)
#echo 'graph_scale no'
echo 'graph_category RabbitMQ'
echo "$QUEUE.label $QUEUE"
echo "$QUEUE.warning 80000"
echo "$QUEUE.critical 90000"
echo "$QUEUE.info Memory used by $QUEUE"
echo "graph_info Show memory usage by queue $QUEUE"
# Last, if run with the "config"-parameter, quit here (don't
# display any data)
exit 0
fi
# If not run with any parameters at all (or only unknown ones), do the
# real work - i.e. display the data. Almost always this will be
# "value" subfield for every data field.
rabbitmqctl list_queues -p $VHOST name memory -q | grep $QUEUE |perl -nle'($q, $s) = split; $q =~ s/[.-=]/_/g; print("$q.value $s")'

View file

@ -0,0 +1,81 @@
#!/bin/sh
#
# Plugin to monitor the queues of a virtual_host in RabbitMQ
#
# 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>
#
# Magic markers (optional - only used by munin-config and some
# installation scripts):
#
#%# family=auto
#%# capabilities=autoconf
# If run with the "autoconf"-parameter, give our opinion on wether we
# should be run on this system or not. This is optinal, and only used by
# munin-config. In the case of this plugin, we should most probably
# always be included.
###########################################################################################################
#rabbitmq-througput : This plugin captures the througput of the rabbitmq server i.e rate of messages (published,acknoledged,deliver and deliver_get) per second. These values are captured from RabbitMQ management plugin.
#Authour : Juned Memon
#Website : www.TipsNtrapS.com
#Email : junedm@tipsntraps.com
#Version :1.0
#NOTE : Chnage the URL to access the UI of RabbitMQ management
###########################################################################################################
if [ "$1" = "autoconf" ]; then
echo yes
exit 0
fi
curl -f -u guest:guest http://localhost:55672/api/overview | awk -F \" '{print $14"_"$16$17"\n"$22"_"$24$25"\n"$30"_"$32$33"\n"$38"_"$40$41}' | awk -F[:,] 'BEGIN {ORS = ""}{print $1} {printf" %2.4f\n",$2}' > /tmp/Throuphput.txt
details=$(cat /tmp/Throuphput.txt |awk '{print $1}')
# If run with the "config"-parameter, give out information on how the
# graphs should look.
if [ "$1" = "config" ]; then
# The title of the graph
echo "graph_title RabbitMQ Throughput"
# Arguments to "rrdtool graph". In this case, tell it that the
# lower limit of the graph is '0', and that 1k=1000 (not 1024)
echo 'graph_args --base 1000 --vertical-label Bytes -l 0'
# The Y-axis label
echo 'graph_vlabel Throuphput'
# We want Cur/Min/Avg/Max unscaled (i.e. 0.42 load instead of
# 420 milliload)
#echo 'graph_scale no'
echo 'graph_category RabbitMQ'
for detail in $details; do
echo "$detail.label $detail"
echo "$detail.info rate of $detail"
done
echo "graph_info Show Throughput for RabbitMQ "
# Last, if run with the "config"-parameter, quit here (don't
# display any data)
exit 0
fi
# If not run with any parameters at all (or only unknown ones), do the
# real work - i.e. display the data. Almost always this will be
# "value" subfield for every data field.
cat /tmp/Throuphput.txt | perl -nle'($q, $s) = split; $q =~ s/[.-=]/_/g; print("$q.value $s")'
rm /tmp/Throuphput.txt

View file

@ -0,0 +1,36 @@
#!/usr/bin/tclsh
proc clean_fieldname arg {
return [regsub -all {[^A-Za-z]} $arg "_"]
}
proc main {argc argv} {
set queues [exec /usr/sbin/rabbitmqctl list_queues -q]
if {$argc > 0} {
switch [lindex $argv 0] {
"config" {
puts "graph_title Number of messages in RabbitMQ queues"
puts "graph_vlabel messages"
puts "graph_category RabbitMQ"
foreach {q m} $queues {
set clean [clean_fieldname $q]
puts "$clean.label $q"
puts "$clean.draw LINE3"
puts "$clean.warning 300000"
puts "$clean.critical 700000"
}
}
"autoconf" {
puts "yes"
}
}
} else {
foreach {q m} $queues {
set clean [clean_fieldname $q]
puts "$clean.value $m"
}
}
}
main $argc $argv