Getting Data In

clientIP and date in logs, but in Date seconds are ignored.

vijayakumarkb
Explorer

I have a strange issue, not sure if this could be the reason.

In my logs. Client IP and Date is logged, but in splunk in Time Column, the date is displayed with seconds as zero
Eg : log as below
ClientIP="10.111.222.333" acceptHeader="application/json; charset=UTF-8" dateTime="[15/Jan/2020:05:02:08 +0000]"
so in Date column it is shown as 1/15/20 5:02:00.000 AM instead of 1/15/20 5:02:08.000 AM
This happens only when the clientIP value contains 3 numbers in the last field. ie this ip last field is 333 so when we have 3 numbers in the last field, splunk is ignoring the seconds in Date column.

Correctly displaying

Eg : log as below
ClientIP="10.111.222.44" acceptHeader="application/json; charset=UTF-8" dateTime="[15/Jan/2020:07:06:05 +0000]"
so in Date column it is shown as 1/15/20 7:06:05.000 AM, so clientIP last value is 44, only 2 numbers, so it is displaying correctly.

Anyone have any idea? Any help appreciated.

0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

The props. conf settings are inadequate. @marycordova is on the mark. Try these settings.

[access_log]
SHOULD_LINEMERGE = false
TIME_PREFIX = \[
TIME_FORMAT = %d/%b/%Y:%H:%M:%S %Z
MAX_TIMESTAMP_LOOKAHEAD = 26
---
If this reply helps you, Karma would be appreciated.

View solution in original post

0 Karma

vijayakumarkb
Explorer

Thanks a lot team, it worked. Happy 🙂

0 Karma

richgalloway
SplunkTrust
SplunkTrust

The props. conf settings are inadequate. @marycordova is on the mark. Try these settings.

[access_log]
SHOULD_LINEMERGE = false
TIME_PREFIX = \[
TIME_FORMAT = %d/%b/%Y:%H:%M:%S %Z
MAX_TIMESTAMP_LOOKAHEAD = 26
---
If this reply helps you, Karma would be appreciated.
0 Karma

richgalloway
SplunkTrust
SplunkTrust

What are the props.conf settings for that sourcetype?

---
If this reply helps you, Karma would be appreciated.

marycordova
SplunkTrust
SplunkTrust

suspect the max timestamp lookahead is set to too low of a value so when the IP address has more characters the timestamp runs beyond the lookahead limit

the props config and a sample of the raw data with both a short and a long ip could confirm

@marycordova
0 Karma

vijayakumarkb
Explorer

[access_log]
SHOULD_LINEMERGE = false

This is the only entry in props.conf

0 Karma

vijayakumarkb
Explorer

sample of data

ClientIP="10.111.222.333" acceptHeader="application/json; charset=UTF-8" dateTime="[15/Jan/2020:05:02:08 +0000]"

0 Karma
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!

[Puzzles] Solve, Learn, Repeat: Character substitutions with Regular Expressions

This challenge was first posted on Slack #puzzles channelFor BORE at .conf23, we had a puzzle question which ...

Splunk Community Badges!

  Hey everyone! Ready to earn some serious bragging rights in the community? Along with our existing badges ...

[Puzzles] Solve, Learn, Repeat: Matching cron expressions

This puzzle (first published here) is based on matching timestamps to cron expressions.All the timestamps ...