contrib-munin/plugins/pdns/pdns_qsize

42 lines
987 B
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="$pdns_control show"
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 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)"