2
0
mirror of https://github.com/munin-monitoring/contrib.git synced 2018-11-08 00:59:34 +01:00
contrib-munin/plugins/pdns/pdns_queries

60 lines
2.0 KiB
Plaintext
Raw Normal View History

2007-05-22 09:30:54 +02:00
#!/bin/bash
#
# Script to monitor PowerDNS performance
#
# Parameters understood:
#
# config (required)
# autoconf (optional - used by munin-config)
#%# family=auto
#%# capabilities=autoconf
pdns_control="/usr/bin/pdns_control"
command="/usr/bin/pdns_control list"
2007-05-22 09:30:54 +02:00
if [ "$1" = "autoconf" ]; then
if [ -e "$pdns_control" ]; then
echo yes
exit 0
else
echo "no (missing $pdns_control)"
exit 0
fi
2007-05-22 09:30:54 +02:00
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'
2007-05-22 09:30:54 +02:00
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' | egrep "udp-|recursing|tcp" | sed 's/-/_/g'