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 Splunk Enterprise 9.2

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

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...