Projet

Général

Profil

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

root / plugins / power / pdns_errors @ a8f7b903

Historique | Voir | Annoter | Télécharger (1,34 ko)

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
command="/etc/init.d/pdns dump"
13

    
14
if [ "$1" = "autoconf" ]; then
15
        echo yes
16
        exit 0
17
fi
18

    
19
if [ "$1" = "config" ]; then
20
        echo 'graph_title Power DNS errors'
21
        echo 'graph_args -l 0 --base 1000'
22
        echo 'graph_vlabel numbers of'
23
        echo 'graph_category Power DNS'
24
        echo 'graph_info This graph shows Power DNS performance on the machine.'
25
        echo 'corrupt_packets.label corrupt packets'
26
        echo 'corrupt_packets.type DERIVE'
27
        echo 'corrupt_packets.min 0'
28
        echo 'corrupt_packets.info Number of corrupt packets received'
29
        echo 'servfail_packets.label servfail packets'
30
        echo 'servfail_packets.type DERIVE'
31
        echo 'servfail_packets.min 0'
32
        echo 'servfail_packets.info Number of times a server-failed packet was sent out'
33
        echo 'timedout_packets.label timedout packets'
34
        echo 'timedout_packets.type DERIVE'
35
        echo 'timedout_packets.min 0'
36
        echo 'timedout_packets.info Number of packets which weren not answered within timeout set'
37
        exit 0
38
fi
39

    
40

    
41
$command | sed 's/=\([0-9]\+\),/.value \1\n/g' | grep corrupt'\|'servfail'\|'timedout | sed 's/-/_/g'