Projet

Général

Profil

Paste
Télécharger au format
Statistiques
| Branche: | Révision:

root / plugins / pdns / pdns_latency @ a86de787

Historique | Voir | Annoter | Télécharger (963 octets)

1
#!/bin/bash
2
#
3
# Script to monitor PowerDNS performance
4
#
5
# Parameters understood:
6
#
7
#       config   (required)
8
#       autoconf (optional - used by munin-config)
9
#%# family=auto
10
#%# capabilities=autoconf
11

    
12
pdns_control="/usr/bin/pdns_control"
13
command="$pdns_control show"
14

    
15
if [ "$1" = "autoconf" ]; then
16
        if [ -e "$pdns_control" ]; then
17
                echo yes
18
                exit 0
19
        else
20
                echo "no (missing $pdns_control)"
21
                exit 0
22
        fi
23
fi
24

    
25
if [ "$1" = "config" ]; then
26
        echo 'graph_title Power DNS latency'
27
        echo 'graph_args -l 0'
28
        echo 'graph_vlabel usec'
29
        echo 'graph_category dns'
30
        echo 'graph_info This graph shows Power DNS latency on the machine.'
31
        echo 'latency.label latency'
32
        echo 'latency.info Average number of microseconds needed to answer a question'
33
        echo 'latency.type GAUGE'
34
        exit 0
35
fi
36

    
37

    
38

    
39

    
40
echo "latency.value $($command latency)"