2009-12-10 13:54:48 +01:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# pdns_recursor munin plugin.
|
|
|
|
# Written by Sean Reifschneider <jafo@tummy.com> 2009-12-03
|
|
|
|
# Placed in the public domain
|
|
|
|
#
|
|
|
|
# Requires running as root:
|
|
|
|
#
|
|
|
|
# echo '[pdns_rec_*]' >/etc/munin/plugin-conf.d/pdns_rec
|
|
|
|
# echo 'user root' >>/etc/munin/plugin-conf.d/pdns_rec
|
|
|
|
|
|
|
|
if [ "$1" = "autoconf" ]; then
|
|
|
|
if [ -e /usr/bin/rec_control ]; then
|
|
|
|
echo yes
|
|
|
|
exit 0
|
|
|
|
else
|
|
|
|
echo no
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$1" = "config" ]; then
|
|
|
|
echo 'graph_title PDNS Recursor Concurrent Queries'
|
|
|
|
echo 'graph_order concurrent'
|
|
|
|
echo 'graph_vlabel queries'
|
|
|
|
echo 'graph_info Concurrent queries'
|
2017-02-22 00:30:20 +01:00
|
|
|
echo 'graph_category dns'
|
2009-12-10 13:54:48 +01:00
|
|
|
|
|
|
|
echo 'concurrent.label queries'
|
|
|
|
echo 'concurrent.min 0'
|
|
|
|
echo 'concurrent.type GAUGE'
|
|
|
|
echo 'concurrent.info Concurrent queries'
|
|
|
|
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2017-09-29 09:34:25 +02:00
|
|
|
echo concurrent.value "$(rec_control get concurrent-queries)"
|
2009-12-10 13:54:48 +01:00
|
|
|
|
|
|
|
exit 0
|