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

Move some more plugins in their place.

This commit is contained in:
Diego Elio Pettenò 2012-08-09 16:47:30 -07:00
parent 3bb2c5e2aa
commit d3a4f12d3f
14 changed files with 0 additions and 0 deletions

View 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

View 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

View 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

View 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

View 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

View 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

View 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

View 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

View 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

View 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

106
plugins/network/dns/tinydns Executable file
View file

@ -0,0 +1,106 @@
#!/bin/sh
#
# Shows DNS query statistics as gathered by tinystats by Luca Morettoni.
#
# Parameters:
#
# config (required)
# autoconf (optional - used by munin-config)
#
#%# family=auto
#%# capabilities=autoconf
if [ "$1" = "autoconf" ]; then
if [ -f "/var/service/tinydns/log/main/tinystats.out" ]; then
echo yes;
else
echo no;
fi
exit 0;
fi
if [ "$1" = "config" ]; then
cat - <<EOF
graph_title tinydns queries
graph_args --base 1000 -l 0
graph_vlabel queries/sec
graph_category network
graph_info This graph shows the number of queries that tinydns processed.
graph_total Total
a.label A
a.info The number of A queries.
a.type DERIVE
a.min 0
a.draw AREA
ns.label NS
ns.info The number of NS queries.
ns.type DERIVE
ns.min 0
ns.draw STACK
cname.label CNAME
cname.info The number of CNAME queries.
cname.type DERIVE
cname.min 0
cname.draw STACK
soa.label SOA
soa.info The number of SOA queries.
soa.type DERIVE
soa.min 0
soa.draw STACK
ptr.label PTR
ptr.info The number of PTR queries.
ptr.type DERIVE
ptr.min 0
ptr.draw STACK
hinfo.label HINFO
hinfo.info The number of HINFO queries.
hinfo.type DERIVE
hinfo.min 0
hinfo.draw STACK
mx.label MX
mx.info The number of MX queries.
mx.type DERIVE
mx.min 0
mx.draw STACK
txt.label TXT
txt.info The number of TXT queries.
txt.type DERIVE
txt.min 0
txt.draw STACK
rp.label RP
rp.info The number of RP queries.
rp.type DERIVE
rp.min 0
rp.draw STACK
sig.label SIG
sig.info The number of SIG queries.
sig.type DERIVE
sig.min 0
sig.draw STACK
key.label KEY
key.info The number of KEY queries.
key.type DERIVE
key.min 0
key.draw STACK
aaaa.label AAAA
aaaa.info The number of AAAA queries.
aaaa.type DERIVE
aaaa.min 0
aaaa.draw STACK
axfr.label AXFR
axfr.info The number of AXFR queries.
axfr.type DERIVE
axfr.min 0
axfr.draw STACK
any.label ANY
any.info The number of ANY queries.
any.type DERIVE
any.min 0
any.draw STACK
EOF
exit 0
fi
cat /var/service/tinydns/log/main/tinystats.out | head -n 1 | awk -F: '{ printf "a.value %d\nns.value %d\ncname.value %d\nsoa.value %d\nptr.value %d\nhinfo.value %d\nmx.value %d\ntxt.value %d\nrp.value %d\nsig.value %d\nkey.value %d\naaaa.value %d\naxfr.value %d\nany.value %d\n", $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14 }'

61
plugins/network/dns/tinydns_err Executable file
View file

@ -0,0 +1,61 @@
#!/bin/sh
#
# Shows DNS query statistics as gathered by tinystats by Luca Morettoni.
#
# Parameters:
#
# config (required)
# autoconf (optional - used by munin-config)
#
#%# family=auto
#%# capabilities=autoconf
if [ "$1" = "autoconf" ]; then
if [ -f "/var/service/tinydns/log/main/tinystats.out" ]; then
echo yes;
else
echo no;
fi
exit 0;
fi
if [ "$1" = "config" ]; then
cat - <<EOF
graph_title tinydns query errors
graph_args --base 1000 -l 0
graph_vlabel queries/sec
graph_category network
graph_info This graph shows the number of queries that tinydns processed.
graph_total Total
other.label Other RR
other.info The number of other RR queries.
other.type DERIVE
other.min 0
other.draw AREA
notauth.label Not authotitative
notauth.info The number of not authotitative queries.
notauth.type DERIVE
notauth.min 0
notauth.draw STACK
notimpl.label Not implemented
notimpl.info The number of not implemented queries.
notimpl.type DERIVE
notimpl.min 0
notimpl.draw STACK
badclass.label Bad class type
badclass.info The number of bad class type queries.
badclass.type DERIVE
badclass.min 0
badclass.draw STACK
noquery.label Empty query
noquery.info The number of empty queries.
noquery.type DERIVE
noquery.min 0
noquery.draw STACK
EOF
exit 0
fi
cat /var/service/tinydns/log/main/tinystats.out | head -n 1 | awk -F: '{ printf "other.value %d\nnotauth.value %d\nnotimpl.value %d\nbadclass.value %d\nnoquery.value %d\n", $16, $17, $18, $19, $20 }'