Dashboards & Visualizations

splunk 6 simplexml searchtemplate not working?

kundeng
Path Finder

Has anybody used the searchTemplate with searchPostProcess with single element? I simply can't get it to work. It always shows 0.

If I run the concatenated search, it works fine. What's wrong? Here is the snippet of the code:

  <searchTemplate>
     <![CDATA[
     sourcetype=sitescope Capsuletech:  host="UHSISMONCPRA*" | regex
source="SiteScope\d{4}_\d{2}_\d{2}(?<!v2)\.log"
 | head 2000 ]]>   </searchTemplate>

inside the "dashboard" element.

Then in a single element, I have

<searchPostProcess>search NOT UHCASSPR* | dedup MonitorName sortby -_time | stats count as total</searchPostProcess>
<field>total </field>
0 Karma

MuS
SplunkTrust
SplunkTrust

Hi kundeng,

you should use a transforming command within your searchTemplate for best results; read the docs http://docs.splunk.com/Documentation/Splunk/6.2.0/AdvancedDev/PostProcess

cheers, MuS

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...