| [Date Prev] [Date Next] | [Thread Prev] [Thread Next] | [Date Index] [Thread Index] |
Re: [snips-users] SNIPS summary report cannot parse logs
|
Nate,
I think the problem is due to using a later version of perl than the
original logstats.pl was written for.
I modified logstats.pl as follows (note added parens around SITE|DEVICE
match).
- Rick
diff logstats.pl.orig logstats.pl
41c42
< $stime = localtime($runtime - 604800); };
---
> $stime = localtime($runtime - 604800); next; };
92c93
< if (
/^(\w+\s+\w+\s+\d+\s+\d+:\d+:\d+\s+\d+)\s+\[([^]]+)\]:\s+SITE|DEVICE\s+(\S+)
\s+(?:(\S+)\s+)?VAR\s+(\S+)\s+(\d+).*LEVEL\s+(\S+)\s+LOGLEVEL\s+(\S+)\s+NOCO
P\s+(\S+)/ )
---
> if (
/^(\w+\s+\w+\s+\d+\s+\d+:\d+:\d+\s+\d+)\s+\[([^]]+)\]:\s+(SITE|DEVICE)\s+(\S
+)\s+(?:(\S+)\s+)?VAR\s+(\S+)\s+(\d+).*LEVEL\s+(\S+)\s+LOGLEVEL\s+(\S+)\s+ST
ATE\s+(\S+)/ )
95c96
< $e_loglevel, $e_nocop) = ($1, $2, $3, $4, $5, $6, $7, $8, $9);
---
> $e_loglevel, $e_state) = ($1, $2, $4, $5, $6, $7, $8, $9, $10);
111c112,113
< $etime = $e_date; # end date for all LOGS, overwritten each time
---
> # end date for all LOGS, overwritten each time unless set to 1 week by
"-r" option
> if (!defined($runtime)) { $etime = $e_date; }
147a150
>
163,165c166,168
< print " Device Variable +--------- Downtime ---------+
Total Avg.\n",
< " Total Max Avg. %age
Downs Value\n",
<
"---------------------------------------------------------------------------
---";
---
> print " Device Variable +-------- Downtime --------+ Total
Avg.\n",
> " Total Max Avg. %age Downs
Value\n",
>
"---------------------------------------------------------------------------
---\n";
175c178
< printf "%-14s %-11s %6s %6s %6s %3s %5s %5s\n",
---
----- Original Message -----
From: "nate" <snips at aphroland org>
To: <snips-users at navya com>
Sent: Sunday, March 09, 2003 9:42 AM
Subject: [snips-users] SNIPS summary report cannot parse logs
> I was curious if anyone else had this issue.. when SNIPS sends out
> it's weekly report on downtime on my system at least it doesn't
> report anything, and says there was unparsable lines:
>
> Severity level: Critical
> Total Lines processed = , Unparseable= 20
> All times in d+hh:mm
> (this has been going on since I installed it in september '02 as
> far as I know)
>
> back when I used NOCOL it worked pretty good..
>
> the 20-line critical log file I retrieved from the backups snips
> creates when it rotates the logs, it is available here:
>
> http://portal.aphroland.org/critical.log
>
> the log entries look ok to me ......
>
> another thing when I 'view logs' in the snips cgi interface it
> doesn't show the timestamp for the event for possibly the same
> reason the log reporter is puking.
>
> running snips 1.1 on debian 3.0
>
> not a big deal since it's just my home network but was curious if
> others had experienced this.
>
> thanks!
>
> nate
>
>
>
>
|