Link to home
Start Free TrialLog in
Avatar of Spikeuk30
Spikeuk30

asked on

managing Log Files - daily report generator tool?

Hi there,

every day I am check new entries in log files across our server fleet, compiling them into an email etc...


is there any free open source software I can use that will produce an email report from log files.

the key word is 'free' - ideally i dont want to use a script.

I would like to be able to extract certain errors and or extract events from today/yesterday compile into an email and send...

Does anyone know of any good tools which can do this?

I used to use Stealth Audit which was brilliant for this, you could create custom reports etc -unfortunately  with my new job there are no funds for such a purchase.

Does anyone know of any similar free alternatives?
Avatar of Aaron Tomosky
Aaron Tomosky
Flag of United States of America image

I use elasticsearch and kibana. Doesn't do email but you can look easy enough. To get logs into ES you can use rsyslog or logstash or all sorts of other things. I'm sure there are other things besides kibana that can do email from ES.

Depending on what you're monitoring, spiceworks can do emails but I think it needs snmp or something not log files
Avatar of Spikeuk30
Spikeuk30

ASKER

elasticsearch looks powerful but a little complicated to setup - were running windows server os and not Linux.

Maybe a script would be more suitable.

in particular i would like to read a number of text files, extract only the entries with todays date stamp against them,  compile into one txt file and email...
If you could give us an idea of the text files layout, and therefore what date formats are likely to be can do this.

We can soon either have something like one or more of these

Scan all servers in "servers.txt" file for log at C:\whatever.log
Scan all servers in "servers.txt" file for *.log at C:\whatever
Scan all files listed specifically in "files.txt"

Once you have the files defined they can be looped over in batch file quite easily.

Once you have the filenames we just need to know what the criteria is and it can be used with FIND or FINDSTR to match - dates are awkward ones sometimes that might be 01/05/2013 on one, 1 5/2013, 05/01/2013 etc. so might be you have to look for matches of several patterns of dates etc.


Steve
ok...

the log files are all in subfolders under one dir,  all called log.txt .


Timestamp format...

22/10/2011 21:00:00:

i would like a full path to the log to be placed at the point it is merged in the combined text file so i can tell when one ends and the next starts.

I notice in the log files, if there is an error there may be several lines without a timestamp - example:

31/10/2012 21:08:19:Exception StackTrace =   at test.test.ReminderEmailQueue
   at test.test.ReminderEmailQueue.QueueCreator.FeedDatabase()
   at test.test.ReminderEmailQueue.ProcessDriver.StartProcess()
31/10/2012 21:08:19:Exception Source =mscorlib
31/10/2012 21:08:20:Exception Message =Access to the path 'C:\' is denied.

so i need to cater for lines without a timestamp to have the last timestamp read.
OK, dealing with other lines like that would be an issue with the methods I was suggesting, effectively would have to read each line then when the right date was found keep going untl another date is found.  That can be done but I don't have time to write the logic at the moment, I was planning on filtering the file using "find".
ASKER CERTIFIED SOLUTION
Avatar of Spikeuk30
Spikeuk30

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Fair enough and glad you got it working...  Looks like this one didn't get any further here with anyone and didn't have time to spend giving code at that time, sorry.
created a script