3 # Plugin to count the daily amount of freeradius authentication packets.
5 # Written by Alan DeKok <aland@freeradius.org>
7 # Magic markers - optional - used by installation scripts and
11 #%# capabilities=autoconf
14 SOCKETFILE=/var/run/radiusd/radiusd.sock
16 if [ "$1" = "autoconf" ]; then
18 # FIXME: Check if FreeRADIUS is running.
24 if [ "$1" = "config" ]; then
25 echo 'graph_title FreeRADIUS Accounting Requests'
26 echo 'graph_args --base 1000 -l 0 '
27 echo 'graph_period second'
28 echo 'graph_vlabel requests / ${graph_period}'
29 echo 'graph_category Other'
31 echo 'requests.label Accounting-Requests'
32 echo 'requests.info total incoming request packets'
33 echo 'requests.type DERIVE'
36 echo 'responses.label Accounting-Responses'
37 echo 'responses.info total outgoing response packets'
38 echo 'responses.type DERIVE'
39 echo 'responses.min 0'
41 echo 'dup.label Duplicate requests'
42 echo 'dup.info total duplicate request packets'
43 echo 'dup.type DERIVE'
46 echo 'invalid.label Invalid requests'
47 echo 'invalid.info total invalid request packets'
48 echo 'invalid.type DERIVE'
51 echo 'malformed.label Malformed requests'
52 echo 'malformed.info total malformed request packets'
53 echo 'malformed.type DERIVE'
54 echo 'malformed.min 0'
56 echo 'bad_signature.label Requests with bad signature'
57 echo 'bad_signature.info total request packets with a bad signature'
58 echo 'bad_signature.type DERIVE'
59 echo 'bad_signature.min 0'
61 echo 'dropped.label Dropped requests'
62 echo 'dropped.info total request packets dropped for other reasons'
63 echo 'dropped.type DERIVE'
66 echo 'unknown_types.label Unknown type'
67 echo 'unknown_types.info total request packets of unknown type'
68 echo 'unknown_types.type DERIVE'
69 echo 'unknown_types.min 0'
74 $RADMIN -f $SOCKETFILE -e "stats client acct" | awk '{print $1".value " $2}'