| Syslog Summary Scripts |
|
Tracking syslog events is very important in network operations. But the syslog stream at many sites is often chatty enough that a few important events may be easily overlooked. I became aware of a neat perl script that summarizes syslog through Phil Koontz. Phil found the neat script on the Internet, but doesn't recall where. Several people have done minor modifications to it over time, but it still has the original characteristics, which is to summarize the events of the day in a way that makes it easy to find key events. The script and supporting files may be downloaded from the links at the end of this page. ========== Summary of Cisco syslog Messages on Sun Oct 11 23:59:01 2009 18 LINEPROTO-5-UPDOWN ============= Co-worker Pete Welcher incorporated some modifications to the script and created the CGI scripts that allow the summary to be accessed via a web page. We've included them in the archive file in case you want to use them too. The unpacked directory hierarchy contains the following files. Note that the cgi-bin files will need to have the path modified to match where you install the perl summarization script. summarize-nmslog2.pl: The summarization perl script. It could be improved to take an argument to allow it to run for 'yesterday' and automatically calculate the start and stop days. When run at 23:59, it may miss events that occur in the last minute of the day on a busy log (it depends on system load and how long it takes the script to startup to know how much it will miss). See the Usage message in the script for arguments. summarize-nmslog.pl.orig: The original summarization perl script from Phil Koontz. It won't work with some of the web links below because it doesn't support the arguments that the cgi scripts use nor the calculation of time deltas. www/html/summarize-nmslog.html: An html file that provides web access to different views of the syslog summary. www/cgi-bin/syslog-lasthour.pl: shows syslog summary for the last hour. It depends on the Date::Calc perl library to calculate the time differences for displaying log messages between specifics times - something that the original syslog summary script didn't do. www/cgi-bin/syslog-tail-f.pl: An automatically refreshing page that shows the last few syslog messages. For an active syslog server, it may miss some events. www/cgi-bin/syslog-today.pl: Shows the syslog messages for today, up to the current time. www/cgi-bin/syslog-yesterday.pl: Shows the syslog messages for yesterday. It depends on the crontab entry to run summarize-nmslog2.pl each day. crontab: A crontab entry for running sumarize-nmslog2.pl. It could be improved to run for 'yesterday' and run it at 00:01 each day. When run at 23:59, it will miss the events that happen in the last minute of the day. And finally, the scripts themselves, in a zip archive: summarize-syslog.zip |













