Dashboards & Visualizations

python script execution from search template

assadabbas
Loves-to-Learn Lots

My app is working fine with advanced xml but as per requirements of splunk 8.0 I have to shift to simple xml. This search works fine 

<searchTemplate>| script base64 __EXECUTE__ "$input$" "$operation$"</searchTemplate>

where base64 refers to a python script path and it takes two arguments as input e.g "abc" "encode".  Output is displayed using

<searchPostProcess> table answer | rename answer as Answer</searchPostProcess>

If i replace <searchTemplate> and <searchPostProcess> with just <search>, the script is not executed and no results are displayed.

Please help me figuring out how to accomplish get the desired output with <search>.

Labels (1)
0 Karma

assadabbas
Loves-to-Learn Lots

I have also tried using <search><query> as well but it did not work

0 Karma
Get Updates on the Splunk Community!

.conf25 Registration is OPEN!

Ready. Set. Splunk! Your favorite Splunk user event is back and better than ever. Get ready for more technical ...

Detecting Cross-Channel Fraud with Splunk

This article is the final installment in our three-part series exploring fraud detection techniques using ...

Splunk at Cisco Live 2025: Learning, Innovation, and a Little Bit of Mr. Brightside

Pack your bags (and maybe your dancing shoes)—Cisco Live is heading to San Diego, June 8–12, 2025, and Splunk ...