Splunk Dev

App to grab web JSON respoonse and log to splunk

brent_weaver
Builder

I have a request to log a web response that is JSON formatted. The evet looks like

{"state":"OK","id":"135b","date":"2017-07-14","host":"host1","cluster":"cluster_dev"}

I will modify the JSON to include a timestamp but I need to figure out how to get this into a splunk index. I can easiy write apython script using requests to do a get and then post to HEC but I would prefer to find a canned splunk app that will do this.

Tags (1)
0 Karma

woodcock
Esteemed Legend

For HEC you MUST put your timestamp in your root object and preferably as the first element, preferably as a single value. You can have HEC timestamp with the _indextime (the time the indexer received the event) but I am not aware of any way to take the date from the event and the time from somewhere else.

0 Karma
Get Updates on the Splunk Community!

Detecting Remote Code Executions With the Splunk Threat Research Team

REGISTER NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If ...

Observability | Use Synthetic Monitoring for Website Metadata Verification

If you are on Splunk Observability Cloud, you may already have Synthetic Monitoringin your observability ...

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...