If you use Trace 3 and something like LogFile %d-radius.log in your .cfg
file, these 3 scripts might prove useful as a cronable task on UNIX to grab
all the logfile info and copy it to a file that is on your web server.  The
.html file will be refreshed so that you get a display of the denied access
attempts that occur on your Radiator servers by pointing a browser on your
workstation at this file.

Have fun,

#! /bin/sh
#  scanRadiatorLog
#       check the Radiator log for bad things to report to tech support staff
# Look for these messages:
# INFO: Access rejected for barbina: No such user

cat `/sbin/awkRadiatorDate` | grep INFO | grep 'Access rejected for' |
/sbin/CREachLine > /tmp/rad$$

# now spew the results to a file and copy it to the monitoring server
echo " <HTML>" > /tmp/radiator$$
echo "<HEAD>" >> /tmp/radiator$$
echo "<TITLE>" >> /tmp/radiator$$
echo "Radiator Authentication Log History" >> /tmp/radiator$$
echo "</TITLE>" >> /tmp/radiator$$
echo "<META HTTP-EQUIV=""Refresh"" CONTENT=300 >" >> /tmp/radiator$$
echo "</HEAD>" >> /tmp/radiator$$
echo "<BODY>" >> /tmp/radiator$$
echo "<H1>Users that have authentication problems</H1>" >> /tmp/radiator$$
echo "<HR>" >> /tmp/radiator$$

cat /tmp/rad$$ >> /tmp/radiator$$
echo "</BODY>" >> /tmp/radiator$$
echo "</HTML>" >> /tmp/radiator$$

/usr/bin/scp /tmp/radiator$$

rm /tmp/rad$$
rm /tmp/radiator$$


# add an HTML break after each line
#       CREachLine

awk 'BEGIN {
        while ( getline > 0 ) {
                printf "%s<BR>\n",$0

#! /bin/sh
# awkRadiatorDate
#      figure out what Radiator log file to look at

date | awk 'BEGIN {
        while ( getline > 0 ) {
                printf "\/var\/log\/radius\/%s-radius.log\n", $3

Archive at http://www.thesite.com.au/~radiator/
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.

Reply via email to