mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-22 02:51:03 +00:00
Gallery: single dirname shall show up as second level heading
This commit is contained in:
parent
4a87dd9cba
commit
abd4092268
22 changed files with 0 additions and 0 deletions
41
plugins/pdns/pdns_errors
Executable file
41
plugins/pdns/pdns_errors
Executable file
|
@ -0,0 +1,41 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Script to monitor PowerDNS performance
|
||||
#
|
||||
# Parameters understood:
|
||||
#
|
||||
# config (required)
|
||||
# autoconf (optional - used by munin-config)
|
||||
#%# family=auto
|
||||
#%# capabilities=autoconf
|
||||
|
||||
command="/etc/init.d/pdns dump"
|
||||
|
||||
if [ "$1" = "autoconf" ]; then
|
||||
echo yes
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "$1" = "config" ]; then
|
||||
echo 'graph_title Power DNS errors'
|
||||
echo 'graph_args -l 0 --base 1000'
|
||||
echo 'graph_vlabel numbers of'
|
||||
echo 'graph_category dns'
|
||||
echo 'graph_info This graph shows Power DNS performance on the machine.'
|
||||
echo 'corrupt_packets.label corrupt packets'
|
||||
echo 'corrupt_packets.type DERIVE'
|
||||
echo 'corrupt_packets.min 0'
|
||||
echo 'corrupt_packets.info Number of corrupt packets received'
|
||||
echo 'servfail_packets.label servfail packets'
|
||||
echo 'servfail_packets.type DERIVE'
|
||||
echo 'servfail_packets.min 0'
|
||||
echo 'servfail_packets.info Number of times a server-failed packet was sent out'
|
||||
echo 'timedout_packets.label timedout packets'
|
||||
echo 'timedout_packets.type DERIVE'
|
||||
echo 'timedout_packets.min 0'
|
||||
echo 'timedout_packets.info Number of packets which weren not answered within timeout set'
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
$command | sed 's/=\([0-9]\+\),/.value \1\n/g' | grep corrupt'\|'servfail'\|'timedout | sed 's/-/_/g'
|
34
plugins/pdns/pdns_latency
Executable file
34
plugins/pdns/pdns_latency
Executable file
|
@ -0,0 +1,34 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Script to monitor PowerDNS performance
|
||||
#
|
||||
# Parameters understood:
|
||||
#
|
||||
# config (required)
|
||||
# autoconf (optional - used by munin-config)
|
||||
#%# family=auto
|
||||
#%# capabilities=autoconf
|
||||
|
||||
command="/etc/init.d/pdns show"
|
||||
|
||||
if [ "$1" = "autoconf" ]; then
|
||||
echo yes
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "$1" = "config" ]; then
|
||||
echo 'graph_title Power DNS latency'
|
||||
echo 'graph_args -l 0'
|
||||
echo 'graph_vlabel usec'
|
||||
echo 'graph_category dns'
|
||||
echo 'graph_info This graph shows Power DNS latency on the machine.'
|
||||
echo 'latency.label latency'
|
||||
echo 'latency.info Average number of microseconds needed to answer a question'
|
||||
echo 'latency.type GAUGE'
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
echo "latency.value $($command latency | awk -F= '{print $2}')"
|
35
plugins/pdns/pdns_qsize
Executable file
35
plugins/pdns/pdns_qsize
Executable file
|
@ -0,0 +1,35 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Script to monitor PowerDNS performance
|
||||
#
|
||||
# Parameters understood:
|
||||
#
|
||||
# config (required)
|
||||
# autoconf (optional - used by munin-config)
|
||||
#%# family=auto
|
||||
#%# capabilities=autoconf
|
||||
|
||||
command="/etc/init.d/pdns show"
|
||||
|
||||
if [ "$1" = "autoconf" ]; then
|
||||
echo yes
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "$1" = "config" ]; then
|
||||
echo 'graph_title Power DNS database queue'
|
||||
echo 'graph_args -l 0'
|
||||
echo 'graph_vlabel number of waiting queries'
|
||||
echo 'graph_category dns'
|
||||
echo 'graph_info This graph shows Power DNS database performance on the machine.'
|
||||
echo 'qsize.label qsize'
|
||||
echo 'qsize.info Number of questions waiting for database attention'
|
||||
echo 'qsize.type GAUGE'
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
echo "qsize.value $($command qsize_q | awk -F= '{print $2}')"
|
||||
|
53
plugins/pdns/pdns_queries
Executable file
53
plugins/pdns/pdns_queries
Executable file
|
@ -0,0 +1,53 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Script to monitor PowerDNS performance
|
||||
#
|
||||
# Parameters understood:
|
||||
#
|
||||
# config (required)
|
||||
# autoconf (optional - used by munin-config)
|
||||
#%# family=auto
|
||||
#%# capabilities=autoconf
|
||||
|
||||
command="/etc/init.d/pdns dump"
|
||||
|
||||
if [ "$1" = "autoconf" ]; then
|
||||
echo yes
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "$1" = "config" ]; then
|
||||
echo 'graph_title Power DNS queries'
|
||||
echo 'graph_args -l 0 --base 1000'
|
||||
echo 'graph_vlabel numbers of'
|
||||
echo 'graph_category dns'
|
||||
echo 'graph_info This graph shows Power DNS performance on the machine.'
|
||||
echo 'recursing_answers.label recursing answers'
|
||||
echo 'recursing_answers.type DERIVE'
|
||||
echo 'recursing_answers.min 0'
|
||||
echo 'recursing_answers.info Number of recursive answers sent out'
|
||||
echo 'recursing_questions.label recursing queries'
|
||||
echo 'recursing_questions.type DERIVE'
|
||||
echo 'recursing_questions.min 0'
|
||||
echo 'recursing_questions.info Number of queries sent to recursor'
|
||||
echo 'tcp_answers.label tcp answers'
|
||||
echo 'tcp_answers.type DERIVE'
|
||||
echo 'tcp_answers.min 0'
|
||||
echo 'tcp_answers.info Number of answers sent out over TCP'
|
||||
echo 'tcp_queries.label tcp queries'
|
||||
echo 'tcp_queries.type DERIVE'
|
||||
echo 'tcp_queries.min 0'
|
||||
echo 'tcp_queries.info Number of TCP queries received'
|
||||
echo 'udp_answers.label udp answers'
|
||||
echo 'udp_answers.type DERIVE'
|
||||
echo 'udp_answers.min 0'
|
||||
echo 'udp_answers.info Number of answers sent out over UDP'
|
||||
echo 'udp_queries.label udp queries'
|
||||
echo 'udp_queries.type DERIVE'
|
||||
echo 'udp_queries.min 0'
|
||||
echo 'udp_queries.info Number of UDP queries received'
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
$command | sed 's/=\([0-9]\+\),/.value \1\n/g' | grep udp-'\|'recursing'\|'tcp | sed 's/-/_/g'
|
75
plugins/pdns/pdns_rec_answers
Executable file
75
plugins/pdns/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 dns'
|
||||
|
||||
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/pdns/pdns_rec_cache
Executable file
60
plugins/pdns/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 dns'
|
||||
|
||||
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/pdns/pdns_rec_cache_size
Executable file
45
plugins/pdns/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 dns'
|
||||
|
||||
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/pdns/pdns_rec_concurrent
Executable file
39
plugins/pdns/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 dns'
|
||||
|
||||
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/pdns/pdns_rec_issues
Executable file
68
plugins/pdns/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 dns'
|
||||
|
||||
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/pdns/pdns_rec_outqueries
Executable file
47
plugins/pdns/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 dns'
|
||||
|
||||
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
|
250
plugins/pdns/pdns_rec_qtypes
Executable file
250
plugins/pdns/pdns_rec_qtypes
Executable file
|
@ -0,0 +1,250 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# pdns_recursor munin plugin.
|
||||
# Written by Fusl <root@sigqu.it> 2014-01-23
|
||||
# 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 Query Types'
|
||||
echo 'graph_order a ns cname soa mr ptr hinfo mx txt rp afsdb sig key aaaa loc srv naptr kx cert a6 ds sshfp ipseckey rrsig nsec dnskey dhcid nsec3 nsec3param tlsa spf eui48 eui64 tsig mailb maila any dlv'
|
||||
echo 'graph_vlabel querytypes'
|
||||
echo 'graph_info Querytype breakdown'
|
||||
echo 'graph_category dns'
|
||||
|
||||
echo 'a.label A queries'
|
||||
echo 'a.min 0'
|
||||
echo 'a.type DERIVE'
|
||||
echo 'a.info Queries with A type'
|
||||
|
||||
echo 'ns.label NS queries'
|
||||
echo 'ns.min 0'
|
||||
echo 'ns.type DERIVE'
|
||||
echo 'ns.info Queries with NS type'
|
||||
|
||||
echo 'cname.label CNAME queries'
|
||||
echo 'cname.min 0'
|
||||
echo 'cname.type DERIVE'
|
||||
echo 'cname.info Queries with CNAME type'
|
||||
|
||||
echo 'soa.label SOA queries'
|
||||
echo 'soa.min 0'
|
||||
echo 'soa.type DERIVE'
|
||||
echo 'soa.info Queries with SOA type'
|
||||
|
||||
echo 'mr.label MR queries'
|
||||
echo 'mr.min 0'
|
||||
echo 'mr.type DERIVE'
|
||||
echo 'mr.info Queries with MR type'
|
||||
|
||||
echo 'ptr.label PTR queries'
|
||||
echo 'ptr.min 0'
|
||||
echo 'ptr.type DERIVE'
|
||||
echo 'ptr.info Queries with PTR type'
|
||||
|
||||
echo 'hinfo.label HINFO queries'
|
||||
echo 'hinfo.min 0'
|
||||
echo 'hinfo.type DERIVE'
|
||||
echo 'hinfo.info Queries with HINFO type'
|
||||
|
||||
echo 'mx.label MX queries'
|
||||
echo 'mx.min 0'
|
||||
echo 'mx.type DERIVE'
|
||||
echo 'mx.info Queries with MX type'
|
||||
|
||||
echo 'txt.label TXT queries'
|
||||
echo 'txt.min 0'
|
||||
echo 'txt.type DERIVE'
|
||||
echo 'txt.info Queries with TXT type'
|
||||
|
||||
echo 'rp.label RP queries'
|
||||
echo 'rp.min 0'
|
||||
echo 'rp.type DERIVE'
|
||||
echo 'rp.info Queries with RP type'
|
||||
|
||||
echo 'afsdb.label AFSDB queries'
|
||||
echo 'afsdb.min 0'
|
||||
echo 'afsdb.type DERIVE'
|
||||
echo 'afsdb.info Queries with AFSDB type'
|
||||
|
||||
echo 'sig.label SIG queries'
|
||||
echo 'sig.min 0'
|
||||
echo 'sig.type DERIVE'
|
||||
echo 'sig.info Queries with SIG type'
|
||||
|
||||
echo 'key.label KEY queries'
|
||||
echo 'key.min 0'
|
||||
echo 'key.type DERIVE'
|
||||
echo 'key.info Queries with KEY type'
|
||||
|
||||
echo 'aaaa.label AAAA queries'
|
||||
echo 'aaaa.min 0'
|
||||
echo 'aaaa.type DERIVE'
|
||||
echo 'aaaa.info Queries with AAAA type'
|
||||
|
||||
echo 'loc.label LOC queries'
|
||||
echo 'loc.min 0'
|
||||
echo 'loc.type DERIVE'
|
||||
echo 'loc.info Queries with LOC type'
|
||||
|
||||
echo 'srv.label SRV queries'
|
||||
echo 'srv.min 0'
|
||||
echo 'srv.type DERIVE'
|
||||
echo 'srv.info Queries with SRV type'
|
||||
|
||||
echo 'naptr.label NAPTR queries'
|
||||
echo 'naptr.min 0'
|
||||
echo 'naptr.type DERIVE'
|
||||
echo 'naptr.info Queries with NAPTR type'
|
||||
|
||||
echo 'kx.label KX queries'
|
||||
echo 'kx.min 0'
|
||||
echo 'kx.type DERIVE'
|
||||
echo 'kx.info Queries with KX type'
|
||||
|
||||
echo 'cert.label CERT queries'
|
||||
echo 'cert.min 0'
|
||||
echo 'cert.type DERIVE'
|
||||
echo 'cert.info Queries with CERT type'
|
||||
|
||||
echo 'a6.label A6 queries'
|
||||
echo 'a6.min 0'
|
||||
echo 'a6.type DERIVE'
|
||||
echo 'a6.info Queries with A6 type'
|
||||
|
||||
echo 'ds.label DS queries'
|
||||
echo 'ds.min 0'
|
||||
echo 'ds.type DERIVE'
|
||||
echo 'ds.info Queries with DS type'
|
||||
|
||||
echo 'sshfp.label SSHFP queries'
|
||||
echo 'sshfp.min 0'
|
||||
echo 'sshfp.type DERIVE'
|
||||
echo 'sshfp.info Queries with SSHFP type'
|
||||
|
||||
echo 'ipseckey.label IPSECKEY queries'
|
||||
echo 'ipseckey.min 0'
|
||||
echo 'ipseckey.type DERIVE'
|
||||
echo 'ipseckey.info Queries with IPSECKEY type'
|
||||
|
||||
echo 'rrsig.label RRSIG queries'
|
||||
echo 'rrsig.min 0'
|
||||
echo 'rrsig.type DERIVE'
|
||||
echo 'rrsig.info Queries with RRSIG type'
|
||||
|
||||
echo 'nsec.label NSEC queries'
|
||||
echo 'nsec.min 0'
|
||||
echo 'nsec.type DERIVE'
|
||||
echo 'nsec.info Queries with NSEC type'
|
||||
|
||||
echo 'dnskey.label DNSKEY queries'
|
||||
echo 'dnskey.min 0'
|
||||
echo 'dnskey.type DERIVE'
|
||||
echo 'dnskey.info Queries with DNSKEY type'
|
||||
|
||||
echo 'dhcid.label DHCID queries'
|
||||
echo 'dhcid.min 0'
|
||||
echo 'dhcid.type DERIVE'
|
||||
echo 'dhcid.info Queries with DHCID type'
|
||||
|
||||
echo 'nsec3.label NSEC3 queries'
|
||||
echo 'nsec3.min 0'
|
||||
echo 'nsec3.type DERIVE'
|
||||
echo 'nsec3.info Queries with NSEC3 type'
|
||||
|
||||
echo 'nsec3param.label NSEC3PARAM queries'
|
||||
echo 'nsec3param.min 0'
|
||||
echo 'nsec3param.type DERIVE'
|
||||
echo 'nsec3param.info Queries with NSEC3PARAM type'
|
||||
|
||||
echo 'tlsa.label TLSA queries'
|
||||
echo 'tlsa.min 0'
|
||||
echo 'tlsa.type DERIVE'
|
||||
echo 'tlsa.info Queries with TLSA type'
|
||||
|
||||
echo 'spf.label SPF queries'
|
||||
echo 'spf.min 0'
|
||||
echo 'spf.type DERIVE'
|
||||
echo 'spf.info Queries with SPF type'
|
||||
|
||||
echo 'eui48.label EUI48 queries'
|
||||
echo 'eui48.min 0'
|
||||
echo 'eui48.type DERIVE'
|
||||
echo 'eui48.info Queries with EUI48 type'
|
||||
|
||||
echo 'eui64.label EUI64 queries'
|
||||
echo 'eui64.min 0'
|
||||
echo 'eui64.type DERIVE'
|
||||
echo 'eui64.info Queries with EUI64 type'
|
||||
|
||||
echo 'tsig.label TSIG queries'
|
||||
echo 'tsig.min 0'
|
||||
echo 'tsig.type DERIVE'
|
||||
echo 'tsig.info Queries with TSIG type'
|
||||
|
||||
echo 'mailb.label MAILB queries'
|
||||
echo 'mailb.min 0'
|
||||
echo 'mailb.type DERIVE'
|
||||
echo 'mailb.info Queries with MAILB type'
|
||||
|
||||
echo 'maila.label MAILA queries'
|
||||
echo 'maila.min 0'
|
||||
echo 'maila.type DERIVE'
|
||||
echo 'maila.info Queries with MAILA type'
|
||||
|
||||
echo 'any.label ANY queries'
|
||||
echo 'any.min 0'
|
||||
echo 'any.type DERIVE'
|
||||
echo 'any.info Queries with ANY type'
|
||||
|
||||
echo 'addr.label ADDR queries'
|
||||
echo 'addr.min 0'
|
||||
echo 'addr.type DERIVE'
|
||||
echo 'addr.info Queries with ADDR type'
|
||||
|
||||
echo 'dlv.label DLV queries'
|
||||
echo 'dlv.min 0'
|
||||
echo 'dlv.type DERIVE'
|
||||
echo 'dlv.info Queries with DLV type'
|
||||
|
||||
echo 'unk.label Unknown type queries'
|
||||
echo 'unk.min 0'
|
||||
echo 'unk.type DERIVE'
|
||||
echo 'unk.info Queries with unknown type'
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
||||
awkscript='
|
||||
BEGIN {
|
||||
unk=0
|
||||
}
|
||||
{
|
||||
if (substr($1, 0, 4) == "TYPE") {
|
||||
unk += ($2+0);
|
||||
} else {
|
||||
print tolower($1)".value "$2;
|
||||
}
|
||||
};
|
||||
END {
|
||||
print "unk.value "unk;
|
||||
}
|
||||
'
|
||||
|
||||
rec_control get-qtypelist | awk "$awkscript"
|
||||
|
||||
exit 0
|
39
plugins/pdns/pdns_rec_querylatency
Executable file
39
plugins/pdns/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 dns'
|
||||
|
||||
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/pdns/pdns_rec_questions
Executable file
47
plugins/pdns/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 dns'
|
||||
|
||||
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/pdns/pdns_rec_throttle
Executable file
39
plugins/pdns/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 dns'
|
||||
|
||||
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/pdns/pdns_rec_unauth
Executable file
54
plugins/pdns/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 dns'
|
||||
|
||||
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
|
48
plugins/pdns/pdns_rel
Executable file
48
plugins/pdns/pdns_rel
Executable file
|
@ -0,0 +1,48 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Script to monitor PowerDNS performance
|
||||
#
|
||||
# Parameters understood:
|
||||
#
|
||||
# config (required)
|
||||
# autoconf (optional - used by munin-config)
|
||||
#%# family=auto
|
||||
#%# capabilities=autoconf
|
||||
|
||||
command="/etc/init.d/pdns show"
|
||||
state_file=/var/lib/munin/plugin-state/pdns_rel.state
|
||||
|
||||
if [ "$1" = "autoconf" ]; then
|
||||
echo yes
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "$1" = "config" ]; then
|
||||
echo 'graph_title Power DNS Packet Cache Performance'
|
||||
echo 'graph_args -l 0 --upper-limit 100 --base 1000'
|
||||
echo 'graph_vlabel %'
|
||||
echo 'graph_category dns'
|
||||
echo 'graph_info This graph shows the Power DNS packet cache performance on the machine.'
|
||||
echo 'packetcache_hitrate.label packet cache hitrate'
|
||||
echo 'packetcache_hitrate.type GAUGE'
|
||||
echo 'packetcache_hitrate.min 0'
|
||||
echo 'packetcache_hitrate.max 100'
|
||||
echo 'packetcache_hitrate.info Hits on the packets cache'
|
||||
exit 0
|
||||
fi
|
||||
|
||||
hits=$($command packetcache-hit | awk -F= '{print $2}')
|
||||
queries=$($command udp-queries | awk -F= '{print $2}')
|
||||
old_hits=$(cat $state_file | head -n1)
|
||||
old_queries=$(cat $state_file | tail -n1)
|
||||
|
||||
if [ -f $state_file ] && [ $(ls -l --time-style=+%s $state_file | awk '{print $6}') -gt $(date --date="7 minutes ago" +%s) ] ; then
|
||||
d_hits=$(($hits - $old_hits))
|
||||
d_queries=$(($queries - $old_queries))
|
||||
if [ $d_queries -gt 0 ] ; then
|
||||
echo packetcache_hitrate.value $(( $d_hits * 100 / $d_queries ))
|
||||
fi
|
||||
fi
|
||||
|
||||
echo $hits > $state_file
|
||||
echo $queries >> $state_file
|
Loading…
Add table
Add a link
Reference in a new issue