Getting Data In

trouble getting started

mikehughes
New Member

I'm trying to find a way to analyse iTunes log files - I'm pretty sure Splunk can help me here, have got some data in but need some help.

My log data look like this, I have 1 log file per day:

ARTIST_ID   ITUNES_ID   ACTION_TYPE TITLE   URL EPISODE_ID  EPISODE_TITLE   EPISODE_TYPE    STOREFRONT  USERAGENT   IP_ADDRESS  TIMESTAMP
402424201   405050927   Browse  Psychology  http://itunes.apple.com/WebObjects/DZR.woa/wa/viewPodcast?cc=cn&id=405050927    0           143465  iTunes/10.5.2 (Windows; Microsoft Windows XP Professional Service Pack 3 (Build 2600)) AppleWebKit/534.52.7 59.40.x.x   2012-01-19 00:08:29.000-0800
402424201   405050927   Browse  Psychology  http://itunes.apple.com/WebObjects/DZR.woa/wa/viewPodcast?cc=de&id=405050927    0           143443  iTunes/10.5.2 (Macintosh; Intel Mac OS X 10.6.8) AppleWebKit/534.52.7   77.190.x.x  2012-01-19 00:33:29.000-0800
402424201   420615508   Browse  Sociology   http://itunes.apple.com/WebObjects/DZR.woa/wa/viewPodcast?cc=us&id=420615508    0           143441  iTunes/10.5.2 (Macintosh; Intel Mac OS X 10.6.8) AppleWebKit/534.52.7   174.117.x.x 2012-01-19 00:36:14.000-0800
402424201   405050927   Stream  Psychology  http://itunes.apple.com/WebObjects/DZR.woa/wa/viewPodcast?cc=de&id=405050927    89066156    Deal or No Deal, Terrorism and Bicycle Accidents    video   143443  iTunes/10.5.2 (Macintosh; Intel Mac OS X 10.6.8) AppleWebKit/534.52.7   77.190.x.x  2012-01-19 00:36:33.000-0800

I have managed to get it to find the correct timestamp using a regexp and saved a source type but when I get it to index other data files from the same directory using the same source type and then view the data in search it's created a separate source type for each new file and not got the correct timestamp or breaks.

Also, how do I deal with the first line of field headings?

Can anyone help or point me to a basic tutorial?

0 Karma

yannK
Splunk Employee
Splunk Employee

Define a sourcetype in the props.conf, apply this sourcetype in inputs.conf
then you can pick automatic header detection, or define a fix name for the fields.

see http://docs.splunk.com/Documentation/Splunk/4.3.1/Data/Extractfieldsfromfileheadersatindextime

Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Splunk Add-on for Microsoft Windows 11.0.3: Parse Once, Search Faster

The updated Splunk Add-on for Microsoft Windows helps customers search Windows events faster by reducing ...

What's New in Splunk Enterprise Security 8.8 and Beyond

Threats move at machine speed. Keeping up should not depend on having the biggest budget, the largest team, or ...

A Four-Part Event Series: State of Observability - Where AI Meets Performance

As AI agents take on more complex tasks, teams need greater visibility into how they behave, what they cost, ...