Splunk Search

ISO 8601 TimeStamp Extraction / Formatting and Source Type Config

DGilbert91
Explorer

Hi all,

I have a timestamp in a format I havn't dealt with before and I am struggling to get it converted to my timezone using the offset. In raw event form it is like this:
"TimeGenerated": "2022-10-25T04:21:50.2975103Z"

I have also attached a screenshot of how splunk is indexing it.

My second question is how would I configure the sourcetype to have splunk use TimeGenerated field as _time automatically? I've attached a second screenshot with the sourcetype as well.

DGilbert91_0-1666824153338.png

 

Any help or links would be greatly appreciated!

Labels (1)
0 Karma
1 Solution

johnhuang
Motivator

Try the following settings:

 

TIME_FORMAT = %Y-%m-%dT%H:%M:%S.%7N%Z
TIME_PREFIX = "TimeGenerated":\s"

View solution in original post

0 Karma

johnhuang
Motivator

Try the following settings:

 

TIME_FORMAT = %Y-%m-%dT%H:%M:%S.%7N%Z
TIME_PREFIX = "TimeGenerated":\s"

0 Karma

DGilbert91
Explorer

hey johnhuang,

I have attempted your suggestion and ingested some more data:

DGilbert91_0-1666841246381.png

 

Unfortunately it doesn't look like it has updated _time correctly:

DGilbert91_1-1666841276825.png

 

Would these settings have any impact as well?

DGilbert91_2-1666841353094.png

 

 

Appreciate your help, thanks mate

0 Karma

johnhuang
Motivator

If the data is being processed by a heavy forwarder, make sure this is applied there.

0 Karma

DGilbert91
Explorer

This worked perfectly thanks mate!

Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...