Dashboards & Visualizations

searchPostProcess downstream panels not reloading after token input change

the_wolverine
Champion

I have a form that uses a searchTemplate and postProcess. The form is so that the user can select the time range for the base query. When I change the time range using the drop down, my postProcess panels are not being updated. What am I don't wrong?

<form>
  <label>Sample Dashboard</label>
  <description>USES POSTPROCESS</description>
    <fieldset submitButton="true" autoRun="false">
    <input type="time" token="earliest" searchWhenChanged="true">
      <label>Select Timerange</label>
      <default>
        <earliest>-1h</earliest>
        <latest>now</latest>
      </default>
    </input>
  </fieldset>
  <searchTemplate>index=summary search_name="Summary Test" | stats sum(total) as total sum(bytes) as bytes by city,state</searchTemplate> 
          <earliest>$earliest.earliest$</earliest>
          <latest>$earliest.latest$</latest>
  <row>
    <panel>
      <table>
        <title>bytes by city,state</title>
        <searchPostProcess>search state=CA  | stats sum(bytes) as bytes by city </searchPostProcess>
          <earliest>$earliest.earliest$</earliest>
          <latest>$earliest.latest$</latest>
        <option name="wrap">true</option>
        <option name="rowNumbers">false</option>
        <option name="dataOverlayMode">none</option>
        <option name="drilldown">cell</option>
        <option name="count">10</option>
      </table>
    </panel>
</row>
</form>
0 Karma

renjith_nair
Legend

Which versin of splunk you are using ?

I think you should use

               <earliestTime>$earliest.earliest$</earliestTime>
               <latestTime>$earliest.latest$</latestTime>

Instead of earliest and latest

Below works fine for me

     <form>
       <label>Sample Dashboard</label>
       <description>USES POSTPROCESS</description>
         <fieldset submitButton="false" autoRun="false">
         <input type="time" token="earliest" searchWhenChanged="true">
           <label>Select Timerange</label>
           <default>Last 24 hours</default>
         </input>
       </fieldset>
       <searchTemplate>index=_internal | stats count by sourcetype</searchTemplate> 
               <earliestTime>$earliest.earliest$</earliestTime>
               <latestTime>$earliest.latest$</latestTime>
       <row>
         <panel>
           <table>
             <title>bytes by city,state</title>
             <searchPostProcess>search sourcetype="splunkd"  | stats sum(count) </searchPostProcess>
               <earliestTime>$earliest.earliest$</earliestTime>
               <latestTime>$earliest.latest$</latestTime>
             <option name="wrap">true</option>
             <option name="rowNumbers">false</option>
             <option name="dataOverlayMode">none</option>
             <option name="drilldown">cell</option>
             <option name="count">10</option>
           </table>
         </panel>
     </row>
     </form>
---
What goes around comes around. If it helps, hit it with Karma 🙂
0 Karma

renjith_nair
Legend

Does it work for you?

---
What goes around comes around. If it helps, hit it with Karma 🙂
0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Take Action Automatically on Splunk Alerts with Red Hat Ansible Automation Platform

 Are you ready to revolutionize your IT operations? As digital transformation accelerates, the demand for ...

Calling All Security Pros: Ready to Race Through Boston?

Hey Splunkers, .conf25 is heading to Boston and we’re kicking things off with something bold, competitive, and ...

Beyond Detection: How Splunk and Cisco Integrated Security Platforms Transform ...

Financial services organizations face an impossible equation: maintain 99.9% uptime for mission-critical ...