Dashboards & Visualizations

unknown sid error after refreshing dashboard by clicking on F5 button

sarit_s
Communicator

Hello,

 

i'm running this dashboard :

 

 

<form>
  <label>LSAP</label>
  <fieldset submitButton="true" autoRun="true">
    <input type="text" token="lsap_token" searchWhenChanged="true">
      <label>lsap</label>
      <default>*</default>
      <change>
        <condition match="$lsap_token$ == &quot;BCG29&quot;">
          <set token="limit_token">""</set>
        </condition>
        <condition match="$lsap_token$ == &quot;COL41&quot;">
          <set token="limit_token">"127.0.0.1 tomcat: Starting dataload"</set>
        </condition>
      </change>
    </input>
  </fieldset>
  <row>
    <panel>
      <title>LSAP Dashboard</title>
      <table>
        <search>
          <query>index="prod" $lsap_token$ $limit_token$
| append
   [ search index="prod" sourcetype=flights
   | dedup Tail_no, Actual_time_departure
   | sort 0 -Actual_time_departure
   | streamstats last(Origin) as last_origin by Tail_no current=false
   | eval _time=strptime(Actual_time_arrival, "%Y-%m-%d %H:%M"), Destination=if(Destination=last_origin, Destination, "UNKNOWN")
   | rename Tail_no as tail_id]
| sort 0 _time
| streamstats latest(Destination) as airport by tail_id time_window=1mon
| search sourcetype!=flights
| fillnull value="UNKNOWN" airport
| fillnull value="unassigned" eventtype
| eval Date=strftime(_time, "%Y-%m-%d")
| table Date,tail_id,_raw, airport, eventtype
| sort tail_id, Date</query>
          <earliest>0</earliest>
          <latest></latest>
          <sampleRatio>1</sampleRatio>
        </search>
        <option name="count">20</option>
        <option name="dataOverlayMode">none</option>
        <option name="drilldown">none</option>
        <option name="percentagesRow">false</option>
        <option name="rowNumbers">false</option>
        <option name="totalsRow">false</option>
        <option name="wrap">true</option>
      </table>
    </panel>
  </row>
</form>

 

 


after refreshing the page with F5 button im getting "unknown sid" error.
it is not happening when im removing $limit_token$ from the search 

 

any suggestions what is wrong ?

 

thanks

Labels (1)
0 Karma

niketnilay
Legend

@sarit_s within an input <change> event handler the selected value should be accessed via built-in predefined token $value$

Please retry after changing the token $lsap_token$ with $value$ in the condition block of change event handler of the input.

    <input type="text" token="lsap_token" searchWhenChanged="true">
      <label>lsap</label>
      <default>*</default>
      <change>
        <condition match="$value$ == &quot;BCG29&quot;">
          <set token="limit_token">""</set>
        </condition>
        <condition match="$value$ == &quot;COL41&quot;">
          <set token="limit_token">"127.0.0.1 tomcat: Starting dataload"</set>
        </condition>
      </change>
    </input>

 PS: If there are no condition match default value *, I dont understand setting that as the default value for the text box. Also if there are only two condition blocks you can use a dropdown or radio (unless you are sampling few for simplicity)

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma
Take the 2021 Splunk Career Survey

Help us learn about how Splunk has
impacted your career by taking the 2021 Splunk Career Survey.

Earn $50 in Amazon cash!