@@ -2,8 +2,8 @@
# -*- encoding: iso-8859-1 -*-
#
# Wildcard-plugin to monitor DVB signal information via femon command line utility,
#
# To monitor a dvb device, link femon_<device> to this file.
#
# To monitor a dvb device, link femon_<device> to this file.
# E.g.
# ln -s /usr/share/munin/plugins/femon_ /etc/munin/plugins/femon_adapter0
# ...will monitor /dev/dvb/adapter0.
@@ -15,13 +15,13 @@
# Parameters
# femonpath - Specify path to femon program (Default: /usr/bin/femon)
# graph_args - Specify graph args (Default: --lower-limit 0 --upper-limit 100 --rigid)
#
#
# Author: Nicolas Knotzer <nknotzer@gmail.com>
#
#
# v1.0 02/10/2011
# v1.1 20/10/2011 - Prints OSError.strerror in verbose mode, uses rsplit instead of split for parsing femon output
# v1.2 21/10/2011 - Uses subprocess.Popen instead of subprocess.check_output for better compatibility with older python versions (i.e. works with python version >= 2.4)
# v1.3 25/10/2011 - Configure upper and lower graph limits with graph_args environment variable.
# v1.3 25/10/2011 - Configure upper and lower graph limits with graph_args environment variable.
#
# Copyright (c) 2011 Nicolas Knotzer.
#
@@ -70,15 +70,15 @@ def find_dvb_adapters() :
adapters.append(adapter)
except :
continue
except :
except :
verboselog('Failed to list adapters in /dev/dvb')
return(adapters)

def get_dvb_adapter_name() :
global plugin_name
try :
name=[plugin_name[string.rindex(plugin_name,'_')+1:]]

# Check that the adapter exists in /dev/dvb
if not os.path.exists('/dev/dvb/'+name[0]):
verboselog('/dev/dvb/'+name[0]+' not found!')
@@ -117,7 +117,7 @@ def print_dvb_adapter_values(dvb_adapter) :
try :
verboselog('Reading values from '+dvb_adapter[0])
mypipe = subprocess.Popen([os.getenv('femonpath','/usr/bin/femon'), '-H', '-c 1', '-a '+dvb_adapter[0].replace('adapter','')], stdout=subprocess.PIPE)
femon_output = mypipe.communicate()[0]
femon_output = mypipe.communicate()[0]
verboselog(femon_output)
except OSError, e:
verboselog('Cannot access femon values! Check user rights or proper femon installation.')
@@ -145,13 +145,13 @@ if len(sys.argv)>1 :
print_adapter_config (dvb_adapter)
sys.exit(0)
elif sys.argv[1]=="autoconf" :
if os.path.exists(os.getenv('femonpath','/usr/bin/femon')) :
if os.path.exists(os.getenv('femonpath','/usr/bin/femon')) :
if not find_dvb_adapters():
print('no (no dvb adapters accessible)')
else :
print('yes')
sys.exit(0)
else :
else :
print('no (femon not found)')
sys.exit(0)
elif sys.argv[1]=="suggest" :
@@ -179,16 +179,16 @@ femon_ - Munin wildcard-plugin to monitor dvb signal information attribute value
=head1 APPLICABLE SYSTEMS
Node with B<Python> interpreter and B<femon>
Node with B<Python> interpreter and B<femon>
installed and in function.
=head1 CONFIGURATION
=head2 Create link in service directory
To monitor a dvb device, create a link in the service directory
of the munin-node named femon_<device>, which is pointing to this file.
E.g.
ln -s /usr/share/munin/plugins/femon_ /etc/munin/plugins/femon_adapter0
@@ -211,7 +211,7 @@ So following minimal configuration in plugin-conf.d/munin-node is needed.
=head2 Set Parameter if needed
femonpath - Specify path to femon program (Default: /usr/bin/femon)
=head1 INTERPRETATION
@@ -33,7 +33,7 @@ graph_title ejabberd stats - connected users
graph_args --base 1000 --lower-limit 0
graph_vlabel users
graph_info The number of currently connected users, as of ejabberd report
graph_category chat
graph_category chat
graph_order active
connected.label Connected users
connected.draw AREA
@@ -2,7 +2,7 @@

: <<=cut
=head1 NAME
=head1 NAME
emc_vnx_block_lun_perfdata - Plugin to monitor Block statistics of EMC VNX 5300
Unified Storage Processors
@@ -23,16 +23,16 @@
=head1 DESCRIPTION
The plugin monitors LUN of EMC Unified Storage FLARE SP's. Probably it can also
be compatible with other Clariion systems. It uses SSH to connect to Control
Stations, then remotely executes /nas/sbin/navicli and fetches and parses data
be compatible with other Clariion systems. It uses SSH to connect to Control
Stations, then remotely executes /nas/sbin/navicli and fetches and parses data
from it. Obviously, it's easy to reconfigure plugin not to use Control Stations'
navicli in favor of using locally installed /opt/Navisphere's cli. There is no
difference which Storage Processor to use to gather data, so this plugin tries
both of them and uses the first active one. This plugin also automatically
chooses Primary Control Station from the list by calling /nasmcd/sbin/getreason
navicli in favor of using locally installed /opt/Navisphere's cli. There is no
difference which Storage Processor to use to gather data, so this plugin tries
both of them and uses the first active one. This plugin also automatically
chooses Primary Control Station from the list by calling /nasmcd/sbin/getreason
and /nasmcd/sbin/t2slot.
I left some parts of this plugin as rudimental to make easy to reconfigure it
I left some parts of this plugin as rudimental to make easy to reconfigure it
to draw more (or less) data.
The plugin has been tested in the following Operating Environment (OE):
@@ -41,15 +41,15 @@
=head1 COMPATIBILITY
The plugin has been written for being compatible with EMC VNX5300 Storage
system, as this is the only EMC storage which i have. By the way, i am pretty
sure it can also work with other VNX1 storages, like VNX5100 and VNX5500, and
The plugin has been written for being compatible with EMC VNX5300 Storage
system, as this is the only EMC storage which i have. By the way, i am pretty
sure it can also work with other VNX1 storages, like VNX5100 and VNX5500, and
old-style Clariion systems.
About VNX2 series, i don't know whether the plugin will be able to work with
them. Maybe it would need some corrections in command-line backend. The same
situation is with other EMC systems, so i encourage you to try and fix the
plugin.
About VNX2 series, i don't know whether the plugin will be able to work with
them. Maybe it would need some corrections in command-line backend. The same
situation is with other EMC systems, so i encourage you to try and fix the
plugin.
=head1 LIST OF GRAPHS
Graph category Disk:
@@ -70,68 +70,68 @@
First of all, be sure that statistics collection is turned on. You can do this
by typing:
navicli -h spa setstats -on
on your Control Station or locally through /opt/Navisphere
on your Control Station or locally through /opt/Navisphere
Also, the plugin actively uses buggy "cdef" feature of Munin 2.0, and here we
Also, the plugin actively uses buggy "cdef" feature of Munin 2.0, and here we
can be hit by the following bugs:
http://munin-monitoring.org/ticket/1017 - Here I have some workarounds in the
http://munin-monitoring.org/ticket/1017 - Here I have some workarounds in the
plugin, be sure that they are working.
http://munin-monitoring.org/ticket/1352 - Metrics in my plugin can be much
http://munin-monitoring.org/ticket/1352 - Metrics in my plugin can be much
longer than 15 characters.
Without these workarounds "Load" and "Queue Length" would not work.
=head2 Installation
The plugin uses SSH to connect to Control Stations. It's possible to use
The plugin uses SSH to connect to Control Stations. It's possible to use
'nasadmin' user, but it would be better if you create read-only global user by
Unisphere Client. The user should have only Operator role.
I created "operator" user but due to the fact that Control Stations already
had one internal "operator" user, the new one was called "operator1". So be
Unisphere Client. The user should have only Operator role.
I created "operator" user but due to the fact that Control Stations already
had one internal "operator" user, the new one was called "operator1". So be
careful. After that, copy .bash_profile from /home/nasadmin to a newly created
/home/operator1.
On munin-node side choose a user which will be used to connect through SSH.
Generally user "munin" is ok. Then, execute "sudo su munin -s /bin/bash",
"ssh-keygen" and "ssh-copy-id" to both Control Stations with newly created
On munin-node side choose a user which will be used to connect through SSH.
Generally user "munin" is ok. Then, execute "sudo su munin -s /bin/bash",
"ssh-keygen" and "ssh-copy-id" to both Control Stations with newly created
user.
Make a link from /usr/share/munin/plugins/emc_vnx_dm_basic_stats to
/etc/munin/plugins/emc_vnx_dm_basic_stats_<NAME>, where <NAME> is any
arbitrary name of your storage system. The plugin will return <NAME> in its
Make a link from /usr/share/munin/plugins/emc_vnx_dm_basic_stats to
/etc/munin/plugins/emc_vnx_dm_basic_stats_<NAME>, where <NAME> is any
arbitrary name of your storage system. The plugin will return <NAME> in its
answer as "host_name" field.
For example, assume your storage system is called "VNX5300".
Make a configuration file at
Make a configuration file at
/etc/munin/plugin-conf.d/emc_vnx_block_lun_perfdata_VNX5300. For example:
[emc_vnx_block_lun_perfdata_VNX5300]
user munin
user munin
env.username operator1
env.cs_addr 192.168.1.1 192.168.1.2
env.cs_addr 192.168.1.1 192.168.1.2
or:
[emc_vnx_block_lun_perfdata_VNX5300]
user munin
user munin
env.username operator1
env.localcli /opt/Navisphere/bin/naviseccli
env.sp_addr 192.168.0.3 192.168.0.4
env.blockpw foobar
Where:
Where:
user - SSH Client local user
env.username - Remote user with Operator role for Block or File part
env.cs_addr - Control Stations addresses for remote (indirect) access.
env.localcli - Optional. Path of localhost 'Naviseccli' binary. If this
env.localcli - Optional. Path of localhost 'Naviseccli' binary. If this
variable is set, env.cs_addr is ignored, and local 'navicli' is used.
Requires env.blockpw variable.
env.sp_addr - Default is "SPA SPB". In case of "direct" connection to
env.sp_addr - Default is "SPA SPB". In case of "direct" connection to
Storage Processors, their addresses/hostnames are written here.
env.blockpw - Password for connecting to Storage Processors
=head1 ERRATA
It counts Queue Length in not fully correct way. We take parameters totally
It counts Queue Length in not fully correct way. We take parameters totally
from both SP's, but after we divide them independently by load of SPA and SPB.
Anyway, in most AAA / ALUA cases the formula is correct.
@@ -165,7 +165,7 @@ else
NAVICLI="/nas/sbin/navicli"
fi

# Prints "10" on stdout if found Primary Online control station. "11" - for Secondary Online control station.
# Prints "10" on stdout if found Primary Online control station. "11" - for Secondary Online control station.
ssh_check_cmd() {
ssh -q "$username@$1" "/nasmcd/sbin/getreason | grep -w \"slot_\$(/nasmcd/sbin/t2slot)\" | cut -d- -f1 | awk '{print \$1}' "
}
@@ -253,7 +253,7 @@ echo "host_name ${TARGET}"
echo

if [ "$1" = "config" ] ; then
cat <<-EOF
cat <<-EOF
multigraph emc_vnx_block_blocks
graph_category disk
graph_title EMC VNX 5300 LUN Blocks
@@ -263,7 +263,7 @@ if [ "$1" = "config" ] ; then

while read -r LUN ; do
LUN="$(clean_fieldname "$LUN")"
cat <<-EOF
cat <<-EOF
${LUN}_read.label none
${LUN}_read.graph no
${LUN}_read.min 0
@@ -304,8 +304,8 @@ if [ "$1" = "config" ] ; then
multigraph emc_vnx_block_ticks
graph_category disk
graph_title EMC VNX 5300 Counted Load per LUN
graph_vlabel Load, % * Number of LUNs
graph_args --base 1000 -l 0 -r
graph_vlabel Load, % * Number of LUNs
graph_args --base 1000 -l 0 -r
EOF
echo -n "graph_order "
while read -r LUN ; do
@@ -332,7 +332,7 @@ if [ "$1" = "config" ] ; then
${LUN}_idleticks_spb.label $LUN Idle Ticks SPB
${LUN}_idleticks_spb.type COUNTER
${LUN}_idleticks_spb.graph no
${LUN}_load_spa.label $LUN load SPA
${LUN}_load_spa.label $LUN load SPA
${LUN}_load_spa.draw AREASTACK
${LUN}_load_spb.label $LUN load SPB
${LUN}_load_spb.draw AREASTACK
@@ -342,7 +342,7 @@ if [ "$1" = "config" ] ; then
done <<< "$LUNLIST"

cat <<-EOF
multigraph emc_vnx_block_outstanding
graph_category disk
graph_title EMC VNX 5300 Sum of Outstanding Requests
@@ -351,14 +351,14 @@ if [ "$1" = "config" ] ; then
EOF
while read -r LUN ; do
LUN="$(clean_fieldname "$LUN")"
cat <<-EOF
cat <<-EOF
${LUN}_outstandsum.label $LUN
${LUN}_outstandsum.type COUNTER
EOF
done <<< "$LUNLIST"

