[Date Prev] [Date Next] | [Thread Prev] [Thread Next] | [Date Index] [Thread Index] |
Re: [snips-users] SNIPS summary report cannot parse logs
|
nate said: > ./logstats.pl -f /var/www/critical.log > +1 Illegal Level (0=): Mon Mar 3 01:40:38 2003 [ippingmon]: DEVICE aphro > 10.10.10.10 VAR ICMP-ping 0 1 Pkts LEVEL Critical LOGLEVEL Critical STATE > down I did a couple changes to the loglevel.pl script and managed to get something ..not perfect but better then before.. put a buncha debugging info into the script, I'm VERY much a perl newbie but this was a good test perhaps :) http://portal.aphroland.org/logstats.diff I am really uncertain as to the log format, specifically in the above example, what the first number after the "ICMP-ping" means. The second number appears to be the actual log level. I changed the regexp ever so slightly so I could single out the second number instead of the first. Then changed this line: my $ilevel = $intlevel{substr($e_level, 0, 1)}; to: my $ilevel = $e_level; after that, it seemed to at least partially start working, I got a report for 2 of my ICMP outages reported correctly 54minutes, output of script: http://portal.aphroland.org/output.log not perfect of course but better then giving nothing! maybe someone who is better at perl then me can see what's going on? I suppose worst case is i could write some perl script to reformat the log file so it will work with nocol's old logstat script, that worked great on my systems. thanks nate |