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!

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...