All Apps and Add-ons

Splunk Add-on for Microsoft Windows DNS: Improper time extraction for DNS sourcetype

spectrum2035
Explorer

Timestamp extraction for the sourcetype DNS is not extracting properly. I am using Splunk_TA_microsoft_dns TA

Event- 24/06/2019 22:27:44 22BC PACKET 000002293478E4A0 UDP Snd 10.72.50.59 0008 Q [0001 D NOERROR] A (4)wpad(3)sig(3)net(0)

props

[MSAD:NT6:DNS]
SHOULD_LINEMERGE = false
MAX_TIMESTAMP_LOOKAHEAD = 24
TIME_FORMAT = %d/%m/%Y %H:%M:%S
TIME_PREFIX = ^
TRUNCATE = 999999
LINE_BREAKER = ([\r\n]+)

Error displayed on internal index:
Failed to parse timestamp in first MAX_TIMESTAMP_LOOKAHEAD (24) characters of event. Defaulting to timestamp of previous event (Mon Jun 24 15:31:35 2019). Context: source=MonitorNoHandle|host=ADCDC05|MSAD:NT6:DNS|remoteport=60045

btool output (removed some of the default fields in order to display the output properly):

/apps/splunk/splunk/etc/slave-apps/Splunk_TA_microsoft_dns/local/props.conf [MSAD:NT6:DNS]
/apps/splunk/splunk/etc/system/default/props.conf ADD_EXTRA_TIME_FIELDS = True
/apps/splunk/splunk/etc/system/default/props.conf BREAK_ONLY_BEFORE =
/apps/splunk/splunk/etc/system/default/props.conf BREAK_ONLY_BEFORE_DATE = True
/apps/splunk/splunk/etc/system/default/props.conf CHARSET = UTF-8
/apps/splunk/splunk/etc/slave-apps/Splunk_TA_microsoft_dns/default/props.conf CHECK_FOR_HEADER = false
/apps/splunk/splunk/etc/slave-apps/Splunk_TA_microsoft_dns/default/props.conf KV_MODE = none
/apps/splunk/splunk/etc/slave-apps/Splunk_TA_microsoft_dns/local/props.conf LINE_BREAKER = ([\r\n]+)
/apps/splunk/splunk/etc/system/default/props.conf LINE_BREAKER_LOOKBEHIND = 100
/apps/splunk/splunk/etc/system/default/props.conf MATCH_LIMIT = 100000
/apps/splunk/splunk/etc/system/default/props.conf MAX_DAYS_AGO = 2000
/apps/splunk/splunk/etc/system/default/props.conf MAX_DAYS_HENCE = 2
/apps/splunk/splunk/etc/system/default/props.conf MAX_DIFF_SECS_AGO = 3600
/apps/splunk/splunk/etc/system/default/props.conf MAX_DIFF_SECS_HENCE = 604800
/apps/splunk/splunk/etc/system/default/props.conf MAX_EVENTS = 256
/apps/splunk/splunk/etc/slave-apps/Splunk_TA_microsoft_dns/local/props.conf MAX_TIMESTAMP_LOOKAHEAD = 24
/apps/splunk/splunk/etc/system/default/props.conf MUST_BREAK_AFTER =
/apps/splunk/splunk/etc/system/default/props.conf MUST_NOT_BREAK_AFTER =
/apps/splunk/splunk/etc/system/default/props.conf MUST_NOT_BREAK_BEFORE =
/apps/splunk/splunk/etc/slave-apps/Splunk_TA_microsoft_dns/local/props.conf SHOULD_LINEMERGE = false
/apps/splunk/splunk/etc/slave-apps/Splunk_TA_microsoft_dns/local/props.conf TIME_FORMAT = %d/%m/%Y %H:%M:%S
/apps/splunk/splunk/etc/slave-apps/Splunk_TA_microsoft_dns/local/props.conf TIME_PREFIX = ^
/apps/splunk/splunk/etc/system/default/props.conf TRANSFORMS =
/apps/splunk/splunk/etc/slave-apps/Splunk_TA_microsoft_dns/local/props.conf TRUNCATE = 999999
/apps/splunk/splunk/etc/system/default/props.conf detect_trailing_nulls = false
/apps/splunk/splunk/etc/system/default/props.conf maxDist = 100
/apps/splunk/splunk/etc/system/default/props.conf priority =
/apps/splunk/splunk/etc/system/default/props.conf sourcetype =

0 Karma
1 Solution

jnudell_2
Builder

From what you're describing, it looks like you have events that are either not breaking properly or don't start with the timestamp.

Can you check events at the exact time of the error message for that sourcetype and see if any of the raw events don't have a timestamp at the beginning?

You can do this by searching like this:

index=<your dns index> sourcetype="MSAD:NT6:DNS"
| rex "^(?<datecheck>\d\d\/\d\d\/\d\d\d\d\s+\d\d:\d\d:\d\d)\s+"
| where isnull(datecheck)

This should show you events that don't start with your expected date format, and hopefully help you troubleshoot your date parsing error.

View solution in original post

0 Karma

jnudell_2
Builder

From what you're describing, it looks like you have events that are either not breaking properly or don't start with the timestamp.

Can you check events at the exact time of the error message for that sourcetype and see if any of the raw events don't have a timestamp at the beginning?

You can do this by searching like this:

index=<your dns index> sourcetype="MSAD:NT6:DNS"
| rex "^(?<datecheck>\d\d\/\d\d\/\d\d\d\d\s+\d\d:\d\d:\d\d)\s+"
| where isnull(datecheck)

This should show you events that don't start with your expected date format, and hopefully help you troubleshoot your date parsing error.

0 Karma

spectrum2035
Explorer

Thanks for your feedback, yes you were right as we have found some gaps (less than 100 events/hr out of 1 million)

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...