Splunk Answers-a-thon!

How to develop custom search commands?

yeasuh
Splunk Employee
Splunk Employee

How to develop custom search commands?

Labels (2)
0 Karma

Brett
SplunkTrust
SplunkTrust

Splunk provides detailed instructions and examples at https://dev.splunk.com/enterprise/docs/devtools/customsearchcommands/createcustomsearchcmd/

You can use the Splunklib python library to quickly create custom search commands in Splunk. At a bare minimum you can create a commands.con under /local and point to your sceleton python command residing under /bin and print to stdout to start with.

0 Karma

jeffland
SplunkTrust
SplunkTrust

Custom search commands are an advanced technique to enhance Splunk SPL. You write them in python, and they require a few conf files in addition to the .py and you should be good to go.

 

A good place to start would be these docs: https://dev.splunk.com/enterprise/docs/devtools/customsearchcommands/ - they also list some examples you can look at.

If you hit any roadblocks, be sure to ask a more detailed question 🙂

0 Karma
Get Updates on the Splunk Community!

Automatic Discovery Part 1: What is Automatic Discovery in Splunk Observability Cloud ...

If you’ve ever deployed a new database cluster, spun up a caching layer, or added a load balancer, you know it ...

Real-Time Fraud Detection: How Splunk Dashboards Protect Financial Institutions

Financial fraud isn't slowing down. If anything, it's getting more sophisticated. Account takeovers, credit ...

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

 Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...