2009-12-10 14:02:30 +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
|
|
|
|
|
2017-09-29 10:20:40 +02:00
|
|
|
rec_control="/usr/bin/rec_control"
|
|
|
|
|
2009-12-10 14:02:30 +01:00
|
|
|
if [ "$1" = "autoconf" ]; then
|
2017-09-29 10:20:40 +02:00
|
|
|
if [ -e "$rec_control" ]; then
|
2009-12-10 14:02:30 +01:00
|
|
|
echo yes
|
|
|
|
exit 0
|
|
|
|
else
|
2017-09-29 10:20:40 +02:00
|
|
|
echo "no (missing $rec_control)"
|
|
|
|
exit 0
|
2009-12-10 14:02:30 +01:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$1" = "config" ]; then
|
|
|
|
echo 'graph_title PDNS Recursor Throttling'
|
2012-10-24 17:44:16 +02:00
|
|
|
echo 'graph_order throttled'
|
2009-12-10 14:02:30 +01:00
|
|
|
echo 'graph_vlabel queries'
|
|
|
|
echo 'graph_info Throttled queries'
|
2017-02-22 00:30:20 +01:00
|
|
|
echo 'graph_category dns'
|
2009-12-10 14:02:30 +01:00
|
|
|
|
|
|
|
echo 'throttled.label throttled'
|
|
|
|
echo 'throttled.min 0'
|
|
|
|
echo 'throttled.type COUNTER'
|
|
|
|
echo 'throttled.info Throttled queries'
|
|
|
|
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2017-09-29 10:20:40 +02:00
|
|
|
echo throttled.value "$($rec_control get throttled-out)"
|
2009-12-10 14:02:30 +01:00
|
|
|
|
|
|
|
exit 0
|