1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-22 02:51:03 +00:00

remove plugins existing in the main munin distribution

This commit is contained in:
Kenyon Ralph 2012-05-04 02:54:55 -07:00
parent b084f05b70
commit 62d43835d4
19 changed files with 0 additions and 3254 deletions

View file

@ -1,99 +0,0 @@
#!/usr/bin/perl
#
# $Log$
# Revision 1.1 2004/01/02 18:50:00 jimmyo
# Renamed occurrances of lrrd -> munin
#
# Revision 1.1.1.1 2004/01/02 15:18:07 jimmyo
# Import of LRRD CVS tree after renaming to Munin
#
# Revision 1.3 2003/12/18 19:02:36 jimmyo
# Typo
#
# Revision 1.2 2003/12/18 17:14:24 jimmyo
# Added autoconf-support
#
# Revision 1.1 2003/11/10 18:51:50 jimmyo
# Initial entries
#
#%# family=manual
#%# capabilities=autoconf
my $ret = undef;
if (! eval "require Net::IRC;")
{
$ret = "Net::IRC not found";
}
if ($ARGV[0] and $ARGV[0] eq "autoconf")
{
if ($ret)
{
print "no ($ret)\n";
exit 1;
}
my $irc = new Net::IRC;
my $conn;
$irc = new Net::IRC; $conn = $irc->newconn(Nick => 'munin', Server => '192.168.1.1');
if (!$conn)
{
print "no (Couldn't connect to IRC server)\n";
exit 1;
}
print "yes\n";
exit 0;
}
if($ARGV[0] and $ARGV[0] eq "config") {
print "host_name $ENV{FQDN}\n";
print "graph_title ircd status\n";
print "graph_order clients channels\n";
print "graph_args -l 0\n";
print "clients.label clients\n";
print "clients.draw LINE2\n";
print "channels.label channels\n";
print "channels.draw LINE2\n";
exit 0;
}
my $irc = new Net::IRC;
my $conn = $irc->newconn(Nick => 'munin',
Server => '192.168.1.1');
my %result;
#$conn->debug(1);
sub luserclient {
my($self, $event) = @_;
if(($event->args)[1] =~ /There are (\d+) users and (\d+) invisible/) {
$result{'clients'} = $1 + $2 - 1; # don't count this script
}
}
sub luserchannels {
my($self, $event) = @_;
if(($event->args)[1] =~ /^(\d+)/) {
$result{'channels'} = $1;
}
}
sub quit {
my($self, $event) = @_;
open(STDERR, ">/dev/null");
$self->quit();
print "clients.value " . $result{'clients'} . "\n";
print "channels.value " . $result{'channels'} . "\n";
}
$conn->add_global_handler('endofmotd', \&quit);
$conn->add_global_handler('luserclient', \&luserclient);
$conn->add_global_handler('luserchannels', \&luserchannels);
while(1) {
$irc->do_one_loop();
}
# vim:syntax=perl

View file

@ -1,117 +0,0 @@
#!/bin/sh
#
# Plugin to graph perdition connections and errors
# Requires: logtail
#
# Copyright Micah Anderson <micah@riseup.net>
# Jan 23, 2005
#
#
#%# family=contrib
#%# capabilities=autoconf
# The different log lines we are interested in:
#
# buffy perdition[7583]: Connect: 64.45.82.181->69.50.164.185
# buffy perdition[20097]: Close: 217.19.50.108->69.50.74.154 user="mek" received=12 sent=23
# buffy perdition[7435]: Auth: 130.22.173.20->69.90.134.185 user="gotn" server="192.168.0.2" port="143" status="ok"
# buffy perdition[26986]: Auth: 72.13.2.186->69.92.134.215 user="moves" server="192.168.0.2" port="110" status="ok"
# Then there are some errors, I'm just going to put these all into one line, they could easily be
# separate out if we were interested in how many of each type of error, but 7 lines for this graph is a lot
# buffy perdition[20908]: Fatal Error reading authentication information from client "203.52.112.34->68.92.124.155": Exiting child
# buffy perdition[27754]: Fatal error establishing SSL connection to client
# buffy perdition[5139]: Fatal error negotiating setup. Exiting child.
# Changelog
# version 0.1 - Jan 23, 2005
# Micah Anderson <micah@riseup.net>
# - initial author
# version 0.2 - Oct 10, 2007
# Micah Anderson <micah@riseup.net>
# - fixed copyright and added changelog
# - added TMP env variable
# - set all TEMP_FILE variables to use $TMP
# Set the location of the perdition logs
PERDITION_LOG=${logfile:-/var/log/perdition.log}
OFFSET_FILE=/var/lib/munin/plugin-state/perdition.offset
LOGTAIL=${logtail:-/usr/sbin/logtail}
TMP=${TMP:-/tmp}
case `uname -s` in
Linux)
TEMP_FILE=`mktemp -p $TMP/ munin-perdition.XXXXXX`
if [ $? != 0 ]; then
TEMP_FILE=`mktemp $TMP/munin-perdition.XXXXXX`
fi
;;
FreeBSD)
TEMP_FILE=`mktemp -t $TMP`
STATUS=$?
;;
esac
if [ -z "$TEMP_FILE" ]; then
# Yes, this is unsafe
TEMP_FILE=$TMP/munin-perdition.$$
rm -rf $TEMP_FILE
touch $TEMP_FILE
fi
if [ ! -f "$TEMP_FILE" ]; then
exit 3
fi
case $1 in
autoconf|detect)
if [ -f ${PERDITION_LOG} -a -x ${LOGTAIL} ]
then
echo yes
exit 0
else
echo "no (either $PERDITION_LOG was not found, or logtail was not in your path)"
exit 1
fi
;;
config)
cat <<EOF
graph_title Perdition Connections
graph_vlabel Number of Connections
graph_total Total
connection.label connections
disconnected.label disconnections
imap.label IMAP Auths
pop.label POP Auths
fatal.label Fatal Errors
EOF
exit 0
;;
esac
ARGS=0
`$LOGTAIL /etc/hosts 2>/dev/null >/dev/null`
if [ $? = 66 ]; then
if [ ! -n "$logtail" ]; then
ARGS=1
fi
fi
if [ $ARGS != 0 ]; then
${LOGTAIL} -f ${PERDITION_LOG} -o ${OFFSET_FILE} > ${TEMP_FILE}
else
${LOGTAIL} ${PERDITION_LOG} ${OFFSET_FILE} > ${TEMP_FILE}
fi
connection=`grep "Connect:" ${TEMP_FILE} | wc -l`
disconnected=`grep "Close:" ${TEMP_FILE} | wc -l`
imap=`grep 'port="143" status="ok"' ${TEMP_FILE} | wc -l`
pop=`grep 'port="110" status="ok"' ${TEMP_FILE} | wc -l`
fatal=`grep 'Fatal [e|E]rror' ${TEMP_FILE} | wc -l`
rm ${TEMP_FILE}
echo "connection.value ${connection}"
echo "disconnected.value ${disconnected}"
echo "imap.value ${imap}"
echo "pop.value ${pop}"
echo "fatal.value ${fatal}"