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
Legend

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!

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 ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...