2007-05-22 09:38:40 +02:00
|
|
|
#!/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'
|
2017-02-22 00:30:20 +01:00
|
|
|
echo 'graph_category dns'
|
2007-05-22 09:38:40 +02:00
|
|
|
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}')"
|
|
|
|
|