| 1 |
#!/bin/sh |
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 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 |
|
|---|