Splunk Enterprise

How to write time format for 2022-04-07 20:40:03.360 -06:00 [XXX] XXXXX?

Hemnaath
Motivator

How to write time format for the below  event log 

2022-04-07 20:40:03.360 -06:00 [XXX] Hosting starting.
2022-04-07 20:40:03.474 -06:00 [XXX] Hosting starting.
2022-04-07 20:40:03.493 -06:00 [XXX] Hosting starting.

Getting Could not use strptime to parse the time stamp from 2022-04-07 20:40:03.360 -06:00

[Sourcetype]

SHOULD_LINEMERGE=false
LINE_BREAKER=([\r\n]+)\d+\-\d+\-\d+\s\d+\:\d+\d:\d+\.\d+\s+[^\]]+\]
NO_BINARY_CHECK=true
disabled=false
TIME_PREFIX=^
TIME_FORMAT=%Y/%m/%d %H:%M:%S.%3N %z   
MAX_TIMESTAMP_LOOKAHEAD=31

Kindly guide me to fix this time stamp issue.

Labels (2)
Tags (1)
0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

You're close, but the given string doesn't use the same separators as the data.  Also, a time zone with embedded ":" needs a different format character.  Try this:

TIME_FORMAT=%Y-%m-%d %H:%M:%S.%3N %:z

   

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

View solution in original post

0 Karma

richgalloway
SplunkTrust
SplunkTrust

You're close, but the given string doesn't use the same separators as the data.  Also, a time zone with embedded ":" needs a different format character.  Try this:

TIME_FORMAT=%Y-%m-%d %H:%M:%S.%3N %:z

   

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

Hemnaath
Motivator

thanks, It fixed the error.

0 Karma
Get Updates on the Splunk Community!

Now Available: Cisco Talos Threat Intelligence Integrations for Splunk Security Cloud ...

At .conf24, we shared that we were in the process of integrating Cisco Talos threat intelligence into Splunk ...

Preparing your Splunk Environment for OpenSSL3

The Splunk platform will transition to OpenSSL version 3 in a future release. Actions are required to prepare ...

Easily Improve Agent Saturation with the Splunk Add-on for OpenTelemetry Collector

Agent Saturation What and Whys In application performance monitoring, saturation is defined as the total load ...