mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-21 10:39:53 +00:00
Update the plugin's configuration part to describe the values that got added to "/usr/bin/pdns_control list" since creation of the plugin
114 lines
5.1 KiB
Bash
Executable file
114 lines
5.1 KiB
Bash
Executable file
#!/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"
|
|
|
|
if [ "$1" = "autoconf" ]; then
|
|
if [ -e "$pdns_control" ]; then
|
|
echo yes
|
|
exit 0
|
|
else
|
|
echo "no (missing $pdns_control)"
|
|
exit 0
|
|
fi
|
|
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 packets we supplied an answer to after recursive processing'
|
|
echo 'recursing_questions.label recursing queries'
|
|
echo 'recursing_questions.type DERIVE'
|
|
echo 'recursing_questions.min 0'
|
|
echo 'recursing_questions.info Number of packets we performed recursive processing for'
|
|
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 queries received over TCP'
|
|
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 queries received over UDP'
|
|
echo 'tcp4_answers.label tcp4 answers'
|
|
echo 'tcp4_answers.type DERIVE'
|
|
echo 'tcp4_answers.min 0'
|
|
echo 'tcp4_answers.info Number of answers sent out over TCPv4'
|
|
echo 'open_tcp_connections.label open tcp connections'
|
|
echo 'open_tcp_connections.type GAUGE'
|
|
echo 'open_tcp_connections.min 0'
|
|
echo 'open_tcp_connections.info Number of currently open TCP connections'
|
|
echo 'udp_sndbuf_errors.label udp send buffer errors'
|
|
echo 'udp_sndbuf_errors.type DERIVE'
|
|
echo 'udp_sndbuf_errors.min 0'
|
|
echo 'udp_sndbuf_errors.info Number of errors caused in the UDP send buffer'
|
|
echo 'tcp4_queries.label tcp4 queries'
|
|
echo 'tcp4_queries.type DERIVE'
|
|
echo 'tcp4_queries.min 0'
|
|
echo 'tcp4_queries.info Number of queries received over TCPv4'
|
|
echo 'udp_answers_bytes.label udp answers bytes'
|
|
echo 'udp_answers_bytes.type DERIVE'
|
|
echo 'udp_answers_bytes.min 0'
|
|
echo 'udp_answers_bytes.info Number of answer bytes sent over UDP'
|
|
echo 'udp_do_queries.label udp do queries'
|
|
echo 'udp_do_queries.type DERIVE'
|
|
echo 'udp_do_queries.min 0'
|
|
echo 'udp_do_queries.info Number of queries received with the DO (DNSSEC OK) bit set.'
|
|
echo 'tcp6_queries.label tcp6 queries'
|
|
echo 'tcp6_queries.type DERIVE'
|
|
echo 'tcp6_queries.min 0'
|
|
echo 'tcp6_queries.info Number of queries received over TCPv6'
|
|
echo 'tcp6_answers.label tcp6 answers'
|
|
echo 'tcp6_answers.type DERIVE'
|
|
echo 'tcp6_answers.min 0'
|
|
echo 'tcp6_answers.info Number of answers sent out over TCPv6'
|
|
echo 'tcp_answers_bytes.label tcp answers bytes'
|
|
echo 'tcp_answers_bytes.type DERIVE'
|
|
echo 'tcp_answers_bytes.min 0'
|
|
echo 'tcp_answers_bytes.info Number of answer bytes sent over TCP'
|
|
echo 'udp_in_errors.label udp in errors'
|
|
echo 'udp_in_errors.type DERIVE'
|
|
echo 'udp_in_errors.min 0'
|
|
echo 'udp_in_errors.info Number of packets received faster than the OS could process them'
|
|
echo 'udp_recvbuf_errors.label udp receive buffer errors'
|
|
echo 'udp_recvbuf_errors.type DERIVE'
|
|
echo 'udp_recvbuf_errors.min 0'
|
|
echo 'udp_recvbuf_errors.info Number of errors caused in the UDP receive buffer'
|
|
echo 'tcp6_answers_bytes.label tcp6 answers bytes'
|
|
echo 'tcp6_answers_bytes.type DERIVE'
|
|
echo 'tcp6_answers_bytes.min 0'
|
|
echo 'tcp6_answers_bytes.info Number of answer bytes sent over TCPv6'
|
|
echo 'tcp4_answers_bytes.label tcp4 answers bytes'
|
|
echo 'tcp4_answers_bytes.type DERIVE'
|
|
echo 'tcp4_answers_bytes.min 0'
|
|
echo 'tcp4_answers_bytes.info Number of answer bytes sent over TCPv4'
|
|
echo 'udp_noport_errors.label udp noport errors'
|
|
echo 'udp_noport_errors.type DERIVE'
|
|
echo 'udp_noport_errors.min 0'
|
|
echo 'udp_noport_errors.label Number of UDP packets where an ICMP response was received that the remote port was not listening'
|
|
exit 0
|
|
fi
|
|
|
|
$command | sed 's/=\([0-9]\+\),/.value \1\n/g' | egrep "udp-|recursing|tcp" | sed 's/-/_/g'
|