Debian Codegraph @

scripts/munin/freeradius_proxy_auth

raw symbols SCIP
1 #!/bin/shscip-shell filesystem . . `/bin/sh`.
2 #
3 # Plugin to count the daily amount of freeradius authentication packets.
4 #
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later version.
9 #
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
18 #
19 # Copyright (C) 2008 Alan DeKok <[email protected]>
20 #
21 # Magic markers - optional - used by installation scripts and
22 # munin-config:
23 #
24 #%# family=manual
25 #%# capabilities=autoconf
26
27 RADMIN=radmin
28 SOCKETFILE=/var/run/radiusd/radiusd.sockscip-shell filesystem . . `/var/run/radiusd/radiusd.sock`.
29
30 if [scip-shell system . . `[`. "$1" = "autoconf" ]; then
31 #
32 # FIXME: Check if FreeRADIUS is running.
33 #
34 echoscip-shell system . . echo. yes
35 exit 0
36 fi
37
38 if [scip-shell system . . `[`. "$1" = "config" ]; then
39 echoscip-shell system . . echo. 'graph_title FreeRADIUS Proxied Authentication Requests'
40 echoscip-shell system . . echo. 'graph_args --base 1000 -l 0 '
41 echoscip-shell system . . echo. 'graph_period second'
42 echoscip-shell system . . echo. 'graph_vlabel requests / ${graph_period}'
43 echoscip-shell system . . echo. 'graph_category Other'
44
45 echoscip-shell system . . echo. 'requests.label Access-Requests'
46 echoscip-shell system . . echo. 'requests.info total sent request packets'
47 echoscip-shell system . . echo. 'requests.type DERIVE'
48 echoscip-shell system . . echo. 'requests.min 0'
49
50 echoscip-shell system . . echo. 'responses.label responses (all types)'
51 echoscip-shell system . . echo. 'responses.info total received response packets'
52 echoscip-shell system . . echo. 'responses.type DERIVE'
53 echoscip-shell system . . echo. 'responses.min 0'
54
55 echoscip-shell system . . echo. 'accepts.label Access-Accepts'
56 echoscip-shell system . . echo. 'accepts.info total received Access-Accept packets'
57 echoscip-shell system . . echo. 'accepts.type DERIVE'
58 echoscip-shell system . . echo. 'accepts.min 0'
59
60 echoscip-shell system . . echo. 'rejects.label Access-Rejects'
61 echoscip-shell system . . echo. 'rejects.info total received Access-Reject packets'
62 echoscip-shell system . . echo. 'rejects.type DERIVE'
63 echoscip-shell system . . echo. 'rejects.min 0'
64
65 echoscip-shell system . . echo. 'challenges.label Access-Challenges'
66 echoscip-shell system . . echo. 'challenges.info total received Access-Challenge packets'
67 echoscip-shell system . . echo. 'challenges.type DERIVE'
68 echoscip-shell system . . echo. 'challenges.min 0'
69
70 echoscip-shell system . . echo. 'dup.label Duplicate requests'
71 echoscip-shell system . . echo. 'dup.info total duplicate request packets'
72 echoscip-shell system . . echo. 'dup.type DERIVE'
73 echoscip-shell system . . echo. 'dup.min 0'
74
75 echoscip-shell system . . echo. 'invalid.label Invalid requests'
76 echoscip-shell system . . echo. 'invalid.info total invalid request packets'
77 echoscip-shell system . . echo. 'invalid.type DERIVE'
78 echoscip-shell system . . echo. 'invalid.min 0'
79
80 echoscip-shell system . . echo. 'malformed.label Malformed requests'
81 echoscip-shell system . . echo. 'malformed.info total malformed request packets'
82 echoscip-shell system . . echo. 'malformed.type DERIVE'
83 echoscip-shell system . . echo. 'malformed.min 0'
84
85 echoscip-shell system . . echo. 'bad_signature.label Requests with bad signature'
86 echoscip-shell system . . echo. 'bad_signature.info total request packets with a bad signature'
87 echoscip-shell system . . echo. 'bad_signature.type DERIVE'
88 echoscip-shell system . . echo. 'bad_signature.min 0'
89
90 echoscip-shell system . . echo. 'dropped.label Dropped requests'
91 echoscip-shell system . . echo. 'dropped.info total request packets dropped for other reasons'
92 echoscip-shell system . . echo. 'dropped.type DERIVE'
93 echoscip-shell system . . echo. 'dropped.min 0'
94
95 echoscip-shell system . . echo. 'unknown_types.label Unknown type'
96 echoscip-shell system . . echo. 'unknown_types.info total request packets of unknown type'
97 echoscip-shell system . . echo. 'unknown_types.type DERIVE'
98 echoscip-shell system . . echo. 'unknown_types.min 0'
99
100 exit 0
101 fi
102
103 $RADMIN -f $SOCKETFILE -e "stats home_server auth" | awkscip-shell system . . awk. '{print $1".value " $2}'