root / plugins / pdns / pdns_rec_querylatency @ a86de787
Historique | Voir | Annoter | Télécharger (841 octets)
| 1 |
#!/bin/sh |
|---|---|
| 2 |
# |
| 3 |
# pdns_recursor munin plugin. |
| 4 |
# Written by Sean Reifschneider <jafo@tummy.com> 2009-12-03 |
| 5 |
# Placed in the public domain |
| 6 |
# |
| 7 |
# Requires running as root: |
| 8 |
# |
| 9 |
# echo '[pdns_rec_*]' >/etc/munin/plugin-conf.d/pdns_rec |
| 10 |
# echo 'user root' >>/etc/munin/plugin-conf.d/pdns_rec |
| 11 |
|
| 12 |
rec_control="/usr/bin/rec_control" |
| 13 |
|
| 14 |
if [ "$1" = "autoconf" ]; then |
| 15 |
if [ -e "$rec_control" ]; then |
| 16 |
echo yes |
| 17 |
exit 0 |
| 18 |
else |
| 19 |
echo "no (missing $rec_control)" |
| 20 |
exit 0 |
| 21 |
fi |
| 22 |
fi |
| 23 |
|
| 24 |
if [ "$1" = "config" ]; then |
| 25 |
echo 'graph_title PDNS Recursor Answer Latency' |
| 26 |
echo 'graph_order latency' |
| 27 |
echo 'graph_vlabel ms' |
| 28 |
echo 'graph_info Question latency' |
| 29 |
echo 'graph_category dns' |
| 30 |
|
| 31 |
echo 'latency.label ms' |
| 32 |
echo 'latency.min 0' |
| 33 |
echo 'latency.type GAUGE' |
| 34 |
echo 'latency.info Answer latency' |
| 35 |
|
| 36 |
exit 0 |
| 37 |
fi |
| 38 |
|
| 39 |
echo latency.value "$($rec_control get qa-latency)" |
| 40 |
|
| 41 |
exit 0 |
