Projet

Général

Profil

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

root / plugins / pdns / pdns_rec_unauth @ e5ce7492

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

1 6115c965 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 Unauthorized'
24
	echo 'graph_order tcp udp unexpected'
25
	echo 'graph_vlabel queries'
26
	echo 'graph_info Unauthorized requests'
27
	echo 'graph_category pdns'
28
29
	echo 'tcp.label tcp'
30
	echo 'tcp.min 0'
31
	echo 'tcp.max 100000'
32
	echo 'tcp.type COUNTER'
33
	echo 'tcp.info Unauthorized TCP queries'
34
35
	echo 'udp.label udp'
36
	echo 'udp.min 0'
37
	echo 'udp.max 100000'
38
	echo 'udp.type COUNTER'
39
	echo 'udp.info Unauthorized UDP queries'
40
41
	echo 'unexpected.label unexpected'
42
	echo 'unexpected.min 0'
43
	echo 'unexpected.max 100000'
44
	echo 'unexpected.type COUNTER'
45
	echo 'unexpected.info Unexpected queries (may indicate spoofing)'
46
47
	exit 0
48
fi
49
50
echo tcp.value `rec_control get unauthorized-tcp`
51
echo udp.value `rec_control get unauthorized-udp`
52
echo unexpected.value `rec_control get unexpected-packets`
53
54
exit 0