1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-25 02:18:08 +00:00
Munin-Contrib/plugins/pdns/pdns_qsize
Bas Couwenberg 87d30e5597 Use pdns_control utility instead of pdns init script.
The init script is not usable on systems using systemd (e.g. Debian stretch).
2017-09-28 09:54:22 +02:00

40 lines
938 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
command="/usr/bin/pdns_control show"
if [ "$1" = "autoconf" ]; then
if [ -e /usr/bin/pdns_control ]; then
echo yes
exit 0
else
echo no
exit 1
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)"