Getting Data In

How to change timeformat in props.conf for a specific sourcetype?

Simone
Explorer

Hi all,

i want to change the timestamp on event:

Simone_0-1692262979119.png

I want put the createDteTime on Time (yellow)

I changed the props.conf as follow:

 

 

[sourcetype]
INDEXED_EXTRACTIONS = json
TIMESTAMP_FIELDS = createdDateTime\":
TIME_FORMAT = %FT%TZ

 

 


But at the moment does not work.

Any idea?

Thanks!

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

PickleRick
SplunkTrust
SplunkTrust

1. Indexed extractions are not something that should be used lightly. Unless you have a very good use case for it, you should stick to search-time extractions (aka KV_MODE=json in this case).

2a. You should _never_ touch the */default/* files! (unless you're making your own app and providing the default config for it). Your overwrites should go to the local directory.

2b. But on which component did you put those settings?

Did you adjust any other settings regarding this sourcetype? What does the btool say? (splunk btool props list <your_sourcetype> --debug)

 

View solution in original post

PickleRick
SplunkTrust
SplunkTrust

1. Why are you using INDEXED_EXTRACTIONS? Why is KV_MODE=json not enough?

2. Where do you have your props.conf?

3. Your field is called createdDateTime, not createdDateTime":

0 Karma

Simone
Explorer
  1. Since it doesn't work without it, I tried adding INDEXED_EXTRACTIONS
  2. etc\system\default
  3. i tried both, it doesn't work

Thanks

0 Karma

PickleRick
SplunkTrust
SplunkTrust

1. Indexed extractions are not something that should be used lightly. Unless you have a very good use case for it, you should stick to search-time extractions (aka KV_MODE=json in this case).

2a. You should _never_ touch the */default/* files! (unless you're making your own app and providing the default config for it). Your overwrites should go to the local directory.

2b. But on which component did you put those settings?

Did you adjust any other settings regarding this sourcetype? What does the btool say? (splunk btool props list <your_sourcetype> --debug)

 

Simone
Explorer

You right! i have change the value directly on the app's props.conf reported the correct field and now it works.

Thanks!

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @Simone,

good for you, see next time!

Ciao and happy splunking

Giuseppe

P.S.: Karma Points are appreciated by all the contributors 😉

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @Simone ,

did you tried:

[sourcetype]
INDEXED_EXTRACTIONS = json
TIMESTAMP_FIELDS = createdDateTime
TIME_PREFIX =createdDateTime:\s+
TIME_FORMAT = %Y-%m-%dT%H:%M:%SZ

Ciao.

Giuseppe

0 Karma

Simone
Explorer

Hi Giuseppe,

unfortunately doesn't work. The raw is the following: "createdDateTime": "2023-08-17T10:10:59Z"

i don't know if i have to change the regex

Tags (1)
0 Karma
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 ...