Getting Data In

JSON AN HTTP Event Collector

isabel09
New Member

How do you extract a timestamp from JSON logs that are being sent to an HTTP Event Collector?

Hello
What solution can you give me to be able to extract the JSON programming time.
alt text

0 Karma

poete
Builder

Hello @isabel09,

please find below a working example :

| makeresults 
| eval _raw="{\"ENDTIME\":\"05/08/2019 17:36\",\"JOBCODE\":\"DAY_END_JOB\",\"STARTTIME\":\"05/08/2019 17:31\",\"STATUS\":\"COMPLETED\"}"
| spath
| eval _time=strptime(STARTTIME,"%d/%m/%Y %H:%M")
0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...