Splunk Search

Error message in sourcetype

lefelle
New Member

i have a file with filed date like 03/08/2016 09:25 GMT+02:00

My sourcetype doesn't work with
%d/%m/%Y %H:%M %Z%z
\d{2}/\d{2}/\d{4} \d{2}:\d{2} \d{2}:\d{2}

I have Failed to parse timestamp. defaulting to file modtime

Thanks

Tags (1)
0 Karma

lefelle
New Member

Hi,

It doens't work. I try to declare my sourcetype and before to accept and validate my sourcetype, i have an error. I have create a sourcetype test to have the specification in props.conf

[test_snmp]
DATETIME_CONFIG =
MAX_TIMESTAMP_LOOKAHEAD = 255
NO_BINARY_CHECK = true
SHOULD_LINEMERGE = false
TIME_FORMAT = %d/%m/%Y %H:%M GMT%z
category = Custom
pulldown_type = true

0 Karma

lguinn2
Legend

I don't know exactly what you mean by "Error message in sourcetype", but in props.conf, you should have something like this:

[yoursourcetype]
TIME_FORMAT=%d/%m/%Y %H:%M GMT%z

The regular expression is not wanted or needed to describe the time in props.conf
You really don't want to use both %Z and %z in the timestamp. I would just go with the UTC offset, as clearly "GMT" is not the actual timezone, but the base for the offset.

You may have other settings in the stanza within props.conf that affect timestamp parsing as well. If this doesn't solve your problem, can you show us the entire stanza in props.conf?

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!

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas     Cisco Live 2026 is almost here, and this ...

What Is the Name of the USB Key Inserted by Bob Smith? (BOTS Hint, Not the Answer)

Hello Splunkers,   So you searched, “what is the name of the usb key inserted by bob smith?”  Not gonna lie… ...

Automating Threat Operations and Threat Hunting with Recorded Future

    Automating Threat Operations and Threat Hunting with Recorded Future June 29, 2026 | Register   Is your ...