cat <<-EOF
multigraph emc_vnx_block_nonzeroreq
graph_category disk
graph_title EMC VNX 5300 Non-Zero Request Count Arrivals
@@ -392,7 +392,7 @@ if [ "$1" = "config" ] ; then
multigraph emc_vnx_block_queue
graph_category disk
graph_title EMC VNX 5300 Counted Block Queue Length
graph_title EMC VNX 5300 Counted Block Queue Length
graph_vlabel Length
EOF
while read -r LUN ; do
@@ -451,10 +451,10 @@ if [ "$1" = "config" ] ; then
cat <<-EOF
${SPclean}_total_busyticks.label ${SP}
${SPclean}_total_busyticks.graph no
${SPclean}_total_busyticks.type COUNTER
${SPclean}_total_busyticks.type COUNTER
${SPclean}_total_bt.label ${SP}
${SPclean}_total_bt.graph no
${SPclean}_total_bt.type COUNTER
${SPclean}_total_bt.type COUNTER
${SPclean}_total_idleticks.label ${SP}
${SPclean}_total_idleticks.graph no
${SPclean}_total_idleticks.type COUNTER
@@ -469,8 +469,8 @@ fi
#BIGCMD="$SSH"
while read -r LUN ; do
FILTERLUN="$(clean_fieldname "$LUN")"
BIGCMD+="$NAVICLI lun -list -name $LUN -perfData |
sed -ne 's/^Blocks Read\:\ */${FILTERLUN}_read.value /p;
BIGCMD+="$NAVICLI lun -list -name $LUN -perfData |
sed -ne 's/^Blocks Read\:\ */${FILTERLUN}_read.value /p;
s/^Blocks Written\:\ */${FILTERLUN}_write.value /p;
s/Read Requests\:\ */${FILTERLUN}_readreq.value /p;
s/Write Requests\:\ */${FILTERLUN}_writereq.value /p;

Large diffs are not rendered by default.

@@ -1,10 +1,10 @@
#!/bin/sh
#
#
# Plugin to monitor fan speed on an IBM/Lenovo Laptop
#
# This plugin reads the current speed of the system fan from
# the /proc file system. As it queries specific files provided
# by kernel modules for IBM/Lenovo Laptops, it probably only
# by kernel modules for IBM/Lenovo Laptops, it probably only
# works for those, but it should be easy to adapt to others
# if similar information is available for other types of laptops.
#
@@ -26,7 +26,7 @@ if [ "$1" = "autoconf" ]; then
fi
fi


if [ "$1" = "config" ]; then
echo 'graph_title Fan speed'
echo 'graph_args --base 1000 -l 0'
@@ -7,7 +7,7 @@
#
# "employee" must be an alias configured in the firebird aliases.conf file
#
# You will also need to set
# You will also need to set
#
# [firebird_employee]
# user root
@@ -53,24 +53,24 @@ gstat=$(which gstat 2> /dev/null)

${gstat:=/opt/firebird/bin/gstat} -h ${db} | awk -F'[\t]+' \
'{ sub(/^ */,"");
if ($2 == "Oldest transaction")
{
if ($2 == "Oldest transaction")
{
oldest_trans=$3;
print "oldest_transaction.value " $3
}
if ($2 == "Oldest active")
{
oldest_active=$3
oldest_active=$3
print "oldest_active.value " $3
}
if ($2 == "Oldest snapshot")
if ($2 == "Oldest snapshot")
{
oldest_snapshot=$3
oldest_snapshot=$3
print "oldest_snapshot.value " $3
}
if ($2 == "Next transaction")
{
next_transaction=$3
next_transaction=$3
print "next_transaction.value " $3
print "oldest_trans_gap1.value " $3 - oldest_trans
print "oldest_trans_gap2.value " $3 - oldest_snapshot
@@ -42,7 +42,7 @@ fi
if [ "$1" = "config" ]; then
echo 'graph_title freeradius requests'
echo 'graph_args --base 1000 -l 0 '
if [ -n ${graph_period} ]; then
if [ -n ${graph_period} ]; then
echo 'graph_period '${graph_period}
fi
echo 'graph_vlabel requests / ${graph_period}'
@@ -14,51 +14,48 @@
#%# family=auto
#%# capabilities=autoconf

MAXLABEL=20

mktempfile () {
mktemp -t $1
}
mktemp -t "$1"
}

LOGFILE=${logfile:-/var/log/proftpd/xferlog}
LOGTAIL=${logtail:-`which logtail`}
LOGTAIL=${logtail:-$(which logtail)}
STATEFILE=$MUNIN_PLUGSTATE/xferlog-bytes.offset

if [ "$1" = "autoconf" ]; then
if [ -f "${LOGFILE}" -a -n "${LOGTAIL}" -a -x "${LOGTAIL}" ] ; then
echo yes
exit 0
else
echo no
exit 1
fi
if [ -f "$LOGFILE" ] && [ -n "$LOGTAIL" ] && [ -x "$LOGTAIL" ] ; then
echo yes
else
echo "no (missing logfile or 'logtail' executable)"
fi
exit 0
fi

if [ "$1" = "config" ]; then
echo 'graph_title FTP Server Bytes'
echo 'graph_args --base 1000 -l 0'
echo 'graph_vlabel FTP Server Bytes'
echo 'graph_category network'
echo 'ftp_get.label Bytes GET'
echo 'ftp_put.label Bytes PUT'
exit 0
echo 'graph_title FTP Server Bytes'
echo 'graph_args --base 1000 -l 0'
echo 'graph_vlabel FTP Server Bytes'
echo 'graph_category network'
echo 'ftp_get.label Bytes GET'
echo 'ftp_put.label Bytes PUT'
exit 0
fi


ftp_get=U
ftp_put=U

TEMP_FILE=`mktempfile munin-xferlog-bytes.XXXXXX`
TEMP_FILE=$(mktempfile munin-xferlog-bytes.XXXXXX)

if [ -n "$TEMP_FILE" -a -f "$TEMP_FILE" ]
if [ -n "$TEMP_FILE" ] && [ -f "$TEMP_FILE" ]
then
$LOGTAIL ${LOGFILE} $STATEFILE | grep "[[:space:]][oi][[:space:]]" > ${TEMP_FILE}
ftp_get=`grep "[[:space:]]o[[:space:]]" ${TEMP_FILE} | awk '{s += $8} END { if ( s ) print s ; else print "0" }'`
ftp_put=`grep "[[:space:]]i[[:space:]]" ${TEMP_FILE} | awk '{s += $8} END { if ( s ) print s ; else print "0" }'`
"$LOGTAIL" "$LOGFILE" "$STATEFILE" | grep "[[:space:]][oi][[:space:]]" >"$TEMP_FILE"
ftp_get=$(grep "[[:space:]]o[[:space:]]" "$TEMP_FILE" | awk '{s += $8} END { if ( s ) print s ; else print "0" }')
ftp_put=$(grep "[[:space:]]i[[:space:]]" "$TEMP_FILE" | awk '{s += $8} END { if ( s ) print s ; else print "0" }')

/bin/rm -f $TEMP_FILE
/bin/rm -f "$TEMP_FILE"
fi

echo "ftp_get.value ${ftp_get}"
echo "ftp_put.value ${ftp_put}"

echo "ftp_get.value $ftp_get"
echo "ftp_put.value $ftp_put"
@@ -14,51 +14,47 @@
#%# family=auto
#%# capabilities=autoconf

MAXLABEL=20

mktempfile () {
mktemp -t $1
}
mktemp -t "$1"
}

LOGFILE=${logfile:-/var/log/proftpd/xferlog}
LOGTAIL=${logtail:-`which logtail`}
LOGTAIL=${logtail:-$(which logtail)}
STATEFILE=$MUNIN_PLUGSTATE/xferlog-count.offset

if [ "$1" = "autoconf" ]; then
if [ -f "${LOGFILE}" -a -n "${LOGTAIL}" -a -x "${LOGTAIL}" ] ; then
echo yes
exit 0
else
echo no
exit 1
fi
if [ -f "$LOGFILE" ] && [ -n "$LOGTAIL" ] && [ -x "$LOGTAIL" ] ; then
echo yes
else
echo "no (missing logfile or 'logtail' executable)"
fi
exit 0
fi

if [ "$1" = "config" ]; then
echo 'graph_title FTP Server Transfers'
echo 'graph_args --base 1000 -l 0'
echo 'graph_vlabel FTP Server Transfers'
echo 'graph_category network'
echo 'ftp_get.label Files GET'
echo 'ftp_put.label Files PUT'
exit 0
echo 'graph_title FTP Server Transfers'
echo 'graph_args --base 1000 -l 0'
echo 'graph_vlabel FTP Server Transfers'
echo 'graph_category network'
echo 'ftp_get.label Files GET'
echo 'ftp_put.label Files PUT'
exit 0
fi


ftp_get=U
ftp_put=U

TEMP_FILE=`mktempfile munin-xferlog-count.XXXXXX`
TEMP_FILE=$(mktempfile munin-xferlog-count.XXXXXX)

if [ -n "$TEMP_FILE" -a -f "$TEMP_FILE" ]
then
$LOGTAIL ${LOGFILE} $STATEFILE | grep "[[:space:]][oi][[:space:]]" > ${TEMP_FILE}
ftp_get=`grep "[[:space:]]o[[:space:]]" ${TEMP_FILE} | wc -l`
ftp_put=`grep "[[:space:]]i[[:space:]]" ${TEMP_FILE} | wc -l`
if [ -n "$TEMP_FILE" ] && [ -f "$TEMP_FILE" ]; then
"$LOGTAIL" "$LOGFILE" "$STATEFILE" | grep "[[:space:]][oi][[:space:]]" >"$TEMP_FILE"
ftp_get=$(grep "[[:space:]]o[[:space:]]" "$TEMP_FILE" | wc -l)
ftp_put=$(grep "[[:space:]]i[[:space:]]" "$TEMP_FILE" | wc -l)

/bin/rm -f $TEMP_FILE
/bin/rm -f "$TEMP_FILE"
fi

echo "ftp_get.value ${ftp_get}"
echo "ftp_put.value ${ftp_put}"

