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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...