root / plugins / pdns / pdns_rec_querylatency @ e5ce7492
Historique | Voir | Annoter | Télécharger (783 octets)
| 1 | af3fb33d | Sean Reifschneider | #!/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 | if [ "$1" = "autoconf" ]; then |
||
| 13 | if [ -e /usr/bin/rec_control ]; then |
||
| 14 | echo yes |
||
| 15 | exit 0 |
||
| 16 | else |
||
| 17 | echo no |
||
| 18 | exit 1 |
||
| 19 | fi |
||
| 20 | fi |
||
| 21 | |||
| 22 | if [ "$1" = "config" ]; then |
||
| 23 | echo 'graph_title PDNS Recursor Answer Latency' |
||
| 24 | echo 'graph_order latency' |
||
| 25 | echo 'graph_vlabel ms' |
||
| 26 | echo 'graph_info Question latency' |
||
| 27 | echo 'graph_category pdns' |
||
| 28 | |||
| 29 | echo 'latency.label ms' |
||
| 30 | echo 'latency.min 0' |
||
| 31 | echo 'latency.type GAUGE' |
||
| 32 | echo 'latency.info Answer latency' |
||
| 33 | |||
| 34 | exit 0 |
||
| 35 | fi |
||
| 36 | |||
| 37 | echo latency.value `rec_control get qa-latency` |
||
| 38 | |||
| 39 | exit 0 |