echo "ftp_get.value $ftp_get"
echo "ftp_put.value $ftp_put"
@@ -20,7 +20,7 @@
#
# Configuration:
# Maybe need to add following lines to plugins config file
# (e.g. /etc/munin/plugin-conf.d/pure-ftpd) to run pure-ftpwho
# (e.g. /etc/munin/plugin-conf.d/pure-ftpd) to run pure-ftpwho
# as user with apropirate privilegs then restart munin-node.
#
# [pure-ftpd]
@@ -11,7 +11,7 @@
#
# Configuration:
# Maybe need to add following lines to plugins config file
# (e.g. /etc/munin/plugin-conf.d/pure-ftpd) to run pure-ftpwho
# (e.g. /etc/munin/plugin-conf.d/pure-ftpd) to run pure-ftpwho
# as user with apropirate privilegs then restart munin-node.
#
# [pure-ftpd-bw]
@@ -54,7 +54,7 @@ if (!(-e $logfile)) {
open LOG, "<$logfile" or print "Can't open logfile!\n";
my $last_line;
while(<LOG>) {
$last_line = $_ if eof;
$last_line = $_ if eof;
}
close LOG;
@em = split(/ /,$last_line);
@@ -77,33 +77,33 @@ if (!(-e $logfile)) {
$put=0,
$mti=0,
$dsm=0;

open LOG, "<$logfile";
@log=<LOG>;
foreach $row (@log) {
@parts=split(/ /,$row);
$curr_ts = "$parts[3] $parts[4]";
$curr_ts =~ s/\[//g;
$curr_ts =~ s/\]//g;
$curr_ts =~ s/\]//g;

if ( Date_Cmp($curr_ts,$last_ts) > 0 ) {
if ( $parts[5]=~ /GET/ ) {
$get+=int($parts[8]);
if ($parts[2] eq "mti") {
$mti+=int($parts[8]);
}
}
if ($parts[2] eq "dsm") {
$dsm+=int($parts[8]);
}
}
}
if ( $parts[5]=~ /PUT/ ) {
$put-=int($parts[8]);
if ($parts[2] eq "mti") {
$mti-=int($parts[8]);
}
}
if ($parts[2] eq "dsm") {
$dsm-=int($parts[8]);
}
}
}
}
}
@@ -1,17 +1,17 @@
#!/usr/bin/gawk -f
# Denon x311 volume-plugin for munin
# Copyright (C) 2010 Kristian Lyngstol
#
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
@@ -45,7 +45,7 @@ function printMultigraph($ini_array, $machine_name, $title, $info, $max) {
p("graph_category games");
p("graph_info $info");
p("graph_printf %6.0lf");

if (isset($ini_array['settings'][$machine_name . '_colour']))
p("players.colour " . $ini_array['settings'][$machine_name . '_colour']);

@@ -106,8 +106,8 @@ if (isset($_SERVER['argv'][1])) {
// Query the game servers
$results = queryServers($ini_array);
// Cache the query in the state file
$fp = fopen($state, 'w+') or die("I could not open state file.");
fwrite($fp, serialize($results));
$fp = fopen($state, 'w+') or die("I could not open state file.");
fwrite($fp, serialize($results));
fclose($fp);


@@ -175,7 +175,7 @@ $ini_array = parse_ini_file($config, true);
// Load games.ini so we can show pretty game names
$games = parse_ini_file('gameq/GameQ/games.ini', true);

$results = unserialize(file_get_contents($state));
$results = unserialize(file_get_contents($state));

// Print individual game values
foreach ($results as $name => $server){
@@ -3,7 +3,7 @@

# Author Rodolphe Quiédeville <rodolphe@quiedeville.org>
# Licence : GPLv2
# Code based on tomcat_volume plugin by
# Code based on tomcat_volume plugin by
# Rune Nordbøe Skillingstad <runesk@linpro.no>

=head1 NAME
@@ -3,7 +3,7 @@

# Author Rodolphe Quiédeville <rodolphe@quiedeville.org>
# Licence : GPLv2
# Code based on tomcat_volume plugin by
# Code based on tomcat_volume plugin by
# Rune Nordbøe Skillingstad <runesk@linpro.no>

=head1 NAME
@@ -3,7 +3,7 @@

# Author Rodolphe Quiédeville <rodolphe@quiedeville.org>
# Licence : GPLv2
# Code based on tomcat_volume plugin by
# Code based on tomcat_volume plugin by
# Rune Nordbøe Skillingstad <runesk@linpro.no>

=head1 NAME
@@ -18,9 +18,9 @@
import sys
import os

try:
try:
from sqlalchemy.orm import exc, joinedload

from glance.common.cfg import CommonConfigOpts
from glance.registry.db import models
from glance.registry.db.api import get_session, configure_db
@@ -32,7 +32,7 @@ else:
def load_conf():
CONF = CommonConfigOpts(project="glance", prog="glance-registry")
CONF()

# Hide missing logger warning message
sys.stderr = open(os.devnull, 'w')
configure_db(CONF)
@@ -76,7 +76,7 @@ def print_values():
for image in images:
n_image_by_status[image["status"]] = n_image_by_status.get(image["status"], 0) + 1

for status in possible_status:
for status in possible_status:
print '%s.value %s' % (status, n_image_by_status.get(status, 0))

if __name__ == '__main__':
@@ -86,7 +86,7 @@ if __name__ == '__main__':
if argv[1] == 'config':
print_config()
elif argv[1] == 'autoconf':
if not successful_import:
if not successful_import:
print 'no (failed import glance and/or sqlachemy module)'
sys.exit(0)
try:
@@ -2,10 +2,10 @@
# Simple munin plugin to find the google rank for a URL/WORD combination
#
# THIS SCRIPT BREAKS THE TOS OF GOOGLE SO USE WITH CARE AND DON'T BLAME ME IF THINGS GO WRONG
#
#
# (c) 2009 i.dobson@planet-ian.com
#
# For each url/words that you want to watch you need to create a variable/word pair in your
# For each url/words that you want to watch you need to create a variable/word pair in your
# munin-node configuration file for example
#
#[google_rank]
@@ -19,18 +19,18 @@
# Version 0.5 24.1.2009
# Added loop to check the first 500 pages. Note the script sleeps 5 seconds between each page grab so
# If the word/url your looking for is in the higher positions then you need to increase the timeout
#
#
# Version 0.5 21.1.2009
# Dump each page grabbed from google into separate files (helps with debugging)
# Dump each page grabbed from google into separate files (helps with debugging)
#
# Version 0.4 19.1.2009
# Fixed corrupt then empty cache file bug
#
# Version 0.3 19.1.2009
# Version 0.3 19.1.2009
# The script now grabs the google page based on the LASTHIT counter.
# The script grabs the google page for URL1, then the next time it's called URL2 etc. If the url/word pair doesn't exist for LASTHIT then the script just dumps the cached data
#
# Version 0.2 18.01.2009
# Version 0.2 18.01.2009
# Cache added, the script only grabs the pages from google every 10 calls
# The script still only checks to first 100 pages returned by google
#
@@ -70,7 +70,7 @@ if [ "$1" = "config" ]; then
fi
if [ "$WORD" = "" ]; then
exit 0
fi
fi
VAR=`echo $URL.$WORD | sed -e "s/http:\/\///g"| sed -e "s/ /_/g"| sed -e "s/\./_/g"| sed -e "s/\-/_/g"`
URL=`echo $URL| sed -e "s/http:\/\///g"`
echo $VAR.label Pagerank $URL - $WORD
@@ -108,7 +108,7 @@ if [ "$URL" != "" ]; then
SEARCHWORD=`echo $WORD| sed -e "s/ /%20/g"`

until [ "$FOUND" -ne "0" ]; do
#Grab page from google for the WORD/PAGE combination.Pipe it into awk to pull out the url's only, one per line. Then dump only the lines containing the URL defined
#Grab page from google for the WORD/PAGE combination.Pipe it into awk to pull out the url's only, one per line. Then dump only the lines containing the URL defined
wget -q --user-agent=Firefox -O - http://www.google.com/search?q=$SEARCHWORD\&num=100\&hl=en\&safe=off\&pwst=1\&start=$start\&sa=N > /tmp/google_rank.$LASTHIT.data
VALUE=`cat /tmp/google_rank.$LASTHIT.data|sed 's/<a href=\"\([^\"]*\)\" class=l>/\n\1\n/g'|awk -v num=$num -v base=$base '{ if ( $1 ~ /^http/ ) print base,num++,$NF }'|awk '{ print $2 " " $3}'|grep -i $URL| awk '{ print $1}'`
VALUE=`echo $VALUE| awk '{ print $1}'`
@@ -117,7 +117,7 @@ until [ "$FOUND" -ne "0" ]; do
let start="start + 100"
sleep 5
else
FOUND=1
FOUND=1
let VALUE="$VALUE + $start"
fi
### echo Start=$start Value=$VALUE Found=$FOUND
@@ -139,12 +139,12 @@ done

#write data back
rm /tmp/google_rank.cache
for iLoop in `seq 1 10`; do
for iLoop in `seq 1 10`; do
echo ${Data[$iLoop]} >> /tmp/google_rank.cache
done
fi

#Reset counter to start
#Reset counter to start
if [ "$LASTHIT" -gt 30 ]; then
echo 0 > /tmp/google_rank.status
fi
@@ -12,7 +12,7 @@
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
@@ -42,7 +42,7 @@ if [ "$1" = "autoconf" ]; then
exit 0
fi

# Config.
# Config.
if [ "$1" = "config" ]; then
echo "graph_title Number of downloads of $PROJECTNAME from Google Code "
echo "graph_args --base 1000 --lower-limit 0"
@@ -8,13 +8,13 @@
amd_gpu_ - Wildcard plugin to monitor AMD GPUs. Uses aticonfig utility,
usually bundled with AMD GPU driver, to obtain information. To use this
plugin you have to make sure aticonfig will run without an active X
server (i.e. without anyone being logged in via the GUI). For more
information about this issue visit the link below:
server (i.e. without anyone being logged in via the GUI). For more
information about this issue visit the link below:
http://www.mayankdaga.com/running-opencl-applications-remotely-on-amd-gpus/
=head1 CONFIGURATION
This is a wildcard plugin. The wildcard prefix link name should be the
This is a wildcard plugin. The wildcard prefix link name should be the
value to monitor.
This plugin uses the following configuration variables:
@@ -54,7 +54,7 @@ faken@fakenmc.com
=head1 LICENSE
GNU General Public License, version 2
http://www.gnu.org/licenses/gpl-2.0.html
http://www.gnu.org/licenses/gpl-2.0.html
=head1 MAGIC MARKERS
@@ -71,7 +71,7 @@ atiConfigExec=${aticonfexec:-'/usr/bin/aticonfig'}

# Check if autoconf was requested
if [ "$1" = "autoconf" ]; then
# Autoconf only returns yes if aticonfig exists and is executable
# Autoconf only returns yes if aticonfig exists and is executable
if [ -x $atiConfigExec ]; then
echo yes
exit 0
@@ -122,7 +122,7 @@ if [ "$1" = "config" ]; then
echo "temp${nGpusCounter}.info Temperature information for $gpuName"
echo "temp${nGpusCounter}.label Temperature ($gpuName)"
: $(( nGpusCounter = $nGpusCounter + 1 ))
done
done
;;
clocks)
# First determine max clock for each GPU...
@@ -138,7 +138,7 @@ if [ "$1" = "config" ]; then
echo 'graph_title GPU clock'
echo "graph_args -l 0 -u $maxclock"
echo 'graph_vlabel MHz'
echo 'graph_category sensors'
echo 'graph_category htc'
echo "graph_info Core and memory clock info for AMD GPUs"
nGpusCounter=0
while [ $nGpusCounter -lt $nGpus ]
@@ -149,7 +149,7 @@ if [ "$1" = "config" ]; then
echo "coreclock${nGpusCounter}.info Core clock information for $gpuName"
echo "coreclock${nGpusCounter}.label Core clock ($gpuName)"
: $(( nGpusCounter = $nGpusCounter + 1 ))
done
done
;;
fan)
echo 'graph_title GPU fan speed'
@@ -164,22 +164,22 @@ if [ "$1" = "config" ]; then
echo "fan${nGpusCounter}.info Fan speed information for $gpuName"
echo "fan${nGpusCounter}.label Fan speed ($gpuName)"
: $(( nGpusCounter = $nGpusCounter + 1 ))
done
done
;;
load)
echo 'graph_title GPU load'
echo 'graph_args -l 0 -u 100'
echo 'graph_vlabel Percentage'
echo 'graph_category sensors'
echo "graph_info GPU load"
echo 'graph_category htc'
echo "graph_info GPU load"
nGpusCounter=0
while [ $nGpusCounter -lt $nGpus ]
do
gpuName=`echo "$nGpusOutput" | grep "\ $nGpusCounter\.\ " | cut -f 3 -d "." | sed -r 's/^[0-9]+\ //'`
echo "load${nGpusCounter}.info Load information for $gpuName"
echo "load${nGpusCounter}.label Load ($gpuName)"
: $(( nGpusCounter = $nGpusCounter + 1 ))
done
done
;;
vcore)
echo 'graph_title GPU core voltage'
@@ -193,7 +193,7 @@ if [ "$1" = "config" ]; then
echo "vcore${nGpusCounter}.info Vcore information for $gpuName"
echo "vcore${nGpusCounter}.label Core voltage ($gpuName)"
: $(( nGpusCounter = $nGpusCounter + 1 ))
done
done
;;
*)
echo "Can't run without a proper symlink. Exiting."
@@ -10,7 +10,7 @@ usually bundled with NVIDIA GPU driver, to obtain information.
=head1 CONFIGURATION
This is a wildcard plugin. The wildcard prefix link name should be the
This is a wildcard plugin. The wildcard prefix link name should be the
value to monitor.
This plugin uses the following configuration variables:
@@ -53,7 +53,7 @@ faken@fakenmc.com
=head1 LICENSE
GNU General Public License, version 2
http://www.gnu.org/licenses/gpl-2.0.html
http://www.gnu.org/licenses/gpl-2.0.html
=head1 MAGIC MARKERS
@@ -70,7 +70,7 @@ nvSmiExec=${smiexec:-'/usr/bin/nvidia-smi'}

