Getting Data In

python script return json, and show a table in search.

New Member

I use python script to get json data thouth an API, and i want show them in a table in splunk search.
the python script used print(json) method, and the splunk used "|script ***" command.
but the splunk search result was only a part of json data(before ther first comma).
Why? and what should i do to show all json data in a table?
please help me,thanks.

0 Karma

Esteemed Legend

Ideally splunk likes 100% true JSON which means NO SPACES. So make sure that your script does NOT output pretty JSON but true or compact JSON and Splunk should like it just fine. When Splunk presents it to you in search, it will pretty it for you then.

0 Karma
Get Updates on the Splunk Community!

.conf24 | Day 0

Hello Splunk Community! My name is Chris, and I'm based in Canberra, Australia's capital, and I travelled for ...

Enhance Security Visibility with Splunk Enterprise Security 7.1 through Threat ...

(view in My Videos)Struggling with alert fatigue, lack of context, and prioritization around security ...

Troubleshooting the OpenTelemetry Collector

  In this tech talk, you’ll learn how to troubleshoot the OpenTelemetry collector - from checking the ...