Refine your search:

Hi. I have done a good amount of reading on this, and it seems to be a popular subject both in the documentation and on the Answers site. Still, I'm rather stumped.

We have logs where each line starts with a date/time stamp in the format

YYYYmmdd HHMMSS hostname lots of other data

So

20110711 145022 myhost yadda yadda yadda

Splunk combines as many of these lines into one event as it can. We have tried adding the following to Props.conf on the Indexers but have had no success.

TIME_FORMAT = %Y%m%d %H%M%S
TZ = US/Eastern
MAX_EVENTS=1
SHOULD_LINEMERGE = false

Also tried TIME_FORMAT = ^%Y%m%d %H%M%S

Is this likely just a regex problem?

Other elements of the props.conf stanza are honored and acted upon when the data is indexed.

Given the simplicity of the timestamp and its presence at the very beginning of the line, I would think this would be easy to solve. Do we need to look at a custom datetime.xml file?

Thanks for any guidance.

asked 11 Jul '11, 11:39

Sqig's gravatar image

Sqig
225111
accept rate: 23%

edited 11 Jul '11, 11:45


4 Answers:

Try adding a TIME_PREFIX element which tells Splunk where to look for the time.

TIME_PREFIX = ^
TIME_FORMAT = %Y%m%d %H%M%S
link

answered 11 Jul '11, 11:54

ccannon1's gravatar image

ccannon1
111
accept rate: 0%

Thanks for the suggestion. At first, I thought this worked (!!) but a closer look showed that I was seeing additional results not related to the logs in quesiton.

When restricting my search properly, I'm still seeing the same problem I was before.

link

answered 11 Jul '11, 13:01

Sqig's gravatar image

Sqig
225111
accept rate: 23%

Your properties look right. I suppose I would question and check whether they are being applied to the incoming data.

link

answered 11 Jul '11, 13:06

gkanapathy's gravatar image

gkanapathy ♦
32.3k4827
accept rate: 41%

btool shows that the parameters described above are, in fact, being applied. I don't know of anything else I can check.

link

answered 11 Jul '11, 14:44

Sqig's gravatar image

Sqig
225111
accept rate: 23%

Post your answer
toggle preview

Follow this question

Log In to enable email subscriptions

RSS:

Answers

Answers + Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×260
×256
×27

Asked: 11 Jul '11, 11:39

Seen: 1,066 times

Last updated: 11 Jul '11, 14:44

Copyright © 2005-2012 Splunk Inc. All rights reserved.