# Check if autoconf was requested
if [ "$1" = "autoconf" ]; then
# Autoconf only returns yes if nvidia-smi exists and is executable
# Autoconf only returns yes if nvidia-smi exists and is executable
if [ -x "$nvSmiExec" ]; then
echo yes
exit 0
@@ -188,7 +188,7 @@ if [ "$1" = "config" ]; then
gpuName=$(echo "$nGpusOutput" | sed -n $((nGpusCounter+1))p | cut -d \( -f 1)
echo "${name}${nGpusCounter}.info GPU utilization information for $gpuName"
: $((nGpusCounter=nGpusCounter+1))
done
done
;;
*)
echo "Can't run without a proper symlink. Exiting."
@@ -38,7 +38,7 @@ my $runType = "normal";
my @runTypes = qw( normal config autoconf );
if ($#ARGV + 1 == 1)
{
if (grep $_ eq $ARGV[0], @runTypes)
if (grep $_ eq $ARGV[0], @runTypes)
{
$runType = $ARGV[0];
}
@@ -63,10 +63,10 @@ for (my $i = 0; $i < $gpuCount; $i++)
{
($ret, my $handle) = nvmlDeviceGetHandleByIndex($i);
next if $ret != $NVML_SUCCESS;

($ret, my $pciInfo) = nvmlDeviceGetPciInfo($handle);
my $gpuName = $pciInfo->{'busId'} if $ret == $NVML_SUCCESS;

if ($runType eq "config")
{
# only print the graph information once
@@ -78,7 +78,7 @@ for (my $i = 0; $i < $gpuCount; $i++)
print "graph_category sensors\n";
print "graph_info Information for NVIDIA GPUs using driver version $driverVersion\n";
}

# metrics are collected for all the GPUs to a single graph
print "GPU_UTIL_$i.label GPU$i - $gpuName : GPU utilization\n";
print "GPU_FANSPEED_$i.label GPU$i - $gpuName : fan speed\n";
@@ -23,48 +23,48 @@
# ------------------------------------------------------------
# Plugin to monitor Novell Groupwise Internet Agent (GWIA)
# ------------------------------------------------------------
#
# Management Information Base (MIB) GWIAMIB
#
# Management Information Base (MIB) GWIAMIB
#
# Naming Tree: 1.3.6.1.4.1.23
# iso(1) org(3) dod(6) internet(1) private(4) enterprises(1) novell(23)
#
# To see all values available for your GWIA, type
# snmpwalk -v1 -c public -m GWIAMIB <HOST> gwia
#
# This plugin fetches:
# This plugin fetches:
#
# * gwiaGatewayName - 1.3.6.1.4.1.23.2.70.1.1.
# * gwiaStatBytesIn - 1.3.6.1.4.1.23.2.70.1.6.
# * gwiaStatBytesOut - 1.3.6.1.4.1.23.2.70.1.5.
#
# Usage:
# --------------
# Link this file snmp__gwia_bytes_ to your nodes servicedir [/etc/munin/plugins]
# Link this file snmp__gwia_bytes_ to your nodes servicedir [/etc/munin/plugins]
#
# as:
# snmp_<host>_gwia_bytes_<pos>
# as:
# snmp_<host>_gwia_bytes_<pos>
#
# with:
# <host> = Name or IP-Number of host
# <host> = Name or IP-Number of host
# <pos> = table index of the GWIA Object
#
#
# E.g.
# ln -s /usr/share/munin/plugins/snmp__gwia_bytes_ \
# /etc/munin/plugins/snmp_foo.example.com_gwia_bytes_0
# ...will monitor a single GWIA object on host foo.example.com.
# ...will monitor a single GWIA object on host foo.example.com.
#
# Parameters
# community - Specify wich community string to use (Default: public)
# port - Specify which port to read from (Default: 161)
# host - Specify which host to monitor (Default: Read from link in servicedir)
# pos - Specify which table Object to read (Default: Read from link in servicedir,
#
# pos - Specify which table Object to read (Default: Read from link in servicedir,
#
# You may adjust settings to your need via configuration in plugin-conf.d/munin-node:
# [snmp_*_gwia_bytes_*]
# env.port <your_port_number>
# env.community <your SNMP community string>
# env.pos <your objects table position. Values: 0,1,2,..>
# env.pos <your objects table position. Values: 0,1,2,..>
# env.host <name or IP of your host>
#
# Parameters can also be specified on a per GWIA basis, eg:
@@ -96,8 +96,8 @@ my $GRAPH_VLABEL = "bytes per $GRAPH_PERIOD in(-) / out(+)";
my $BYTES_LABEL='Bytes';

if (defined $ARGV[0] and $ARGV[0] eq "snmpconf")
{
print "require 1.3.6.1.4.1.23.2.70.1.1. [.*]\n"; # gwiaGatewayName
{
print "require 1.3.6.1.4.1.23.2.70.1.1. [.*]\n"; # gwiaGatewayName
print "require 1.3.6.1.4.1.23.2.70.1.6. [\\d*]\n"; # gwiaStatBytesIn
print "require 1.3.6.1.4.1.23.2.70.1.5. [\\d*]\n"; # gwiaStatBytesOut

@@ -129,8 +129,8 @@ if (!defined ($session))
if (defined $ARGV[0] and $ARGV[0] eq "config")
{

# get name of Internet Agent
my $gwname = &get_single ($session, "1.3.6.1.4.1.23.2.70.1.1.$pos"); # gwiaGatewayName
# get name of Internet Agent
my $gwname = &get_single ($session, "1.3.6.1.4.1.23.2.70.1.1.$pos"); # gwiaGatewayName
# output to munin
print "host_name $host
graph_category mail
@@ -23,52 +23,52 @@
# ------------------------------------------------------------
# Plugin to monitor Novell Groupwise Internet Agent (GWIA)
# ------------------------------------------------------------
#
# Management Information Base (MIB) GWIAMIB
#
# Management Information Base (MIB) GWIAMIB
#
# Naming Tree: 1.3.6.1.4.1.23
# iso(1) org(3) dod(6) internet(1) private(4) enterprises(1) novell(23)
#
# To see all values available for your GWIA, type
# snmpwalk -v1 -c public -m GWIAMIB <HOST> gwia
#
# This plugin fetches:
# This plugin fetches:
#
# * gwiaGatewayName - 1.3.6.1.4.1.23.2.70.1.1.
# * gwiaStatMsgsOut - 1.3.6.1.4.1.23.2.70.1.7.
# * gwiaStatMsgsIn - 1.3.6.1.4.1.23.2.70.1.8.
# * gwiaStatStatusesOut - 1.3.6.1.4.1.23.2.70.1.9.
# * gwiaStatStatusesIn - 1.3.6.1.4.1.23.2.70.1.10.
# * gwiaStatErrorsOut - 1.3.6.1.4.1.23.2.70.1.11.
# * gwiaStatStatusesIn - 1.3.6.1.4.1.23.2.70.1.10.
# * gwiaStatErrorsOut - 1.3.6.1.4.1.23.2.70.1.11.
# * gwiaStatErrorsIn - 1.3.6.1.4.1.23.2.70.1.12.
#
# Usage:
# --------------
# Link this file snmp__gwia_msgs_ to your nodes servicedir [/etc/munin/plugins]
# Link this file snmp__gwia_msgs_ to your nodes servicedir [/etc/munin/plugins]
#
# as:
# snmp_<host>_gwia_msgs_<pos>
# as:
# snmp_<host>_gwia_msgs_<pos>
#
# with:
# <host> = Name or IP-Number of host
# <host> = Name or IP-Number of host
# <pos> = table index of the GWIA Object
#
#
# E.g.
# ln -s /usr/share/munin/plugins/snmp__gwia_msgs_ \
# /etc/munin/plugins/snmp_foo.example.com_gwia_msgs_0
# ...will monitor a single GWIA object on host foo.example.com.
# ...will monitor a single GWIA object on host foo.example.com.
#
# Parameters
# community - Specify wich community string to use (Default: public)
# port - Specify which port to read from (Default: 161)
# host - Specify which host to monitor (Default: Read from link in servicedir)
# pos - Specify which table Object to read (Default: Read from link in servicedir,
#
# pos - Specify which table Object to read (Default: Read from link in servicedir,
#
# You may adjust settings to your need via configuration in plugin-conf.d/munin-node:
# [snmp_*_gwia_msgs_*]
# env.port <your_port_number>
# env.community <your SNMP community string>
# env.pos <your objects table position. Values: 0,1,2,..>
# env.pos <your objects table position. Values: 0,1,2,..>
# env.host <name or IP of your host>
#
# Parameters can also be specified on a per GWIA basis, eg:
@@ -104,8 +104,8 @@ my $ERRORS_LABEL='Errors';
my $ERRORS_CRITICAL=10;

if (defined $ARGV[0] and $ARGV[0] eq "snmpconf")
{
print "require 1.3.6.1.4.1.23.2.70.1.1. [.*]\n"; # gwiaGatewayName
{
print "require 1.3.6.1.4.1.23.2.70.1.1. [.*]\n"; # gwiaGatewayName
print "require 1.3.6.1.4.1.23.2.70.1.7. [\\d*]\n"; # gwiaStatMsgsOut
print "require 1.3.6.1.4.1.23.2.70.1.8. [\\d*]\n"; # gwiaStatMsgsIn
print "require 1.3.6.1.4.1.23.2.70.1.11. [\\d*]\n"; # gwiaStatErrorsOut
@@ -141,8 +141,8 @@ if (!defined ($session))
if (defined $ARGV[0] and $ARGV[0] eq "config")
{

# get name of Internet Agent
my $gwname = &get_single ($session, "1.3.6.1.4.1.23.2.70.1.1.$pos"); # gwiaGatewayName
# get name of Internet Agent
my $gwname = &get_single ($session, "1.3.6.1.4.1.23.2.70.1.1.$pos"); # gwiaGatewayName

# output to munin
print "host_name $host
@@ -23,49 +23,49 @@
# ------------------------------------------------------------
# Plugin to monitor Novell Groupwise MTA (GWMTA)
# ------------------------------------------------------------
#
# Management Information Base (MIB) GWMTA-MIB
#
# Management Information Base (MIB) GWMTA-MIB
#
# Naming Tree: 1.3.6.1.4.1.23
# iso(1) org(3) dod(6) internet(1) private(4) enterprises(1) novell(23)
#
# To see all values available for your GWMTA, type
# snmpwalk -v1 -c public -m GWMTA-MIB <HOST> gwmta
#
# This plugin fetches:
# This plugin fetches:
#
# * mtaDomainName 1.3.6.1.4.1.23.2.37.1.1.1.2.
# * mtaTenMinuteRoutedMsgs - 1.3.6.1.4.1.23.2.37.1.1.1.10.
# * mtaDomainName 1.3.6.1.4.1.23.2.37.1.1.1.2.
# * mtaTenMinuteRoutedMsgs - 1.3.6.1.4.1.23.2.37.1.1.1.10.
# * mtaTenMinuteUndeliverableMsgs - 1.3.6.1.4.1.23.2.37.1.1.1.12.
# * mtaTenMinuteErrorMsgs - 1.3.6.1.4.1.23.2.37.1.1.1.14.
#
# Usage:
# --------------
# Link this file snmp__gwmta_msgs_ to your nodes servicedir [/etc/munin/plugins]
# Link this file snmp__gwmta_msgs_ to your nodes servicedir [/etc/munin/plugins]
#
# as:
# snmp_<host>_gwmta_msgs_<pos>
# as:
# snmp_<host>_gwmta_msgs_<pos>
#
# with:
# <host> = Name or IP-Number of host
# <host> = Name or IP-Number of host
# <pos> = table index of the GWMTA Object
#
#
# E.g.
# ln -s /usr/share/munin/plugins/snmp__gwmta_msgs_ \
# /etc/munin/plugins/snmp_foo.example.com_gwmta_msgs_0
# ...will monitor a single GWMTA object on host foo.example.com.
# ...will monitor a single GWMTA object on host foo.example.com.
#
# Parameters
# community - Specify wich community string to use (Default: public)
# port - Specify which port to read from (Default: 161)
# host - Specify which host to monitor (Default: Read from link in servicedir)
# pos - Specify which table Object to read (Default: Read from link in servicedir,
#
# pos - Specify which table Object to read (Default: Read from link in servicedir,
#
# You may adjust settings to your need via configuration in plugin-conf.d/munin-node:
# [snmp_*_gwmta_msgs_*]
# env.port <your_port_number>
# env.community <your SNMP community string>
# env.pos <your objects table position. Values: 0,1,2,..>
# env.pos <your objects table position. Values: 0,1,2,..>
# env.host <name or IP of your host>
#
# Parameters can also be specified on a per GWMTA basis, eg:
@@ -104,8 +104,8 @@ my $ERRORS_CRITICAL=10;

if (defined $ARGV[0] and $ARGV[0] eq "snmpconf")
{
print "index 1.3.6.1.4.1.23.2.37.1.1.1.1.\n"; # mtaIndex
print "require 1.3.6.1.4.1.23.2.37.1.1.1.2. \n"; # mtaDomainName
print "index 1.3.6.1.4.1.23.2.37.1.1.1.1.\n"; # mtaIndex
print "require 1.3.6.1.4.1.23.2.37.1.1.1.2. \n"; # mtaDomainName
print "require 1.3.6.1.4.1.23.2.37.1.1.1.10. [\\d+]\n"; # mtaTenMinuteRoutedMsgs
print "require 1.3.6.1.4.1.23.2.37.1.1.1.12. [\\d+]\n"; # mtaTenMinuteUndeliverableMsgs
print "require 1.3.6.1.4.1.23.2.37.1.1.1.14. [\\d+]\n"; # mtaTenMinuteErrorMsgs
@@ -137,20 +137,20 @@ if (!defined ($session))

if (defined $ARGV[0] and $ARGV[0] eq "config")
{
# get name of domain
my $domain = &get_single ($session, "1.3.6.1.4.1.23.2.37.1.1.1.2.$pos"); # mtaDomainName
# get name of domain
my $domain = &get_single ($session, "1.3.6.1.4.1.23.2.37.1.1.1.2.$pos"); # mtaDomainName

# output to munin
print "host_name $host
graph_category mail
graph_args --base 1000
graph_period $GRAPH_PERIOD
graph_title GWMTA load ($domain)
graph_info Monitors status of Groupwise MTA, here: $domain. It reports values for the last 10 minutes.
graph_title GWMTA load ($domain)
graph_info Monitors status of Groupwise MTA, here: $domain. It reports values for the last 10 minutes.
graph_vlabel $GRAPH_VLABEL
graph_args -l 0
routed.label $ROUTED_LABEL
routed.info mtaTenMinuteRoutedMsgs (1.3.6.1.4.1.23.2.37.1.1.1.10.)
routed.info mtaTenMinuteRoutedMsgs (1.3.6.1.4.1.23.2.37.1.1.1.10.)
routed.critical $ROUTED_CRITICAL
routed.type GAUGE
routed.min 0
@@ -23,16 +23,16 @@
# ------------------------------------------------------------
# Plugin to monitor Novell Groupwise Post Office Agent (POA)
# ------------------------------------------------------------
#
# Management Information Base (MIB) GWPOA
#
# Management Information Base (MIB) GWPOA
#
# Naming Tree: 1.3.6.1.4.1.23
# iso(1) org(3) dod(6) internet(1) private(4) enterprises(1) novell(23)
#
# To see all values available for your GWPOA, type
# snmpwalk -v1 -c public -m GWPOA-MIB <HOST> gwpoa
#
# This plugin fetches:
# This plugin fetches:
#
# * poaPostOfficeName - 1.3.6.1.4.1.23.2.38.1.1.1.2.
# * poaTotalMsgs - 1.3.6.1.4.1.23.2.38.1.1.1.3.
@@ -46,18 +46,18 @@
# with the hostname (host) and the table index (pos) of the POA-Object
# defined in the linkage.
#
# snmp_<host>_gwpoa_<pos>
# snmp_<host>_gwpoa_<pos>
#
# with:
# <host> = Name or IP-Number of host
# <host> = Name or IP-Number of host
# <pos> = Table index of the POA Object
#
#
# E.g.
# ln -s /usr/share/munin/plugins/snmp__gwpoa_ \
# /etc/munin/plugins/snmp_foo.example.com_gwpoa_1
#
# ...will monitor the first POA-Object on host foo.example.com.
# ...will monitor the first POA-Object on host foo.example.com.
#
#
# Configuration:
@@ -66,13 +66,13 @@
# community - Specify wich community string to use (Default: public)
# port - Specify which port to read from (Default: 161)
# host - Specify which host to monitor (Default: Read from link in servicedir)
# pos - Specify which table Object to read (Default: Read from link in servicedir,
#
# pos - Specify which table Object to read (Default: Read from link in servicedir,
#
# You may adjust settings via configuration in plugin-conf.d/munin-node:
# [snmp_*_gwpoa_*]
# env.port <your_port_number>
# env.community <your SNMP community string>
# env.pos <your table position. Values: 0,1,2,..>
# env.pos <your table position. Values: 0,1,2,..>
# env.host <name or IP of your host>
#
# Parameters can also be specified on a per POA basis, eg:
@@ -103,15 +103,15 @@ my $response;
my $GRAPH_PERIOD = "minute";
my $GRAPH_VLABEL = "messages per $GRAPH_PERIOD";
my $TOTAL_LABEL = "TotalMsgs";
my $UNDELIVERABLE_LABEL = "UndeliverableMsgs";
my $UNDELIVERABLE_LABEL = "UndeliverableMsgs";
my $PROBLEM_LABEL = "ProblemMsgs";
my $ERRORS_LABEL = "AdmErrorMsgs";
my $ERRORS_CRITICAL = 10;

if (defined $ARGV[0] and $ARGV[0] eq "snmpconf")
{
print "index 1.3.6.1.4.1.23.2.38.1.1.1.1.\n"; # gwpoa
print "require 1.3.6.1.4.1.23.2.38.1.1.1.2. [.*]\n"; # poaPostOfficeName
print "index 1.3.6.1.4.1.23.2.38.1.1.1.1.\n"; # gwpoa
print "require 1.3.6.1.4.1.23.2.38.1.1.1.2. [.*]\n"; # poaPostOfficeName
print "require 1.3.6.1.4.1.23.2.38.1.1.1.3. [\\d*]\n"; # poaTotalMsgs
print "require 1.3.6.1.4.1.23.2.38.1.1.1.4. [\\d*]\n"; # poaProblemMsgs
print "require 1.3.6.1.4.1.23.2.38.1.1.1.8. [\\d*]\n"; # poaUndeliverableMsgs
@@ -145,8 +145,8 @@ if (!defined ($session))
if (defined $ARGV[0] and $ARGV[0] eq "config")
{

# get Post Office Name
my $poname = &get_single ($session, "1.3.6.1.4.1.23.2.38.1.1.1.2.$pos"); # poaPostOfficeName
# get Post Office Name
my $poname = &get_single ($session, "1.3.6.1.4.1.23.2.38.1.1.1.2.$pos"); # poaPostOfficeName

# output to munin
print "host_name $host
@@ -9,10 +9,10 @@
Like Munin, this plugin is licensed under the GNU GPL v2 license
http://www.opensource.org/licenses/GPL-2.0
If you've put your gunicorn pid somewhere other than the
If you've put your gunicorn pid somewhere other than the
default /var/run/gunicorn.pid, you can add a section like
this to your munin-node's plugin configuration:
[gunicorn_*]
env.gunicorn_pid_path [path to your gunicorn pid]
@@ -50,15 +50,15 @@ class GunicornMemoryStatus():
def _get_master_pid(self):
master_pid_file = open(GUNICORN_PID_PATH)
self.master_pid = master_pid_file.read().rstrip()
master_pid_file.close()
master_pid_file.close()
return True

def _get_total_memory(self):
master = self._get_master_memory()
total = master +self. _get_worker_memory()
total_in_mb = total / 1024
return total_in_mb

def _get_master_memory(self):
master = int(check_output(
['ps', '--pid', self.master_pid, '-o', 'rss', '--no-headers']))
@@ -8,10 +8,10 @@
Like Munin, this plugin is licensed under the GNU GPL v2 license
http://www.opensource.org/licenses/GPL-2.0
If you've put your gunicorn pid somewhere other than the
If you've put your gunicorn pid somewhere other than the
default /var/run/gunicorn.pid, you can add a section like
this to your munin-node's plugin configuration:
[gunicorn_*]
env.gunicorn_pid_path [path to your gunicorn pid]
@@ -59,7 +59,7 @@ class GunicornStatus():
def _get_master_pid(self):
master_pid_file = open(GUNICORN_PID_PATH)
self.master_pid = master_pid_file.read().rstrip()
master_pid_file.close()
master_pid_file.close()

def _get_worker_pids(self, master_pid):
children = check_output(
@@ -30,7 +30,7 @@ graph_vlabel=${title}
case $1 in
config)
cat <<EOF
graph_category loadbalancer
graph_category loadbalancer
graph_args --base 1000
graph_title ${graph_title}
graph_vlabel ${graph_vlabel}
@@ -76,7 +76,7 @@ graph_title="${title} sessions by servers"
graph_vlabel=${title}

if [ "$1" = "autoconf" ]; then
echo yes
echo yes
exit 0
fi

@@ -50,9 +50,9 @@ function parse_url {

if [ ! -z "$socket" ]; then
LINE1=`echo 'show stat' | socat unix-connect:"$socket" stdio | head -1 | sed 's/# //'`
LINE2=`echo 'show stat' | socat unix-connect:"$socket" stdio | grep "$PXNAME,$SVNAME"`
LINE2=`echo 'show stat' | socat unix-connect:"$socket" stdio | grep "$PXNAME,$SVNAME"`
fi

ARRAY1=($LINE1);

# Find values
@@ -76,7 +76,7 @@ LIST="$backend"


if [ "$1" = "autoconf" ]; then
echo yes
echo yes
exit 0
fi

@@ -112,5 +112,5 @@ fi
echo "cli_abrt`echo $i | md5sum | cut -d - -f1 | sed 's/ //g'`.value $CLI"
echo "srv_abrt`echo $i | md5sum | cut -d - -f1 | sed 's/ //g'`.value $SRV"
done


@@ -74,7 +74,7 @@ SVNAME='BACKEND'
LIST=$backend

if [ "$1" = "autoconf" ]; then
echo yes
echo yes
exit 0
fi

@@ -100,4 +100,4 @@ fi
ACT=`parse_url ${i} ${SVNAME} act`
echo "act`echo $i | md5sum | cut -d - -f1 | sed 's/ //g'`.value $ACT"
done

@@ -42,7 +42,7 @@ function parse_url {
PXNAME="$1"
SVNAME="$2"
VALUE="$3"

if [ ! -z "$url" ]; then
LINE1=`curl -s "$url" | head -1 | sed 's/# //'`
LINE2=`curl -s "$url" | grep "$PXNAME,$SVNAME"`
@@ -52,7 +52,7 @@ function parse_url {
LINE1=`echo 'show stat' | socat unix-connect:"$socket" stdio | head -1 | sed 's/# //'`
LINE2=`echo 'show stat' | socat unix-connect:"$socket" stdio | grep "$PXNAME,$SVNAME"`
fi

ARRAY1=($LINE1);

# Find values
@@ -75,7 +75,7 @@ LIST=$backend


if [ "$1" = "autoconf" ]; then
echo yes
echo yes
exit 0
fi

@@ -110,5 +110,5 @@ fi
BOUT=`parse_url ${i} ${SVNAME} bout`
echo "down`echo $i | md5sum | cut -d - -f1 | sed 's/ //g'`.value $BOUT"
echo "up`echo $i | md5sum | cut -d - -f1 | sed 's/ //g'`.value $BIN"
done
done

@@ -50,9 +50,9 @@ function parse_url {

if [ ! -z "$socket" ]; then
LINE1=`echo 'show stat' | socat unix-connect:"$socket" stdio | head -1 | sed 's/# //'`
LINE2=`echo 'show stat' | socat unix-connect:"$socket" stdio | grep "$PXNAME,$SVNAME"`
LINE2=`echo 'show stat' | socat unix-connect:"$socket" stdio | grep "$PXNAME,$SVNAME"`
fi

ARRAY1=($LINE1);

# Find values
@@ -76,7 +76,7 @@ LIST="$backend"


if [ "$1" = "autoconf" ]; then
echo yes
echo yes
exit 0
fi

@@ -119,5 +119,5 @@ fi
echo "comp_out`echo $i | md5sum | cut -d - -f1 | sed 's/ //g'`.value $OUT"
echo "comp_byp`echo $i | md5sum | cut -d - -f1 | sed 's/ //g'`.value $BY"
done


@@ -50,9 +50,9 @@ function parse_url {

if [ ! -z "$socket" ]; then
LINE1=`echo 'show stat' | socat unix-connect:"$socket" stdio | head -1 | sed 's/# //'`
LINE2=`echo 'show stat' | socat unix-connect:"$socket" stdio | grep "$PXNAME,$SVNAME"`
LINE2=`echo 'show stat' | socat unix-connect:"$socket" stdio | grep "$PXNAME,$SVNAME"`
fi

ARRAY1=($LINE1);

# Find values
@@ -76,7 +76,7 @@ LIST="$frontend"


if [ "$1" = "autoconf" ]; then
echo yes
echo yes
exit 0
fi

@@ -119,5 +119,5 @@ fi
echo "comp_out`echo $i | md5sum | cut -d - -f1 | sed 's/ //g'`.value $OUT"
echo "comp_byp`echo $i | md5sum | cut -d - -f1 | sed 's/ //g'`.value $BY"
done


@@ -42,7 +42,7 @@ function parse_url {
PXNAME="$1"
SVNAME="$2"
VALUE="$3"

if [ ! -z "$url" ]; then
LINE1=`curl -s "$url" | head -1 | sed 's/# //'`
LINE2=`curl -s "$url" | grep "$PXNAME,$SVNAME"`
@@ -52,7 +52,7 @@ function parse_url {
LINE1=`echo 'show stat' | socat unix-connect:"$socket" stdio | head -1 | sed 's/# //'`
LINE2=`echo 'show stat' | socat unix-connect:"$socket" stdio | grep "$PXNAME,$SVNAME"`
fi

ARRAY1=($LINE1);

# Find values
@@ -75,7 +75,7 @@ LIST=$frontend


if [ "$1" = "autoconf" ]; then
echo yes
echo yes
exit 0
fi

@@ -110,5 +110,5 @@ fi
BOUT=`parse_url ${i} ${SVNAME} bout`
echo "down`echo $i | md5sum | cut -d - -f1 | sed 's/ //g'`.value $BOUT"
echo "up`echo $i | md5sum | cut -d - -f1 | sed 's/ //g'`.value $BIN"
done
done

@@ -42,7 +42,7 @@ function parse_url {
PXNAME="$1"
SVNAME="$2"
VALUE="$3"

if [ ! -z "$url" ]; then
LINE1=`curl -s "$url" | head -1 | sed 's/# //'`
LINE2=`curl -s "$url" | grep "$PXNAME,$SVNAME"`
@@ -52,7 +52,7 @@ function parse_url {
LINE1=`echo 'show stat' | socat unix-connect:"$socket" stdio | head -1 | sed 's/# //'`
LINE2=`echo 'show stat' | socat unix-connect:"$socket" stdio | grep "$PXNAME,$SVNAME"`
fi

ARRAY1=($LINE1);

# Find values
@@ -76,7 +76,7 @@ LIST="$backend"


if [ "$1" = "autoconf" ]; then
echo yes
echo yes
exit 0
fi

@@ -111,5 +111,5 @@ fi
echo "dreq`echo $i | md5sum | cut -d - -f1 | sed 's/ //g'`.value $DREQ"
echo "dresp`echo $i | md5sum | cut -d - -f1 | sed 's/ //g'`.value $DRESP"
done


@@ -42,7 +42,7 @@ function parse_url {
PXNAME="$1"
SVNAME="$2"
VALUE="$3"

if [ ! -z "$url" ]; then
LINE1=`curl -s "$url" | head -1 | sed 's/# //'`
LINE2=`curl -s "$url" | grep "$PXNAME,$SVNAME"`
@@ -52,7 +52,7 @@ function parse_url {
LINE1=`echo 'show stat' | socat unix-connect:"$socket" stdio | head -1 | sed 's/# //'`
LINE2=`echo 'show stat' | socat unix-connect:"$socket" stdio | grep "$PXNAME,$SVNAME"`
fi

ARRAY1=($LINE1);

# Find values
@@ -76,7 +76,7 @@ LIST="$frontend"


if [ "$1" = "autoconf" ]; then
echo yes
echo yes
exit 0
fi

@@ -111,5 +111,5 @@ fi
echo "dreq`echo $i | md5sum | cut -d - -f1 | sed 's/ //g'`.value $DREQ"
echo "dresp`echo $i | md5sum | cut -d - -f1 | sed 's/ //g'`.value $DRESP"
done


@@ -42,7 +42,7 @@ function parse_url {
PXNAME="$1"
SVNAME="$2"
VALUE="$3"

if [ ! -z "$url" ]; then
LINE1=`curl -s "$url" | head -1 | sed 's/# //'`
LINE2=`curl -s "$url" | grep "$PXNAME,$SVNAME"`
@@ -52,7 +52,7 @@ function parse_url {
LINE1=`echo 'show stat' | socat unix-connect:"$socket" stdio | head -1 | sed 's/# //'`
LINE2=`echo 'show stat' | socat unix-connect:"$socket" stdio | grep "$PXNAME,$SVNAME"`
fi

ARRAY1=($LINE1);

# Find values
@@ -76,7 +76,7 @@ LIST="$backend"


if [ "$1" = "autoconf" ]; then
echo yes
echo yes
exit 0
fi

@@ -119,5 +119,5 @@ fi
echo "econ`echo $i | md5sum | cut -d - -f1 | sed 's/ //g'`.value $ECON"
echo "eresp`echo $i | md5sum | cut -d - -f1 | sed 's/ //g'`.value $ERESP"
done


@@ -42,7 +42,7 @@ function parse_url {
PXNAME="$1"
SVNAME="$2"
VALUE="$3"

if [ ! -z "$url" ]; then
LINE1=`curl -s "$url" | head -1 | sed 's/# //'`
LINE2=`curl -s "$url" | grep "$PXNAME,$SVNAME"`
@@ -52,7 +52,7 @@ function parse_url {
LINE1=`echo 'show stat' | socat unix-connect:"$socket" stdio | head -1 | sed 's/# //'`
LINE2=`echo 'show stat' | socat unix-connect:"$socket" stdio | grep "$PXNAME,$SVNAME"`
fi

ARRAY1=($LINE1);

# Find values
@@ -76,7 +76,7 @@ LIST="$frontend"


if [ "$1" = "autoconf" ]; then
echo yes
echo yes
exit 0
fi

@@ -119,5 +119,5 @@ fi
#echo "econ`echo $i | md5sum | cut -d - -f1 | sed 's/ //g'`.value $ECON"
#echo "eresp`echo $i | md5sum | cut -d - -f1 | sed 's/ //g'`.value $ERESP"
done


@@ -42,7 +42,7 @@ function parse_url {
PXNAME="$1"
SVNAME="$2"
VALUE="$3"

if [ ! -z "$url" ]; then
LINE1=`curl -s "$url" | head -1 | sed 's/# //'`
LINE2=`curl -s "$url" | grep "$PXNAME,$SVNAME"`
@@ -52,7 +52,7 @@ function parse_url {
LINE1=`echo 'show stat' | socat unix-connect:"$socket" stdio | head -1 | sed 's/# //'`
LINE2=`echo 'show stat' | socat unix-connect:"$socket" stdio | grep "$PXNAME,$SVNAME"`
fi

ARRAY1=($LINE1);

# Find values
@@ -78,7 +78,7 @@ WARN_PERCENT="80"


if [ "$1" = "autoconf" ]; then
echo yes
echo yes
exit 0
fi

@@ -102,7 +102,7 @@ if [ "$1" = "config" ]; then
#echo "qmax`echo $i | md5sum | cut -d - -f1 | sed 's/ //g'`.type GAUGE"
#echo "qmax`echo $i | md5sum | cut -d - -f1 | sed 's/ //g'`.min 0"
#echo "qmax`echo $i | md5sum | cut -d - -f1 | sed 's/ //g'`.info Max queued request $i"

echo "qlim`echo $i | md5sum | cut -d - -f1 | sed 's/ //g'`.label Limit request `echo $i | awk -F. '{print $NF}'`"
echo "qlim`echo $i | md5sum | cut -d - -f1 | sed 's/ //g'`.type GAUGE"
echo "qlim`echo $i | md5sum | cut -d - -f1 | sed 's/ //g'`.min 0"
@@ -129,5 +129,5 @@ fi
echo "qlim`echo $i | md5sum | cut -d - -f1 | sed 's/ //g'`.value $QLIM"
#echo "qmax`echo $i | md5sum | cut -d - -f1 | sed 's/ //g'`.value $QMAX"
done


@@ -42,7 +42,7 @@ function parse_url {
PXNAME="$1"
SVNAME="$2"
VALUE="$3"

if [ ! -z "$url" ]; then
LINE1=`curl -s "$url" | head -1 | sed 's/# //'`
LINE2=`curl -s "$url" | grep "$PXNAME,$SVNAME"`
@@ -52,7 +52,7 @@ function parse_url {
LINE1=`echo 'show stat' | socat unix-connect:"$socket" stdio | head -1 | sed 's/# //'`
LINE2=`echo 'show stat' | socat unix-connect:"$socket" stdio | grep "$PXNAME,$SVNAME"`
fi

ARRAY1=($LINE1);

# Find values
@@ -76,7 +76,7 @@ LIST=$backend
WARN_PERCENT="80"

if [ "$1" = "autoconf" ]; then
echo yes
echo yes
exit 0
fi

@@ -128,5 +128,5 @@ fi
echo "rate_lim`echo $i | md5sum | cut -d - -f1 | sed 's/ //g'`.value $RATEL"
#echo "rate_max`echo $i | md5sum | cut -d - -f1 | sed 's/ //g'`.value $RATEM"
done


@@ -42,7 +42,7 @@ function parse_url {
PXNAME="$1"
SVNAME="$2"
VALUE="$3"

if [ ! -z "$url" ]; then
LINE1=`curl -s "$url" | head -1 | sed 's/# //'`
LINE2=`curl -s "$url" | grep "$PXNAME,$SVNAME"`
@@ -52,7 +52,7 @@ function parse_url {
LINE1=`echo 'show stat' | socat unix-connect:"$socket" stdio | head -1 | sed 's/# //'`
LINE2=`echo 'show stat' | socat unix-connect:"$socket" stdio | grep "$PXNAME,$SVNAME"`
fi

ARRAY1=($LINE1);

# Find values
@@ -77,7 +77,7 @@ WARN_PERCENT="80"


if [ "$1" = "autoconf" ]; then
echo yes
echo yes
exit 0
fi

@@ -128,5 +128,5 @@ fi
echo "rate_lim`echo $i | md5sum | cut -d - -f1 | sed 's/ //g'`.value $RATEL"
#echo "rate_max`echo $i | md5sum | cut -d - -f1 | sed 's/ //g'`.value $RATEM"
done


@@ -42,7 +42,7 @@ function parse_url {
PXNAME="$1"
SVNAME="$2"
VALUE="$3"

if [ ! -z "$url" ]; then
LINE1=`curl -s "$url" | head -1 | sed 's/# //'`
LINE2=`curl -s "$url" | grep "$PXNAME,$SVNAME"`
@@ -52,7 +52,7 @@ function parse_url {
LINE1=`echo 'show stat' | socat unix-connect:"$socket" stdio | head -1 | sed 's/# //'`
LINE2=`echo 'show stat' | socat unix-connect:"$socket" stdio | grep "$PXNAME,$SVNAME"`
fi

ARRAY1=($LINE1);

# Find values
@@ -76,7 +76,7 @@ LIST="$frontend"


if [ "$1" = "autoconf" ]; then
echo yes
echo yes
exit 0
fi

@@ -112,5 +112,5 @@ fi
echo "reqrt`echo $i | md5sum | cut -d - -f1 | sed 's/ //g'`.value $REQRT"
#echo "reqtm`echo $i | md5sum | cut -d - -f1 | sed 's/ //g'`.value $REQRTM"
done


@@ -50,9 +50,9 @@ function parse_url {

if [ ! -z "$socket" ]; then
LINE1=`echo 'show stat' | socat unix-connect:"$socket" stdio | head -1 | sed 's/# //'`
LINE2=`echo 'show stat' | socat unix-connect:"$socket" stdio | grep "$PXNAME,$SVNAME"`
LINE2=`echo 'show stat' | socat unix-connect:"$socket" stdio | grep "$PXNAME,$SVNAME"`
fi

ARRAY1=($LINE1);

# Find values
@@ -76,7 +76,7 @@ LIST="$backend"


if [ "$1" = "autoconf" ]; then
echo yes
echo yes
exit 0
fi

@@ -105,5 +105,5 @@ fi

echo "comp_rsp`echo $i | md5sum | cut -d - -f1 | sed 's/ //g'`.value $RSP"
done


@@ -50,9 +50,9 @@ function parse_url {

if [ ! -z "$socket" ]; then
LINE1=`echo 'show stat' | socat unix-connect:"$socket" stdio | head -1 | sed 's/# //'`
LINE2=`echo 'show stat' | socat unix-connect:"$socket" stdio | grep "$PXNAME,$SVNAME"`
LINE2=`echo 'show stat' | socat unix-connect:"$socket" stdio | grep "$PXNAME,$SVNAME"`
fi

ARRAY1=($LINE1);

# Find values
@@ -76,7 +76,7 @@ LIST="$frontend"


if [ "$1" = "autoconf" ]; then
echo yes
echo yes
exit 0
fi

@@ -105,5 +105,5 @@ fi

echo "comp_rsp`echo $i | md5sum | cut -d - -f1 | sed 's/ //g'`.value $RSP"
done


@@ -75,7 +75,7 @@ SVNAME='BACKEND'
LIST=$backend

if [ "$1" = "autoconf" ]; then
echo yes
echo yes
exit 0
fi

@@ -138,4 +138,4 @@ fi
echo "hrsp_5xx`echo $i | md5sum | cut -d - -f1 | sed 's/ //g'`.value $H5xx"
echo "hrsp_other`echo $i | md5sum | cut -d - -f1 | sed 's/ //g'`.value $Hoxx"
done

@@ -75,7 +75,7 @@ SVNAME='FRONTEND'
LIST=$frontend

if [ "$1" = "autoconf" ]; then
echo yes
echo yes
exit 0
fi

@@ -138,4 +138,4 @@ fi
echo "hrsp_5xx`echo $i | md5sum | cut -d - -f1 | sed 's/ //g'`.value $H5xx"
echo "hrsp_other`echo $i | md5sum | cut -d - -f1 | sed 's/ //g'`.value $Hother"
done

@@ -42,7 +42,7 @@ function parse_url {
PXNAME="$1"
SVNAME="$2"
VALUE="$3"

if [ ! -z "$url" ]; then
LINE1=`curl -s "$url" | head -1 | sed 's/# //'`
LINE2=`curl -s "$url" | grep "$PXNAME,$SVNAME"`
@@ -52,7 +52,7 @@ function parse_url {
LINE1=`echo 'show stat' | socat unix-connect:"$socket" stdio | head -1 | sed 's/# //'`
LINE2=`echo 'show stat' | socat unix-connect:"$socket" stdio | grep "$PXNAME,$SVNAME"`
fi

ARRAY1=($LINE1);

# Find values
@@ -77,7 +77,7 @@ WARN_PERCENT="80"


if [ "$1" = "autoconf" ]; then
echo yes
echo yes
exit 0
fi

@@ -127,5 +127,5 @@ fi
#echo "smax`echo $i | md5sum | cut -d - -f1 | sed 's/ //g'`.value $SMAX"
echo "slim`echo $i | md5sum | cut -d - -f1 | sed 's/ //g'`.value $SLIM"
done


@@ -42,7 +42,7 @@ function parse_url {
PXNAME="$1"
SVNAME="$2"
VALUE="$3"

if [ ! -z "$url" ]; then
LINE1=`curl -s "$url" | head -1 | sed 's/# //'`
LINE2=`curl -s "$url" | grep "$PXNAME,$SVNAME"`
@@ -52,7 +52,7 @@ function parse_url {
LINE1=`echo 'show stat' | socat unix-connect:"$socket" stdio | head -1 | sed 's/# //'`
LINE2=`echo 'show stat' | socat unix-connect:"$socket" stdio | grep "$PXNAME,$SVNAME"`
fi

ARRAY1=($LINE1);

# Find values
@@ -77,7 +77,7 @@ WARN_PERCENT="80"


if [ "$1" = "autoconf" ]; then
echo yes
echo yes
exit 0
fi

@@ -127,5 +127,5 @@ fi
#echo "smax`echo $i | md5sum | cut -d - -f1 | sed 's/ //g'`.value $SMAX"
echo "slim`echo $i | md5sum | cut -d - -f1 | sed 's/ //g'`.value $SLIM"
done


@@ -42,7 +42,7 @@ function parse_url {
PXNAME="$1"
SVNAME="$2"
VALUE="$3"

if [ ! -z "$url" ]; then
LINE1=`curl -s "$url" | head -1 | sed 's/# //'`
LINE2=`curl -s "$url" | grep "$PXNAME,$SVNAME"`
@@ -52,7 +52,7 @@ function parse_url {
LINE1=`echo 'show stat' | socat unix-connect:"$socket" stdio | head -1 | sed 's/# //'`
LINE2=`echo 'show stat' | socat unix-connect:"$socket" stdio | grep "$PXNAME,$SVNAME"`
fi

ARRAY1=($LINE1);

# Find values
@@ -76,7 +76,7 @@ LIST=$backend


if [ "$1" = "autoconf" ]; then
echo yes
echo yes
exit 0
fi

@@ -105,5 +105,5 @@ fi

echo "stot`echo $i | md5sum | cut -d - -f1 | sed 's/ //g'`.value $STOT"
done


@@ -42,7 +42,7 @@ function parse_url {
PXNAME="$1"
SVNAME="$2"
VALUE="$3"

if [ ! -z "$url" ]; then
LINE1=`curl -s "$url" | head -1 | sed 's/# //'`
LINE2=`curl -s "$url" | grep "$PXNAME,$SVNAME"`
@@ -52,7 +52,7 @@ function parse_url {
LINE1=`echo 'show stat' | socat unix-connect:"$socket" stdio | head -1 | sed 's/# //'`
LINE2=`echo 'show stat' | socat unix-connect:"$socket" stdio | grep "$PXNAME,$SVNAME"`
fi

ARRAY1=($LINE1);

# Find values
@@ -77,7 +77,7 @@ LIST=$frontend


if [ "$1" = "autoconf" ]; then
echo yes
echo yes
exit 0
fi

@@ -106,5 +106,5 @@ fi

echo "stot`echo $i | md5sum | cut -d - -f1 | sed 's/ //g'`.value $STOT"
done


@@ -42,7 +42,7 @@ function parse_url {
PXNAME="$1"
SVNAME="$2"
VALUE="$3"

if [ ! -z "$url" ]; then
LINE1=`curl -s "$url" | head -1 | sed 's/# //'`
LINE2=`curl -s "$url" | grep "$PXNAME,$SVNAME"`
@@ -52,7 +52,7 @@ function parse_url {
LINE1=`echo 'show stat' | socat unix-connect:"$socket" stdio | head -1 | sed 's/# //'`
LINE2=`echo 'show stat' | socat unix-connect:"$socket" stdio | grep "$PXNAME,$SVNAME"`
fi

ARRAY1=($LINE1);

# Find values
@@ -76,7 +76,7 @@ LIST="$backend"


if [ "$1" = "autoconf" ]; then
echo yes
echo yes
exit 0
fi

@@ -112,5 +112,5 @@ fi
echo "wretr`echo $i | md5sum | cut -d - -f1 | sed 's/ //g'`.value $WRETR"
echo "wredis`echo $i | md5sum | cut -d - -f1 | sed 's/ //g'`.value $WREDIS"
done


@@ -12,7 +12,7 @@ case $1 in
cat <<EOM
graph_title Power State (/dev/$device)
graph_vlabel Power State
graph_category sensors
graph_category disk
power.label power
graph_info The power state of drives on the system.
power.info The power state of the drive (1 is on, 0 is off)
@@ -143,7 +143,7 @@ if (! -f $logfile) {
($pos) = restore_state();

if (!defined($pos)) {

# No state file present. Avoid startup spike: Do not read log
# file up to now, but remember how large it is now, and next
# time read from there.
@@ -1,14 +1,14 @@
#!/usr/bin/perl
use strict;

# HTTP response times for either entire page views
# HTTP response times for either entire page views
# or just the index, depending on configuration.
# Full or index resource pulling is determined by the suffix of the
# Full or index resource pulling is determined by the suffix of the
# script name. ie. http_response_full or http_response_index
#

# Parameters:
#
#
# config
#
# Configuration variables:
@@ -52,13 +52,13 @@ if (! @urls) {

#output configuration and exit - required by Munin
if (exists $ARGV[0] and $ARGV[0] eq "config") {
print "graph_title $domain Site Response Times - $ENV{'action'}\n";
print "graph_title $domain Site Response Times - $ENV{'action'}\n";
print "graph_category webserver\n";
print "graph_vlabel request time (seconds)\n";
print "graph_info Response times for public areas of $domain.\n";

foreach my $url (@urls) {
my $label = $url;
my $label = $url;
#fix up our label name to be a valid variable name
$label =~ s@[^A-Za-z0-9_]@_@g;
print "$label.label $url\n";
@@ -73,7 +73,7 @@ if (exists $ARGV[0] and $ARGV[0] eq "config") {

#function to make the request and get the response time
sub req_time {
my $url = shift;
my $url = shift;
my $time;
my $outdir = '/tmp/munin/' . int(rand(32000));
system("mkdir -p $outdir");
@@ -88,7 +88,7 @@ sub req_time {

#loop over every url and output the responses
foreach my $url (@urls) {
my $label = $url;
my $label = $url;
#fix up our label name to be a valid name
$label =~ s@[^A-Za-z0-9_]@_@g;
print "$label.value " . req_time($domain.$url);
@@ -21,9 +21,9 @@ This version supports monitoring:

=head1 REQUIREMENTS

- The server running this plugin must be allowed to connect to the web
- The server running this plugin must be allowed to connect to the web
server(s) you are going to monitor.
- Some perl modules:
- Some perl modules:
Time::HiRes, LWP::UserAgent, HTML::LinkExtor, LWP::ConnCache

=head1 CONFIGURATION
@@ -131,7 +131,7 @@ sub read_urls{
my %urls=();
if(-r $file){
open(FILE,'<'.$file);
while (<FILE>) {
while (<FILE>) {
my $url=$_;
chomp($url);
my $id=get_id($url);
@@ -150,7 +150,7 @@ sub read_cache{
my %cache=();
if(-r $file){
open(FILE,'<'.$file);
while (<FILE>) {
while (<FILE>) {
m/^(\S*)\s+(.*)$/;
$cache{ $1 } = $2;
}
@@ -297,7 +297,7 @@ sub loadtime_config{
print "graph_total Total\n";
print "graph_info This graph is generated by a set of serial GETs to calculate the total time to load $urls{$id}. ";
print "Note that browsers usually fork() the GET requests, resulting in a shorter total loading time.\n";

if(keys(%cache)>0){
for my $key ( sort reverse keys %cache ){
my $value=$cache{$key};
@@ -496,7 +496,7 @@ sub cache_values{
my $value=$cache{$key};
if($key =~ m/^([A-Za-z]+)\_(\S+)$/){
my $name=$2;

if ($1 eq $type){
$name=get_fieldname($name);
print $name . ".value " . $value . "\n";
@@ -609,7 +609,7 @@ if($ARGV[0] and $ARGV[0] eq "autoconf") {
exit(0);

} elsif($ARGV[0] and $ARGV[0] eq "cron") {
# This thing is run by cron and should write a cache file for munin-node to
# This thing is run by cron and should write a cache file for munin-node to
# read from

my $verbose=0;
@@ -629,7 +629,7 @@ if($ARGV[0] and $ARGV[0] eq "autoconf") {

while ( my ($id, $url) = each(%urls) ) {
$verbose && print "Fetching $url (id: $id)... \n";

$t0=0;
$status=0;
%output=();
@@ -682,7 +682,7 @@ if($ARGV[0] and $ARGV[0] eq "autoconf") {
$tag=$$link[0] . " " . $$link[1];
}
$output{"tags_" . $$link[0] . "-" . $$link[1]}+=1;

if(filter($tag)){
$verbose && print " Processing: " . $$link[0] . " " . $$link[1] . " " . $$link[2] . "\n";

@@ -693,7 +693,7 @@ if($ARGV[0] and $ARGV[0] eq "autoconf") {
}

my $suburl=$$link[2];

$t0 = [gettimeofday];
$response = $browser->get($suburl);
$output{"loadtime_" . $host} += sprintf("%.6f",tv_interval ( $t0, [gettimeofday]));
@@ -720,13 +720,13 @@ if($ARGV[0] and $ARGV[0] eq "autoconf") {
while ( my ($id, $value) = each(%input) ) {
$input{$id}="U";
}

# Adding new values
while ( my ($id, $value) = each(%output) ) {
$input{$id}=$value;
$verbose && print " Result: " . $id . " -> " . $value . "\n";
}

# Writing the cache
$verbose && print "Writing cache file: " . $cachefile . "... ";
open(FILE,">".$cachefile);
@@ -739,7 +739,7 @@ if($ARGV[0] and $ARGV[0] eq "autoconf") {
exit(0);
}elsif($ARGV[0] and $ARGV[0] eq "config") {
my %urls=&read_urls($url_file);

$debug && print "Reading cache file\n";
my $cachefile=$cachedir . "/" . &get_cache_file_name($scriptname,$id);
my %cache=read_cache($cachefile);
@@ -773,6 +773,6 @@ if($ARGV[0] and $ARGV[0] eq "autoconf") {
} else {
cache_values(\%cache, $type);
}
}
}

# vim:syntax=perl
@@ -4,7 +4,7 @@

This plugin does http requests to specified URLs and takes the response time.
Use it to monitor remote sites.

LWP::UserAgent and Time::HiRes are required

=head1 CONFIGURATION
@@ -70,7 +70,7 @@ for (my $i = 1; $ENV{"url$i"}; $i++)
my $proxy = $ENV{"url${i}_proxy"};
my $name = $ENV{"url${i}_name"} || clean($url);
my $label = $ENV{"url${i}_label"} || $url;

$URLS{$name}={
url=>$url,
proxy=>$proxy,
@@ -161,7 +161,7 @@ foreach my $name (keys %URLS) {

if ($response->is_success) {
$$url{'time'}=sprintf("%d",tv_interval($t1,$t2)*1000);
};
};
};

print("multigraph http_request_time\n");
@@ -4,34 +4,34 @@
# Copyright (C) 2009 Matthias Marschall - mm@agileweboperations.com
#
# Based on:
# mongrel_process_memory - A munin plugin to monitor memory size of
# mongrel_process_memory - A munin plugin to monitor memory size of
# each individual mongrel process
# Copyright (C) 2007 Ben VandenBos and Avvo, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2
# it under the terms of the GNU General Public License version 2
# as published by the Free Software Foundation.
#
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Author: Ben VandenBos
# Contributors: Adam Jacob (<adam@hjksolutions.com>)
# Ryan Woodrum
# Ryan Woodrum
# Matthias Marschall (mm@agileweboperations.com)
#
#%# family=auto
#%# capabilities=autoconf

module Munin
class MongrelProcessMemory

def run
pid_port_map = get_pids()
port_list = Hash.new
@@ -40,7 +40,7 @@ module Munin
puts "mongrel_#{port}.value #{rss}"
end
end

def get_pids
h = Hash.new
pids = []
@@ -57,17 +57,17 @@ module Munin
def autoconf
get_pids().length > 0
end

end
end

mpm = Munin::MongrelProcessMemory.new

case ARGV[0]
when "config"
puts "graph_title Mongrel Memory"
puts "graph_vlabel RSS"
puts "graph_category Memory"
puts "graph_category memory"
puts "graph_args --base 1024 -l 0"
puts "graph_scale yes"
puts "graph_info Tracks the size of individual mongrel processes"
@@ -1,32 +1,32 @@
#!/usr/bin/env ruby
#
# mongrel_process_memory - A munin plugin to monitor memory size of
# mongrel_process_memory - A munin plugin to monitor memory size of
# each individual mongrel process
# Copyright (C) 2007 Ben VandenBos and Avvo, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2
# it under the terms of the GNU General Public License version 2
# as published by the Free Software Foundation.
#
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Author: Ben VandenBos
# Contributors: Adam Jacob (<adam@hjksolutions.com>)
# Ryan Woodrum
# Ryan Woodrum
#
#%# family=auto
#%# capabilities=autoconf

module Munin
class MongrelProcessMemory

def run
h = get_pids()
ps_output = ""
@@ -49,10 +49,10 @@ module Munin
port_list.sort.each do |port|
puts "mongrel_#{port[0]}.value #{port[1]}"
end
end

end
end

def get_pids
h = Hash.new
pids = []
@@ -68,17 +68,17 @@ module Munin
def autoconf
pids.length > 0
end

end
end

mpm = Munin::MongrelProcessMemory.new

case ARGV[0]
when "config"
puts "graph_title Mongrel Memory"
puts "graph_vlabel RSS"
puts "graph_category Memory"
puts "graph_category memory"
puts "graph_args --base 1024 -l 0"
puts "graph_scale yes"
puts "graph_info Tracks the size of individual mongrel processes"
@@ -1,7 +1,7 @@
#! /usr/bin/perl
# This plugin based on http_responestime designed by Anders Nordby
#
# It is written to control the quality of an internet conneting by
# It is written to control the quality of an internet conneting by
# downloading a favicon.ico file from a lot - unlimited - count of
# domains.
#
@@ -100,11 +100,11 @@ if ($ARGV[0] && $ARGV[0] eq "autoconf") {
$vhost =~ s@^\w+://(.+?)/.*@\1@;
$proto =~ s@^(\w+)://.*@\1@;

# If url_array[] is a domain, vhost will be contain the the strinf "http://"
# If url_array[] is a domain, vhost will be contain the the strinf "http://"
if($vhost =~ /http/) {
print "timespent$i.label $vhost\n";
} else {
print "timespent$i.label $proto://$vhost\n";
print "timespent$i.label $proto://$vhost\n";
}

print "timespent$i.info Ladezeit von $url_array[$i]/favicon.ico\n";
@@ -1,21 +1,21 @@
#!/bin/sh
#
#
# Plugin to monitor icecast2 streams / listeners
#
#
# Contributed by drew Roberts
#
# based on the postfix_mailqueue plugin as per below
#
#
# Plugin to monitor postfix mail spools
#
#
# Contributed by Nicolai Langfeldt
#
#
# $Log$
# Revision 1.0 2008/07/04 16:02:36 zotz
# Initial work

#
#
#
#%# family=auto
#%# capabilities=autoconf

@@ -147,7 +147,7 @@ def hent_XML():
print "%s_%s_ogg.value %s" % (sourcename, bitrate, listeners)
else:
print sys.argv[1]


if __name__ == "__main__":
hent_XML()
@@ -66,7 +66,7 @@ def hent_XML():
print "%s.label %s" % (source, "/" + source)
else:
print sys.argv[1]


if __name__ == "__main__":
hent_XML()
@@ -1,7 +1,7 @@
#!/usr/bin/env ruby
#
# Plugin author: Gunnar Wolf <gwolf@gwolf.org>
#
#
# You are hereby granted authorization to copy, use, modify, distribute,
# and in general do anything you please with this plugin. It is too simple
# even to GPL-protect it.
@@ -18,7 +18,7 @@ require 'open-uri'

def get_conf
# Default values
conf = {:host => '127.0.0.1', :port => 8000,
conf = {:host => '127.0.0.1', :port => 8000,
:username => 'admin', :password => 'hackme' }
conf.keys.each do |key|
env_key = sprintf('icecast_%s', key)
@@ -28,10 +28,10 @@ def get_conf
end

def get_data(conf)
begin
data = Hpricot(open(sprintf('http://%s:%s/admin/stats',
begin
data = Hpricot(open(sprintf('http://%s:%s/admin/stats',
conf[:host], conf[:port]),
:http_basic_authentication=>[conf[:username],
:http_basic_authentication=>[conf[:username],
conf[:password]]))
rescue OpenURI::HTTPError
puts "Cannot connect: HTTP connection error"
@@ -50,7 +50,7 @@ pw = "yourpassword"
#exclude = ("123.123.123.123",)
exclude = ()

# Exclude these sources from calculation. This is useful to excluse special sources like
# Exclude these sources from calculation. This is useful to excluse special sources like
# fallback sources which doesn't expose the same informations and then break this script
# Ever add fallback sources to this list
#source_exclude = ["/fallback.mp3", "/fallback.ogg"]
@@ -141,7 +141,7 @@ except IndexError:
if plugin_name == "icecast_uptime":
for s in sources:
print "%s.value %s" % (s["mount"].strip("/").replace(".","_").replace("-","_"), int(s["connected"]) / 3600.)

elif plugin_name == "icecast_traffic":
f = opener.open("http://%s/admin/stats.xml" % server)
tree = ElementTree()
@@ -1,7 +1,7 @@
#!/usr/bin/env python

"""=cut
=head1 NAME
=head1 NAME

imapproxy - Munin multigraph plugin to monitor imapproxy using pimpstat

@@ -55,7 +55,7 @@ def print_config():
print "cache_misses.type DERIVE"
print "cache_misses.label Cache Misses"
print "cache_misses.min 0"
print
print
print "multigraph imapproxy_connections"
print "graph_title Connection Statistics For ImapProxy"
print "graph_args -l 0 --base 1000"
@@ -79,7 +79,7 @@ def print_fetch():
connections_created = 0
connections_reused = 0
connections = Popen(
"pimpstat -c | egrep '(Total (Reused|Created)|Cache (Hits|Misses))'",
"pimpstat -c | egrep '(Total (Reused|Created)|Cache (Hits|Misses))'",
shell=True,
stdout=PIPE
)
@@ -1,6 +1,6 @@
#!/bin/sh
#
# Patched version of ip_ plugin to support IPv6 and ip6tables.
# Patched version of ip_ plugin to support IPv6 and ip6tables.
# Most of plugin done by munin core developers. Modified for IPv6 support
# by Lasse Karstensen <lasse.karstensen@gmail.com> February 2009.
#
@@ -60,7 +60,7 @@ if [ "$1" = "config" ]; then
echo 'in.label received'
echo 'in.type DERIVE'
echo 'in.min 0'
echo 'in.cdef in,8,*'
echo 'in.cdef in,8,*'
exit 0
fi;

@@ -35,7 +35,7 @@ IPLIST=$ips


if [ "$1" = "autoconf" ]; then
echo yes
echo yes
exit 0
fi

@@ -64,7 +64,7 @@ fi
function get_ip {
# Read the output
ipvsadm -l -n | nl | while read line; do
# If match the ip, print the line number
# If match the ip, print the line number
if ( echo $line | grep -e $IP > /dev/null ); then
MAT=`echo $line | cut -d " " -f 1`
echo $MAT
@@ -84,7 +84,7 @@ for IP in $IPLIST; do

# Parse lines
while read line; do

# Get line numbers
N=`echo $line | cut -d " " -f 1`

@@ -94,7 +94,7 @@ for IP in $IPLIST; do
if ( echo $line | grep -e TCP -e UDP > /dev/null ); then
break
fi

COUNT=`expr $COUNT + 1`
fi
done < $F1
@@ -35,7 +35,7 @@ IPLIST=$ips


if [ "$1" = "autoconf" ]; then
echo yes
echo yes
exit 0
fi

@@ -35,7 +35,7 @@ IPLIST=$ips


if [ "$1" = "autoconf" ]; then
echo yes
echo yes
exit 0
fi

@@ -67,7 +67,7 @@ fi
function get_ip {
# Read the output
ipvsadm -l -n | nl | while read line; do
# If match the ip, print the line number
# If match the ip, print the line number
if ( echo $line | grep -e $IP > /dev/null ); then
MAT=`echo $line | cut -d " " -f 1`
echo $MAT
@@ -87,7 +87,7 @@ for IP in $IPLIST; do

# Parse lines
while read line; do

# Get line numbers
N=`echo $line | cut -d " " -f 1`

@@ -97,7 +97,7 @@ for IP in $IPLIST; do
if ( echo $line | grep -e TCP -e UDP > /dev/null ); then
break
fi

# Get ActiveConn number
NUM1=`echo $line | awk '{print $6}'`
# Sum it
@@ -106,7 +106,7 @@ for IP in $IPLIST; do
NUM2=`echo $line | awk '{print $7}'`
# Sum it
INACTCONCNT=$(( INACTCONCNT + NUM2))

COUNT=`expr $COUNT + 1`
fi
done < $F1
@@ -35,7 +35,7 @@ IPLIST=$ips


if [ "$1" = "autoconf" ]; then
echo yes
echo yes
exit 0
fi

@@ -66,7 +66,7 @@ if($ARGV[0] and $ARGV[0] eq "config") {
my %result;

# We create a new PoCo-IRC object
my $irc = POE::Component::IRC->spawn(
my $irc = POE::Component::IRC->spawn(
nick => $nickname,
ircname => $ircname,
server => $server,
@@ -119,7 +119,7 @@ sub irc_001 {
}


#irc_251: 'moo.us.p2p-network.net' 'There are 155 users and 3397 invisible on 16 servers' [There are 155 users and 3397 invisible on 16 servers]
#irc_251: 'moo.us.p2p-network.net' 'There are 155 users and 3397 invisible on 16 servers' [There are 155 users and 3397 invisible on 16 servers]
# luserclient
sub irc_251 {
#print "In 251\n";
@@ -152,7 +152,7 @@ sub irc_251 {
#printf "251 Got clients=%d servers=%d\n", ($result{'clients'} || -1), ($result{'servers'} || -1);
}

#irc_252: 'moo.us.p2p-network.net' '18 :operator(s) online' [18, operator(s) online]
#irc_252: 'moo.us.p2p-network.net' '18 :operator(s) online' [18, operator(s) online]
# opers
sub irc_252 {
my $sender = $_[SENDER];
@@ -165,7 +165,7 @@ sub irc_252 {
#printf "254 Got channels %d\n", ($result{'channels'} || -1);
}

#irc_253: 'moo.us.p2p-network.net' '1 :unknown connection(s)' [1, unknown connection(s)]
#irc_253: 'moo.us.p2p-network.net' '1 :unknown connection(s)' [1, unknown connection(s)]
sub irc_253 {
my $sender = $_[SENDER];
my $irc = $sender->get_heap();
@@ -177,7 +177,7 @@ sub irc_253 {
#printf "254 Got channels %d\n", ($result{'channels'} || -1);
}

#irc_254: 'moo.us.p2p-network.net' '1325 :channels formed' [1325, channels formed]
#irc_254: 'moo.us.p2p-network.net' '1325 :channels formed' [1325, channels formed]
# luserchannels
sub irc_254 {
my $sender = $_[SENDER];
@@ -190,7 +190,7 @@ sub irc_254 {
#printf "254 Got channels %d\n", ($result{'channels'} || -1);
}

#irc_255: 'moo.us.p2p-network.net' 'I have 348 clients and 1 servers' [I have 348 clients and 1 servers]
#irc_255: 'moo.us.p2p-network.net' 'I have 348 clients and 1 servers' [I have 348 clients and 1 servers]
# local clients/servers
sub irc_255 {
my $sender = $_[SENDER];
@@ -203,7 +203,7 @@ sub irc_255 {
}
}

#irc_265: 'moo.us.p2p-network.net' 'Current Local Users: 348 Max: 1900' [Current Local Users: 348 Max: 1900]
#irc_265: 'moo.us.p2p-network.net' 'Current Local Users: 348 Max: 1900' [Current Local Users: 348 Max: 1900]
sub irc_265 {
#print "In 265\n";
my $sender = $_[SENDER];
@@ -216,7 +216,7 @@ sub irc_265 {
}
}

#irc_266: 'moo.us.p2p-network.net' 'Current Global Users: 3552 Max: 8742' [Current Global Users: 3552 Max: 8742]
#irc_266: 'moo.us.p2p-network.net' 'Current Global Users: 3552 Max: 8742' [Current Global Users: 3552 Max: 8742]
sub irc_266 {
#print "In 266\n";
my $sender = $_[SENDER];
@@ -2,12 +2,12 @@
<?php
#
# IRCd Monitoring for Munin
#
#
# by Martin Weinelt
#
# $Log$
# Revision 1.0 2009/09/16 05:03:31 UTC hexa-
# Initial Release featuring
# Initial Release featuring
# autoconf-support,
# reading user/channels/operators count
#
@@ -39,7 +39,7 @@ The following environment variables may be defined :
=head1 COPYRIGHT
Copyright Jose-Marcio Martins da Cruz

=head1 VERSION
=head1 VERSION

1.0 - Feb 2014

@@ -99,7 +99,7 @@ if (exists $ENV{statefile} && defined $ENV{statefile}) {
#
#
if ($#ARGV >= 0 && $ARGV[0] eq "autoconf") {

unless (-f $SMCF) {
print "no\n";
exit 0;
@@ -433,7 +433,7 @@ sub SaveState {
printf FSTATE "%-20s %s\n", $k, $h->{$k};
}
close FSTATE;

Munin::Plugin::save_state(%$h);
return 1;
}
@@ -516,7 +516,7 @@ __DATA__
conn Connections
conn.info SMTP Connections per time unit
msgs Messages
msgs.info Messages per time unit
msgs.info Messages per time unit
rcpt Recipients
rcpt.info Recipients per time unit

@@ -556,8 +556,8 @@ kbytes.info Volume (KBytes) per time unit

j-greyvalid Grey Validated records
j-greyvalid.info Grey Validated records
j-greypend Grey Waiting records
j-greypend.info Grey Waiting records
j-greypend Grey Waiting records
j-greypend.info Grey Waiting records
j-greywhitelist Grey Whitelisted records
j-greywhitelist.info Grey Whitelisted records
j-greyblacklist j-greyblacklist
@@ -157,15 +157,15 @@ if ( exists $ARGV[0] and $ARGV[0] eq "config" ) {
print "graph_vlabel Executors\n";
print "graph_info The Graph shows the Jenkins Executors\n";
print "executors_offline.label offline\n";
print "executors_offline.type GAUGE\n";
print "executors_offline.type GAUGE\n";
print "executors_offline.draw AREA\n";
print "executors_offline.colour 8A8A8A\n";
print "executors_offline.colour 8A8A8A\n";
print "executors_busy.label busy\n";
print "executors_busy.type GAUGE\n";
print "executors_busy.type GAUGE\n";
print "executors_busy.draw STACK\n";
print "executors_idle.label idle\n";
print "executors_idle.type GAUGE\n";
print "executors_idle.draw STACK\n";
print "executors_idle.type GAUGE\n";
print "executors_idle.draw STACK\n";
}

} else {
@@ -249,18 +249,18 @@ if ( exists $ARGV[0] and $ARGV[0] eq "config" ) {
}

if( $type eq "executors" ) {
my $busyExecutors = $parsed->{'busyExecutors'};
my $totalExecutors = 0;
my $busyExecutors = $parsed->{'busyExecutors'};
my $totalExecutors = 0;
my $offlineExecutors = 0;
foreach my $cur(@{$parsed->{'computer'}}) {
$totalExecutors += $cur->{'numExecutors'};
if( $cur->{'offline'} =~ /true$/ ) {
$offlineExecutors += $cur->{'numExecutors'};
}
}
print "executors_idle.value ", ($totalExecutors - $busyExecutors - $offlineExecutors), "\n";
print "executors_busy.value $busyExecutors\n";
print "executors_offline.value $offlineExecutors\n";
print "executors_idle.value ", ($totalExecutors - $busyExecutors - $offlineExecutors), "\n";
print "executors_busy.value $busyExecutors\n";
print "executors_offline.value $offlineExecutors\n";
}
}

@@ -2,7 +2,7 @@ graph_args --upper-limit 100 -l 0
graph_scale no
graph_title CPU Usage
graph_vlabel 1000* CPU time %
graph_category Java
graph_category appserver
graph_order java_cpu_time java_cpu_user_time

java_cpu_time.label cpu
@@ -1,6 +1,6 @@
graph_title Process Memory
graph_vlabel Bytes
graph_category Java
graph_category appserver
graph_order java_memory_nonheap_committed java_memory_nonheap_max java_memory_nonheap_used java_memory_heap_committed java_memory_heap_max java_memory_heap_used os_memory_physical os_memory_vm

java_memory_nonheap_committed.label non-heap committed
@@ -42,5 +42,3 @@ os_memory_vm.label os vmem committed
os_memory_vm.jmxObjectName java.lang:type=OperatingSystem
os_memory_vm.jmxAttributeName CommittedVirtualMemorySize
os_memory_vm.graph no