Getting Data In

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

xuehui
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

woodcock
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!

Detecting Remote Code Executions With the Splunk Threat Research Team

WATCH NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If exploited, ...

Enter the Splunk Community Dashboard Challenge for Your Chance to Win!

The Splunk Community Dashboard Challenge is underway! This is your chance to showcase your skills in creating ...

.conf24 | Session Scheduler is Live!!

.conf24 is happening June 11 - 14 in Las Vegas, and we are thrilled to announce that the conference catalog ...