On my windows server, I use analog to parse my log files and analyze them. The logs are daily and named as exYYMMDD.log How i can set in the analog cfg file to parse only one week of logs?
On my windows server, I use analog to parse my log files and analyze them. The logs are daily and named as exYYMMDD.log How i can set in the analog cfg file to parse only one week of logs?
I just started using analog and reportmagic myself..
I grabbed this out of the howto in the docs:
Which should give you a little help in setting up exactly what logfiles you wish to parse. In addition there's this corresponding entry, that details the "TO" and "FROM" dates:
With those, you can likely derive what you need. I'd hazard an educated guess that your answer lays within the "FROM" and "TO" .cfg entries.
As one more alternative, you could always skip those above and simply write a batch script that will move/archive or delete the previous week of logfiles -out_ of the default "\LogFiles\W3SVC1" location to say, something like "D:\IIS-Logfiles-Archive", and then run the analog analyzer for the day. Some pseudocode that might help you get started and moving in the right direction would be:
(and again, this is PSEUDO-code. Rough, ugly and fits like a wet wool sweater. There probably isn't a need to delete the directory, but I'm cribbing from another script that I use, mmmkay? :)
Sorry, that last little bit in there is if you've got reportmagic installed and running as well. If you don't, I HIGHLY recomend it. Makes analog pretty, impresses management. Mmm, Mmmm good. Like soup or something. :)
That being said, I'm going to guess that you're wanting to restrict analyzing to a week because it's taking forever for analog to parse your logs. (This is a totally random guess, and colored by my opinion, because I sorta/kinda saw the same thing when initially setting it up :)
Be advised, once you parse a set of logfiles, (say a few days worth, or a week's worth) it may take a while, however re-running analog to examine any following logfiles is extremely quick. To summarize; create a scheduled task for analog to run once a day and it while the initial run will take some time, each successive run will be much faster than the first.
HTH, mate...
Dude, I just thought of this after posting. Maybe this will help a little more, since most of the links to, "Here's how Bob did his config, and here's how Jerry did his here, which is nice and all, etc." are no longer valid.
In the hopes that it can help you out a little more, here's my analog.cfg file:
Again, hope this helps as well and good luck, mate!
For customized parsing of log files, there is a good script posted at http://www.biterscripting.com/SS_WebLogParser.html . It is written for web server logs, but you can use it as a starting point for writing your own log parser for logs of any kind.
Patrick