mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-24 09:57:09 +00:00
Move some more plugins in their place.
This commit is contained in:
parent
3bb2c5e2aa
commit
d3a4f12d3f
14 changed files with 0 additions and 0 deletions
75
plugins/network/dns/pdns_rec_answers
Executable file
75
plugins/network/dns/pdns_rec_answers
Executable file
|
@ -0,0 +1,75 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# pdns_recursor munin plugin.
|
||||
# Written by Sean Reifschneider <jafo@tummy.com> 2009-12-03
|
||||
# Placed in the public domain
|
||||
#
|
||||
# Requires running as root:
|
||||
#
|
||||
# echo '[pdns_rec_*]' >/etc/munin/plugin-conf.d/pdns_rec
|
||||
# echo 'user root' >>/etc/munin/plugin-conf.d/pdns_rec
|
||||
|
||||
if [ "$1" = "autoconf" ]; then
|
||||
if [ -e /usr/bin/rec_control ]; then
|
||||
echo yes
|
||||
exit 0
|
||||
else
|
||||
echo no
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$1" = "config" ]; then
|
||||
echo 'graph_title PDNS Recursor Answer Times'
|
||||
echo 'graph_order a b c d e f'
|
||||
echo 'graph_vlabel queries'
|
||||
echo 'graph_info Time required per answer.'
|
||||
echo 'graph_category pdns'
|
||||
|
||||
echo 'a.label in 1ms'
|
||||
echo 'a.min 0'
|
||||
echo 'a.max 100000'
|
||||
echo 'a.type COUNTER'
|
||||
echo 'a.info Answers within 1ms.'
|
||||
|
||||
echo 'b.label in 10ms'
|
||||
echo 'b.min 0'
|
||||
echo 'b.max 100000'
|
||||
echo 'b.type COUNTER'
|
||||
echo 'b.info Answers from 1ms to 10ms.'
|
||||
|
||||
echo 'c.label in 100ms'
|
||||
echo 'c.min 0'
|
||||
echo 'c.max 100000'
|
||||
echo 'c.type COUNTER'
|
||||
echo 'c.info Answers within 10ms to 100ms.'
|
||||
|
||||
echo 'd.label in 1s'
|
||||
echo 'd.min 0'
|
||||
echo 'd.max 100000'
|
||||
echo 'd.type COUNTER'
|
||||
echo 'd.info Answers within 100ms to 1s.'
|
||||
|
||||
echo 'e.label over 1s'
|
||||
echo 'e.min 0'
|
||||
echo 'e.max 100000'
|
||||
echo 'e.type COUNTER'
|
||||
echo 'e.info Answers requiring more than 1s.'
|
||||
|
||||
echo 'f.label timeouts'
|
||||
echo 'f.min 0'
|
||||
echo 'f.max 100000'
|
||||
echo 'f.type COUNTER'
|
||||
echo 'f.info Answers that never came.'
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo a.value `rec_control get answers0-1`
|
||||
echo b.value `rec_control get answers1-10`
|
||||
echo c.value `rec_control get answers10-100`
|
||||
echo d.value `rec_control get answers100-1000`
|
||||
echo e.value `rec_control get answers-slow`
|
||||
echo f.value `rec_control get outgoing-timeouts`
|
||||
|
||||
exit 0
|
60
plugins/network/dns/pdns_rec_cache
Executable file
60
plugins/network/dns/pdns_rec_cache
Executable file
|
@ -0,0 +1,60 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# pdns_recursor munin plugin.
|
||||
# Written by Sean Reifschneider <jafo@tummy.com> 2009-12-03
|
||||
# Placed in the public domain
|
||||
#
|
||||
# Requires running as root:
|
||||
#
|
||||
# echo '[pdns_rec_*]' >/etc/munin/plugin-conf.d/pdns_rec
|
||||
# echo 'user root' >>/etc/munin/plugin-conf.d/pdns_rec
|
||||
|
||||
if [ "$1" = "autoconf" ]; then
|
||||
if [ -e /usr/bin/rec_control ]; then
|
||||
echo yes
|
||||
exit 0
|
||||
else
|
||||
echo no
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
RESENDS=`rec_control get cache-resends`
|
||||
ISRESENDS=""
|
||||
[ "$RESENDS" != "UNKNOWN" ] && ISRESENDS="resends"
|
||||
|
||||
if [ "$1" = "config" ]; then
|
||||
echo 'graph_title PDNS Cache'
|
||||
echo "graph_order hits misses $ISRESENDS"
|
||||
echo 'graph_vlabel entries'
|
||||
echo 'graph_info Hit/miss rate'
|
||||
echo 'graph_category pdns'
|
||||
|
||||
echo 'hits.label hits'
|
||||
echo 'hits.min 0'
|
||||
echo 'hits.max 100000'
|
||||
echo 'hits.type COUNTER'
|
||||
echo 'hits.info Cache hits'
|
||||
|
||||
echo 'misses.label misses'
|
||||
echo 'misses.min 0'
|
||||
echo 'misses.max 100000'
|
||||
echo 'misses.type COUNTER'
|
||||
echo 'misses.info Cache misses'
|
||||
|
||||
if [ "$RESENDS" != "UNKNOWN" ]; then
|
||||
echo 'resends.label resends'
|
||||
echo 'resends.min 0'
|
||||
echo 'resends.max 100000'
|
||||
echo 'resends.type COUNTER'
|
||||
echo 'resends.info Cache resends'
|
||||
fi
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo hits.value `rec_control get cache-hits`
|
||||
echo misses.value `rec_control get cache-misses`
|
||||
[ "$RESENDS" != "UNKNOWN" ] && echo resends.value `rec_control get cache-resends`
|
||||
|
||||
exit 0
|
45
plugins/network/dns/pdns_rec_cache_size
Executable file
45
plugins/network/dns/pdns_rec_cache_size
Executable file
|
@ -0,0 +1,45 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# pdns_recursor munin plugin.
|
||||
# Written by Sean Reifschneider <jafo@tummy.com> 2009-12-03
|
||||
# Placed in the public domain
|
||||
#
|
||||
# Requires running as root:
|
||||
#
|
||||
# echo '[pdns_rec_*]' >/etc/munin/plugin-conf.d/pdns_rec
|
||||
# echo 'user root' >>/etc/munin/plugin-conf.d/pdns_rec
|
||||
|
||||
if [ "$1" = "autoconf" ]; then
|
||||
if [ -e /usr/bin/rec_control ]; then
|
||||
echo yes
|
||||
exit 0
|
||||
else
|
||||
echo no
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$1" = "config" ]; then
|
||||
echo 'graph_title PDNS Cache Size'
|
||||
echo 'graph_order entries negative'
|
||||
echo 'graph_vlabel entries'
|
||||
echo 'graph_info Size of the cache'
|
||||
echo 'graph_category pdns'
|
||||
|
||||
echo 'entries.label Entries'
|
||||
echo 'entries.min 0'
|
||||
echo 'entries.type GAUGE'
|
||||
echo 'entries.info Cache entries'
|
||||
|
||||
echo 'negative.label Negative entries'
|
||||
echo 'negative.min 0'
|
||||
echo 'negative.type GAUGE'
|
||||
echo 'negative.info Cache negative entries'
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo entries.value `rec_control get cache-entries`
|
||||
echo negative.value `rec_control get negcache-entries`
|
||||
|
||||
exit 0
|
39
plugins/network/dns/pdns_rec_concurrent
Executable file
39
plugins/network/dns/pdns_rec_concurrent
Executable file
|
@ -0,0 +1,39 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# pdns_recursor munin plugin.
|
||||
# Written by Sean Reifschneider <jafo@tummy.com> 2009-12-03
|
||||
# Placed in the public domain
|
||||
#
|
||||
# Requires running as root:
|
||||
#
|
||||
# echo '[pdns_rec_*]' >/etc/munin/plugin-conf.d/pdns_rec
|
||||
# echo 'user root' >>/etc/munin/plugin-conf.d/pdns_rec
|
||||
|
||||
if [ "$1" = "autoconf" ]; then
|
||||
if [ -e /usr/bin/rec_control ]; then
|
||||
echo yes
|
||||
exit 0
|
||||
else
|
||||
echo no
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$1" = "config" ]; then
|
||||
echo 'graph_title PDNS Recursor Concurrent Queries'
|
||||
echo 'graph_order concurrent'
|
||||
echo 'graph_vlabel queries'
|
||||
echo 'graph_info Concurrent queries'
|
||||
echo 'graph_category pdns'
|
||||
|
||||
echo 'concurrent.label queries'
|
||||
echo 'concurrent.min 0'
|
||||
echo 'concurrent.type GAUGE'
|
||||
echo 'concurrent.info Concurrent queries'
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo concurrent.value `rec_control get concurrent-queries`
|
||||
|
||||
exit 0
|
68
plugins/network/dns/pdns_rec_issues
Executable file
68
plugins/network/dns/pdns_rec_issues
Executable file
|
@ -0,0 +1,68 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# pdns_recursor munin plugin.
|
||||
# Written by Sean Reifschneider <jafo@tummy.com> 2009-12-03
|
||||
# Placed in the public domain
|
||||
#
|
||||
# Requires running as root:
|
||||
#
|
||||
# echo '[pdns_rec_*]' >/etc/munin/plugin-conf.d/pdns_rec
|
||||
# echo 'user root' >>/etc/munin/plugin-conf.d/pdns_rec
|
||||
|
||||
if [ "$1" = "autoconf" ]; then
|
||||
if [ -e /usr/bin/rec_control ]; then
|
||||
echo yes
|
||||
exit 0
|
||||
else
|
||||
echo no
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$1" = "config" ]; then
|
||||
echo 'graph_title PDNS Recursor Exceptions'
|
||||
echo 'graph_order spoofs resource client server overflow'
|
||||
echo 'graph_vlabel queries'
|
||||
echo 'graph_info Exceptional queries'
|
||||
echo 'graph_category pdns'
|
||||
|
||||
echo 'spoofs.label spoofs'
|
||||
echo 'spoofs.min 0'
|
||||
echo 'spoofs.max 100000'
|
||||
echo 'spoofs.type COUNTER'
|
||||
echo 'spoofs.info Spoofs prevented'
|
||||
|
||||
echo 'resource.label resources'
|
||||
echo 'resource.min 0'
|
||||
echo 'resource.max 100000'
|
||||
echo 'resource.type COUNTER'
|
||||
echo 'resource.info Denied because of resource limits'
|
||||
|
||||
echo 'client.label client'
|
||||
echo 'client.min 0'
|
||||
echo 'client.max 100000'
|
||||
echo 'client.type COUNTER'
|
||||
echo 'client.info Client parse errors'
|
||||
|
||||
echo 'server.label server'
|
||||
echo 'server.min 0'
|
||||
echo 'server.max 100000'
|
||||
echo 'server.type COUNTER'
|
||||
echo 'server.info Server parse errors'
|
||||
|
||||
echo 'overflow.label tcp concurrency'
|
||||
echo 'overflow.min 0'
|
||||
echo 'overflow.max 100000'
|
||||
echo 'overflow.type COUNTER'
|
||||
echo 'overflow.info TCP client concurrency limit'
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo spoofs.value `rec_control get spoof-prevents`
|
||||
echo resource.value `rec_control get resource-limits`
|
||||
echo client.value `rec_control get client-parse-errors`
|
||||
echo server.value `rec_control get server-parse-errors`
|
||||
echo overflow.value `rec_control get tcp-client-overflow`
|
||||
|
||||
exit 0
|
47
plugins/network/dns/pdns_rec_outqueries
Executable file
47
plugins/network/dns/pdns_rec_outqueries
Executable file
|
@ -0,0 +1,47 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# pdns_recursor munin plugin.
|
||||
# Written by Sean Reifschneider <jafo@tummy.com> 2009-12-03
|
||||
# Placed in the public domain
|
||||
#
|
||||
# Requires running as root:
|
||||
#
|
||||
# echo '[pdns_rec_*]' >/etc/munin/plugin-conf.d/pdns_rec
|
||||
# echo 'user root' >>/etc/munin/plugin-conf.d/pdns_rec
|
||||
|
||||
if [ "$1" = "autoconf" ]; then
|
||||
if [ -e /usr/bin/rec_control ]; then
|
||||
echo yes
|
||||
exit 0
|
||||
else
|
||||
echo no
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$1" = "config" ]; then
|
||||
echo 'graph_title PDNS Outbound Queries'
|
||||
echo 'graph_order all tcp'
|
||||
echo 'graph_vlabel queries'
|
||||
echo 'graph_info Outbound queries'
|
||||
echo 'graph_category pdns'
|
||||
|
||||
echo 'all.label all'
|
||||
echo 'all.min 0'
|
||||
echo 'all.max 100000'
|
||||
echo 'all.type COUNTER'
|
||||
echo 'all.info All queries'
|
||||
|
||||
echo 'tcp.label tcp'
|
||||
echo 'tcp.min 0'
|
||||
echo 'tcp.max 100000'
|
||||
echo 'tcp.type COUNTER'
|
||||
echo 'tcp.info TCP queries'
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo all.value `rec_control get all-outqueries`
|
||||
echo tcp.value `rec_control get tcp-outqueries`
|
||||
|
||||
exit 0
|
39
plugins/network/dns/pdns_rec_querylatency
Executable file
39
plugins/network/dns/pdns_rec_querylatency
Executable file
|
@ -0,0 +1,39 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# pdns_recursor munin plugin.
|
||||
# Written by Sean Reifschneider <jafo@tummy.com> 2009-12-03
|
||||
# Placed in the public domain
|
||||
#
|
||||
# Requires running as root:
|
||||
#
|
||||
# echo '[pdns_rec_*]' >/etc/munin/plugin-conf.d/pdns_rec
|
||||
# echo 'user root' >>/etc/munin/plugin-conf.d/pdns_rec
|
||||
|
||||
if [ "$1" = "autoconf" ]; then
|
||||
if [ -e /usr/bin/rec_control ]; then
|
||||
echo yes
|
||||
exit 0
|
||||
else
|
||||
echo no
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$1" = "config" ]; then
|
||||
echo 'graph_title PDNS Recursor Answer Latency'
|
||||
echo 'graph_order latency'
|
||||
echo 'graph_vlabel ms'
|
||||
echo 'graph_info Question latency'
|
||||
echo 'graph_category pdns'
|
||||
|
||||
echo 'latency.label ms'
|
||||
echo 'latency.min 0'
|
||||
echo 'latency.type GAUGE'
|
||||
echo 'latency.info Answer latency'
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo latency.value `rec_control get qa-latency`
|
||||
|
||||
exit 0
|
47
plugins/network/dns/pdns_rec_questions
Executable file
47
plugins/network/dns/pdns_rec_questions
Executable file
|
@ -0,0 +1,47 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# pdns_recursor munin plugin.
|
||||
# Written by Sean Reifschneider <jafo@tummy.com> 2009-12-03
|
||||
# Placed in the public domain
|
||||
#
|
||||
# Requires running as root:
|
||||
#
|
||||
# echo '[pdns_rec_*]' >/etc/munin/plugin-conf.d/pdns_rec
|
||||
# echo 'user root' >>/etc/munin/plugin-conf.d/pdns_rec
|
||||
|
||||
if [ "$1" = "autoconf" ]; then
|
||||
if [ -e /usr/bin/rec_control ]; then
|
||||
echo yes
|
||||
exit 0
|
||||
else
|
||||
echo no
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$1" = "config" ]; then
|
||||
echo 'graph_title PDNS Recursor Questions'
|
||||
echo 'graph_order all tcp'
|
||||
echo 'graph_vlabel queries'
|
||||
echo 'graph_info Number of questions asked'
|
||||
echo 'graph_category pdns'
|
||||
|
||||
echo 'all.label all'
|
||||
echo 'all.min 0'
|
||||
echo 'all.max 100000'
|
||||
echo 'all.type COUNTER'
|
||||
echo 'all.info All queries'
|
||||
|
||||
echo 'tcp.label tcp'
|
||||
echo 'tcp.min 0'
|
||||
echo 'tcp.max 100000'
|
||||
echo 'tcp.type COUNTER'
|
||||
echo 'tcp.info TCP queries'
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo all.value `rec_control get questions`
|
||||
echo tcp.value `rec_control get tcp-questions`
|
||||
|
||||
exit 0
|
39
plugins/network/dns/pdns_rec_throttle
Executable file
39
plugins/network/dns/pdns_rec_throttle
Executable file
|
@ -0,0 +1,39 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# pdns_recursor munin plugin.
|
||||
# Written by Sean Reifschneider <jafo@tummy.com> 2009-12-03
|
||||
# Placed in the public domain
|
||||
#
|
||||
# Requires running as root:
|
||||
#
|
||||
# echo '[pdns_rec_*]' >/etc/munin/plugin-conf.d/pdns_rec
|
||||
# echo 'user root' >>/etc/munin/plugin-conf.d/pdns_rec
|
||||
|
||||
if [ "$1" = "autoconf" ]; then
|
||||
if [ -e /usr/bin/rec_control ]; then
|
||||
echo yes
|
||||
exit 0
|
||||
else
|
||||
echo no
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$1" = "config" ]; then
|
||||
echo 'graph_title PDNS Recursor Throttling'
|
||||
echo 'graph_order throttled
|
||||
echo 'graph_vlabel queries'
|
||||
echo 'graph_info Throttled queries'
|
||||
echo 'graph_category pdns'
|
||||
|
||||
echo 'throttled.label throttled'
|
||||
echo 'throttled.min 0'
|
||||
echo 'throttled.type COUNTER'
|
||||
echo 'throttled.info Throttled queries'
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo throttled.value `rec_control get throttled-out'
|
||||
|
||||
exit 0
|
54
plugins/network/dns/pdns_rec_unauth
Executable file
54
plugins/network/dns/pdns_rec_unauth
Executable file
|
@ -0,0 +1,54 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# pdns_recursor munin plugin.
|
||||
# Written by Sean Reifschneider <jafo@tummy.com> 2009-12-03
|
||||
# Placed in the public domain
|
||||
#
|
||||
# Requires running as root:
|
||||
#
|
||||
# echo '[pdns_rec_*]' >/etc/munin/plugin-conf.d/pdns_rec
|
||||
# echo 'user root' >>/etc/munin/plugin-conf.d/pdns_rec
|
||||
|
||||
if [ "$1" = "autoconf" ]; then
|
||||
if [ -e /usr/bin/rec_control ]; then
|
||||
echo yes
|
||||
exit 0
|
||||
else
|
||||
echo no
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$1" = "config" ]; then
|
||||
echo 'graph_title PDNS Recursor Unauthorized'
|
||||
echo 'graph_order tcp udp unexpected'
|
||||
echo 'graph_vlabel queries'
|
||||
echo 'graph_info Unauthorized requests'
|
||||
echo 'graph_category pdns'
|
||||
|
||||
echo 'tcp.label tcp'
|
||||
echo 'tcp.min 0'
|
||||
echo 'tcp.max 100000'
|
||||
echo 'tcp.type COUNTER'
|
||||
echo 'tcp.info Unauthorized TCP queries'
|
||||
|
||||
echo 'udp.label udp'
|
||||
echo 'udp.min 0'
|
||||
echo 'udp.max 100000'
|
||||
echo 'udp.type COUNTER'
|
||||
echo 'udp.info Unauthorized UDP queries'
|
||||
|
||||
echo 'unexpected.label unexpected'
|
||||
echo 'unexpected.min 0'
|
||||
echo 'unexpected.max 100000'
|
||||
echo 'unexpected.type COUNTER'
|
||||
echo 'unexpected.info Unexpected queries (may indicate spoofing)'
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo tcp.value `rec_control get unauthorized-tcp`
|
||||
echo udp.value `rec_control get unauthorized-udp`
|
||||
echo unexpected.value `rec_control get unexpected-packets`
|
||||
|
||||
exit 0
|
|
@ -1,84 +0,0 @@
|
|||
#!/usr/bin/perl
|
||||
#
|
||||
# apache http status code monitoring
|
||||
#
|
||||
# luis peralta - luis@11870.com
|
||||
# http://www.ziritione.org
|
||||
#
|
||||
# Installing: configure apache blackbox and set the logfile to /var/log/blackbox.log
|
||||
# or change the BLACKBOXLOG setting bellow.
|
||||
#
|
||||
# Dependencies: apache mod_logio, apache blackbox
|
||||
# http://www.devco.net/archives/2008/03/05/detailed_apache_stats.php
|
||||
#
|
||||
# Last version available at: http://www.ziritione.org/http_status
|
||||
#
|
||||
# Parameters:
|
||||
#
|
||||
# config
|
||||
# autoconf
|
||||
#
|
||||
#%# family=auto
|
||||
#%# capabilities=autoconf
|
||||
|
||||
use strict;
|
||||
|
||||
my $BLACKBOXLOG = "/var/log/blackbox.log";
|
||||
|
||||
my %WANTED = ( "apache.status.200" => "_200",
|
||||
"apache.status.301" => "_301",
|
||||
"apache.status.302" => "_302",
|
||||
"apache.status.404" => "_404",
|
||||
"apache.status.5xx" => "_5xx",
|
||||
);
|
||||
|
||||
my $arg = shift();
|
||||
|
||||
if ($arg eq 'config') {
|
||||
print_config();
|
||||
exit();
|
||||
} elsif ($arg eq 'autoconf') {
|
||||
print "yes\n";
|
||||
exit();
|
||||
}
|
||||
|
||||
|
||||
open(SERVICE, "<$BLACKBOXLOG")
|
||||
or die("Could not open '$BLACKBOXLOG': $!");
|
||||
|
||||
while (<SERVICE>) {
|
||||
my ($k, $v) = (m/(apache.status.*)=(\d+)/);
|
||||
next unless ($k);
|
||||
if (exists $WANTED{$k} ) {
|
||||
print("$WANTED{$k}.value $v\n");
|
||||
}
|
||||
}
|
||||
|
||||
close(SERVICE);
|
||||
|
||||
|
||||
sub print_config {
|
||||
|
||||
my $num = 0;
|
||||
|
||||
print("graph_title HTTP requests status
|
||||
graph_args --base 1000
|
||||
graph_vlabel requests / second
|
||||
graph_category Network
|
||||
graph_total total\n");
|
||||
|
||||
for my $key (sort { $WANTED{$a} cmp $WANTED{$b} } (keys %WANTED)) {
|
||||
my $title = $WANTED{$key};
|
||||
print("$title.label ${title}\n",
|
||||
"$title.min 0\n",
|
||||
"$title.type DERIVE\n",
|
||||
"$title.max 500000\n",
|
||||
#"$title.draw ", ($num) ? "STACK" : "AREA" , "\n",
|
||||
"$title.draw ", ($num) ? "AREA" : "AREA" , "\n",
|
||||
);
|
||||
$num++;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
56
plugins/network/speedport_300
Executable file
56
plugins/network/speedport_300
Executable file
|
@ -0,0 +1,56 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
#
|
||||
# Munin plugin to show the up- / download stream of the actual
|
||||
# internet connection by reading the top_status.htm from the
|
||||
# Speedport 300
|
||||
#
|
||||
#
|
||||
# Don't forget zu fill in the following lines into the munin-node
|
||||
# - ormally at /etc/muni/plugin-conf.d/ - an than restart munin
|
||||
#
|
||||
# [speedport_300]
|
||||
# user root
|
||||
# Jo Hartmann (Version 08.0912)
|
||||
|
||||
# Personal config Section Begin ##
|
||||
router="192.168.0.111"
|
||||
# Personal config section End ####
|
||||
|
||||
# Standard Config Section Begin ##
|
||||
if [ "$1" = "autoconf" ]; then
|
||||
echo yes
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "$1" = "config" ]; then
|
||||
|
||||
echo 'graph_title DSL Up- / Downstream'
|
||||
echo 'graph_args --base 1000 -l 0'
|
||||
echo 'graph_scale no'
|
||||
echo 'graph_vlabel Up- / Downstream in kBit/s'
|
||||
echo 'graph_category Http'
|
||||
echo 'download.label Downstream'
|
||||
echo 'upload.label Upstream'
|
||||
echo 'graph_info Information from the top_status.htm of the Speedport 300'
|
||||
exit 0
|
||||
fi
|
||||
# Standard Config Section End ####
|
||||
|
||||
# Measure Section Begin ##########
|
||||
up_down=($(wget -q -O - $router/top_status.htm | grep "+'kBit" | awk -F"(" '{print $2}'))
|
||||
down=${up_down[0]%+*}
|
||||
up=${up_down[1]%+*}
|
||||
|
||||
if [ "$down" = "" ]; then
|
||||
echo download.value 0
|
||||
else
|
||||
echo download.value ${up_down[0]%+*}
|
||||
fi
|
||||
|
||||
if [ "$up" = "" ]; then
|
||||
echo upload.value 0
|
||||
else
|
||||
echo upload.value ${up_down[1]%+*}
|
||||
fi
|
||||
# Measure Section End ############
|
Loading…
Add table
Add a link
Reference in a new issue