Getting Data In

Splunk pulling the date from log data - not timestamp

hharvey
Explorer

I have two types of logs that are formatted thusly:

hostname app->name: date time log data

and

hostname:date time log data

Very sporadically the log data portion of these logs may have a date in it (this is user inputted text) and Splunk pulls the date from the log data in these cases. It causes future dated events that seem like they would be easy to fix, but can't come up with the right props.conf stanza to fix.

Examples:

a2-sb123 App->internal: 2011-12-13 15:23:24,556 INFO  internal  - Incoming Header: subject=FW:A Cool Night Out - Dec. 14, 2011
a2-sb123 App->internal: 2011-12-12 21:28:33,338 INFO  internal  - Incoming Header: subject=FW:December 14, 2011: This is the subject

a2-sb124:2011-12-12 20:50:12,950 INFO  [UI] !!!!! username clicked on saveandnext for agent Dec 14 2011 in SLE
a2-sb124:2011-12-13 03:53:31,689 INFO  UI [ID:wyetdTDrewWE1] - !!!!! username clicked on save for agent 14 Dec 2011 in SLE

Though the logs are dated correctly, Splunk dates the events for December 14th.

I've tried using this in props.conf, but it's not working, maybe it's the use of wildcard? Unfortunately host is the easiest spec to use to get to this data, as the sources and sourcetypes are varied for these servers.

[host::a2-sb*]
TIME_FORMAT = %Y-%m-%d %H:%M:%S
MAX_TIMESTAMP_LOOKAHEAD = 50

Any suggestions?

0 Karma
1 Solution

tgow
Splunk Employee
Splunk Employee

The "*" is legal in the host setting in the props.conf. You might try the following in your props.conf

[host::a2-sb*]
TIME_FORMAT = %Y-%m-%d %H:%M:%S
TIME_PREFIX = \w+:

View solution in original post

tgow
Splunk Employee
Splunk Employee

The "*" is legal in the host setting in the props.conf. You might try the following in your props.conf

[host::a2-sb*]
TIME_FORMAT = %Y-%m-%d %H:%M:%S
TIME_PREFIX = \w+:
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!

Step into “Hunt the Insider: An Splunk ES Premier Mystery” to catch a cybercriminal ...

After a whole week of being on call, you fell asleep on your keyboard, and you hit a sequence of buttons that ...

SplunkTrust Application Period is Officially OPEN!

It's that time, folks! The application/nomination period for the 2026-2027 SplunkTrust is officially open. If ...

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...