Notices
Computer & Technology Related Post here for help and discussion of computing and related technology. Internet, TVs, phones, consoles, computers, tablets and any other gadgets.

Log file analysis

Thread Tools
 
Search this Thread
 
Old 24 January 2013, 03:41 PM
  #1  
markr1963
Scooby Regular
Thread Starter
 
markr1963's Avatar
 
Join Date: Jun 2002
Location: Perth, Western Australia
Posts: 1,866
Likes: 0
Received 0 Likes on 0 Posts
Default Log file analysis

I have a variety of log files from disparate sources that I need to analyse for spurious activity.
For these various log files I need to look back a few months but only between a certain time period on any given day. I've had a look at Splunk and while I can use date ranges for start/end criteria, I can't figure out how to do what I need.

So, using Splunk, is there away to do what I need? Or is there a better tool?

TIA

Mark
Old 24 January 2013, 04:08 PM
  #2  
IWatkins
Scooby Regular
 
IWatkins's Avatar
 
Join Date: Mar 2000
Location: Gloucestershire, home of the lawnmower.
Posts: 4,531
Likes: 0
Received 0 Likes on 0 Posts
Default

Would some simple scripts in Python do the job? That's what I usually reach for for this kind of job.
Old 24 January 2013, 09:18 PM
  #3  
markjmd
Scooby Regular
iTrader: (11)
 
markjmd's Avatar
 
Join Date: May 2009
Posts: 4,341
Received 70 Likes on 50 Posts
Default

Isn't standard practise these days to outsource this kind of thing to a team of low-paid Indians or Chinese?

Seriously though, if Ian's suggestion of Python doesn't really register with you, post up whether you're using Linux or Windows along with a quick sample of the format that the time is displayed in in your logs, and I can send you the 'grep' or 'find' commands you'd need to extract the lines you want out of the logs.
Old 24 January 2013, 11:21 PM
  #4  
jpor
Scooby Regular
iTrader: (1)
 
jpor's Avatar
 
Join Date: Sep 2003
Posts: 3,109
Likes: 0
Received 0 Likes on 0 Posts
Default

If using BASH or KSH in a UNIX/LINUX setup, then a simple shell script can be used to interogate a flat file you describe.
Have a look into Grep, and even cut and awk commands.

If this is windows then a Command Line Batch file maybe able to be deployed.

Have heard of Splunk, I know of a certain Banking institution who are using this/were as the people who researched this product claimed it was a good way to keep log files in tune.
Old 25 January 2013, 12:42 PM
  #5  
markr1963
Scooby Regular
Thread Starter
 
markr1963's Avatar
 
Join Date: Jun 2002
Location: Perth, Western Australia
Posts: 1,866
Likes: 0
Received 0 Likes on 0 Posts
Default

Thanks, all

Some of the logs have been CSV files so have used Excel/Access. For some of the others I have used WinGrep. Found a handy utility for viewing IAS logs too.

Still have to look at IronPort email and web logs plus a whole bunch of Unix stuff.

Haven't clue about Python.
Old 25 January 2013, 12:49 PM
  #6  
jpor
Scooby Regular
iTrader: (1)
 
jpor's Avatar
 
Join Date: Sep 2003
Posts: 3,109
Likes: 0
Received 0 Likes on 0 Posts
Default

Originally Posted by markr1963
Thanks, all

Some of the logs have been CSV files so have used Excel/Access. For some of the others I have used WinGrep. Found a handy utility for viewing IAS logs too.

Still have to look at IronPort email and web logs plus a whole bunch of Unix stuff.

Haven't clue about Python.
Think you are going around the houses here. Unless you have multiple systems with various types of logs.
If the files are in a comma seperated format thyen why not port them all onto a single LINUX/UNIX server and then run a 1 off script for the analysis? A basic shell script can do this for you. You could alway automate with an SFTP/FTP to bring the files over and then call the script to do what you want.

Python is a type of programming language, there are others like PERL. But for what you want to do then a simple shell script in LINUX/UNIX will suffice. No need to go to complicated unless you need to accomplish complicated things
Old 25 January 2013, 01:04 PM
  #7  
markr1963
Scooby Regular
Thread Starter
 
markr1963's Avatar
 
Join Date: Jun 2002
Location: Perth, Western Australia
Posts: 1,866
Likes: 0
Received 0 Likes on 0 Posts
Default

Yep, multiple systems; Windows event logs, IIS, RAS, NPS, SharePoint, IronPort, Unix and some Cisco stuff and probably a few others.

I don't know Linux, born and bred Windoze
Old 25 January 2013, 06:50 PM
  #8  
jpor
Scooby Regular
iTrader: (1)
 
jpor's Avatar
 
Join Date: Sep 2003
Posts: 3,109
Likes: 0
Received 0 Likes on 0 Posts
Default

Originally Posted by markr1963
Yep, multiple systems; Windows event logs, IIS, RAS, NPS, SharePoint, IronPort, Unix and some Cisco stuff and probably a few others.

I don't know Linux, born and bred Windoze
Fair enough. Maybe worth getting them all into 1 place and looking at what can be done with MS Excel. Maybe the reporting tool on excel could be of help.

Good luck.
Old 26 January 2013, 09:33 PM
  #9  
markjmd
Scooby Regular
iTrader: (11)
 
markjmd's Avatar
 
Join Date: May 2009
Posts: 4,341
Received 70 Likes on 50 Posts
Default

Originally Posted by markr1963
Yep, multiple systems; Windows event logs, IIS, RAS, NPS, SharePoint, IronPort, Unix and some Cisco stuff and probably a few others.

I don't know Linux, born and bred Windoze
If we're talking about basic shell scripts and 'grep', pretty much everything that can be done in Linux can also be done in Windows with the right batch file(s) and 'find'. It would just be a little less straightforward and a bit more ugly.

At the end of the day you're still looking for a string or pattern of strings, which is far from rocket-science.
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
KAS35RSTI
Subaru
27
04 November 2021 07:12 PM
Sam Witwicky
Engine Management and ECU Remapping
17
13 November 2015 10:49 AM
Nick_Cat
Computer & Technology Related
2
26 September 2015 08:00 AM
Littleted
Computer & Technology Related
0
25 September 2015 08:44 AM
riiidaa
ScoobyNet General
1
12 September 2015 11:52 AM



Quick Reply: Log file analysis



All times are GMT +1. The time now is 05:35 AM.