PluginCat: freeradius

File freeradius, 1.2 kB (added by lkarsten@hyse.org, 6 years ago)

basic Freeradius plugin

Line 
1 #!/bin/sh
2 #
3 # Plugin to count the daily amount of freeradius logins.
4 #
5 # Freeradius must be configured to log to syslog for this to
6 # work.
7 #
8 # Written by Lasse Karstensen <lkarsten@hyse.org> june 2006.
9 # Based on 'virus' -plugin.
10 #
11 # Magic markers - optional - used by installation scripts and
12 # munin-config:
13 #
14 #%# family=manual
15 #%# capabilities=autoconf
16
17 if [ "$1" = "autoconf" ]; then
18         echo yes
19         exit 0
20 fi
21
22 if [ "$1" = "config" ]; then
23         echo 'graph_title freeradius authentication'
24         echo 'graph_args --base 1000 -l 0 '
25         echo 'graph_vlabel number of requests'
26         echo 'graph_category Other'
27         echo 'success.label success'
28         echo 'success.info Successful Radius authentications'
29         echo 'success.type DERIVE'
30         echo 'success.min 0'
31         echo 'success.max 100000'
32         echo 'failed.label failed'
33         echo 'failed.info Failed Radius authentications'
34         echo 'failed.type DERIVE'
35         echo 'failed.min 0'
36         echo 'failed.max 100000'
37         exit 0
38 fi
39
40 echo -n "success.value " && egrep "`date +%b\ %e`.*radiusd.*Login OK"        /var/log/messages|wc -l
41 echo -n "failed.value "  && egrep "`date +%b\ %e`.*radiusd.*Login incorrect" /var/log/messages|wc -l
42