Splunk Search

How to develop custom python scripts ?

sunrise
Contributor

Hi Splunkers,

I wanna develop custom python scripts as a search command whose input data is search fields,
output data is processed data by itself.

Now I have a question that what is the best way of developing custom python scripts.
I know that logger.info() method can write to python.log, but not do how to debug and so on.
Is there anything way ?

Thank you for your help.

Tags (3)
0 Karma
1 Solution

chris
Motivator

If you want to debug the running script you could use PyDev PyDev (& Eclipse ).

View solution in original post

0 Karma

chris
Motivator

If you want to debug the running script you could use PyDev PyDev (& Eclipse ).

View solution in original post

0 Karma

sunrise
Contributor

I'm sure Pydev and eclipse environment is pretty good for remote debug.
Thank you, chris.

0 Karma

nmistry_splunk
Splunk Employee
Splunk Employee

This is a broad question. Can you elaborate on what you wan to debug? Look at other scripts under SPLUNK_HOME/etc/apps/search/bin as examples on how to.

0 Karma
Take the 2021 Splunk Career Survey

Help us learn about how Splunk has
impacted your career by taking the 2021 Splunk Career Survey.

Earn $50 in Amazon cash!