Projet

Général

Profil

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

root / plugins / pdns / pdns_rec_outqueries @ a86de787

Historique | Voir | Annoter | Télécharger (1016 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 Outbound Queries'
26
	echo 'graph_order all tcp'
27
	echo 'graph_vlabel queries'
28
	echo 'graph_info Outbound queries'
29
	echo 'graph_category dns'
30

    
31
	echo 'all.label all'
32
	echo 'all.min 0'
33
	echo 'all.max 100000'
34
	echo 'all.type COUNTER'
35
	echo 'all.info All queries'
36

    
37
	echo 'tcp.label tcp'
38
	echo 'tcp.min 0'
39
	echo 'tcp.max 100000'
40
	echo 'tcp.type COUNTER'
41
	echo 'tcp.info TCP queries'
42

    
43
	exit 0
44
fi
45

    
46
echo all.value "$($rec_control get all-outqueries)"
47
echo tcp.value "$($rec_control get tcp-outqueries)"
48

    
49
exit 0