Splunk Dev

How to run a search and retrieve results in custom command

sarahh
Engager

Hi, I need to write a custom script that is in python which needs to access search results. What is the best way that I can utilize Splunk's search, get results, parse them and get access to the results from within my custom code?
Thanks alot.

0 Karma

LukeMurphey
Champion

Check out the eval and rename commands. These will you to make new fields and override the values of existing fields. No Python required.

If you do want to write a custom Search command, then check out these docs.

Edit - jonuwz And on the offchance you actually mean you need the SDK to connect to splunk, run a search then read the results - the SDK docs are here

0 Karma

LukeMurphey
Champion

@jonuwz: good point.

0 Karma
Get Updates on the Splunk Community!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...