Splunk Search

Splunk to activate python script

mrccasi
Explorer

Hi. i want to ask if you guys have any idea how to connect a splunk search to run a python script? What I'm doing is like a machine learning that when the search results have for example "please create a user id for..." the python will run a script that will trigger the script that creates a new user id.

Thank you.

Tags (1)
0 Karma

aakwah
Builder

Hello,

You can achieve this using alerts, and in Trigger Actions section choose Run a script.

After you search is completed, click on Save As -> Alert -> Add Actions -> Run a script -> type script name.

Location of script:
$SPLUNK_HOME/bin/scripts

Regards

0 Karma

mrccasi
Explorer

hello aakwah -

will it run the python script? i will try it. thank you.

0 Karma

aakwah
Builder

Yes, it will run python scripts.

Regards

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...