Projet

Général

Profil

Révision 9521d76f

ID9521d76fd97bef7114b69b6a472c92799fc1c751
Parent c0955538
Enfant db4ed002

Ajouté par Sean Reifschneider il y a presque 14 ans

Initial version

Voir les différences:

plugins/other/pdns_rec_issues
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
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 Exceptions'
24
	echo 'graph_order spoofs resource client server overflow'
25
	echo 'graph_vlabel queries'
26
	echo 'graph_info Exceptional queries'
27
	echo 'graph_category pdns'
28

  
29
	echo 'spoofs.label spoofs'
30
	echo 'spoofs.min 0'
31
	echo 'spoofs.max 100000'
32
	echo 'spoofs.type COUNTER'
33
	echo 'spoofs.info Spoofs prevented'
34

  
35
	echo 'resource.label resources'
36
	echo 'resource.min 0'
37
	echo 'resource.max 100000'
38
	echo 'resource.type COUNTER'
39
	echo 'resource.info Denied because of resource limits'
40

  
41
	echo 'client.label client'
42
	echo 'client.min 0'
43
	echo 'client.max 100000'
44
	echo 'client.type COUNTER'
45
	echo 'client.info Client parse errors'
46

  
47
	echo 'server.label server'
48
	echo 'server.min 0'
49
	echo 'server.max 100000'
50
	echo 'server.type COUNTER'
51
	echo 'server.info Server parse errors'
52

  
53
	echo 'overflow.label tcp concurrency'
54
	echo 'overflow.min 0'
55
	echo 'overflow.max 100000'
56
	echo 'overflow.type COUNTER'
57
	echo 'overflow.info TCP client concurrency limit'
58

  
59
	exit 0
60
fi
61

  
62
echo spoofs.value `rec_control get spoof-prevents`
63
echo resource.value `rec_control get resource-limits`
64
echo client.value `rec_control get client-parse-errors`
65
echo server.value `rec_control get server-parse-errors`
66
echo overflow.value `rec_control get tcp-client-overflow`
67

  
68
exit 0

Formats disponibles : Unified diff