Splunk Search

Dynamic Table Issue

ringbbg
Engager

HI All. I have a simple dashboard where the data in the statistic table changes everytime you change the dropdown input.
The problem is it only works the first time its loaded, for example, on what is set as default. When I change the dropdown entry, instead of displaying the new table, it displays a random table with random fields...can someone please help?
Below is the code:

  <label>Alarms</label>
  <choice value="1">No Data</choice>
  <choice value="2">Connection Refused</choice>
  <choice value="3">Missing Sequence</choice>
  <choice value="4">Remote Disconnect</choice>
  <default>Connection Refused</default>
  <change>
    <condition value="1">
      <set token="alarms">drqs EXCHANGE sourcetype = ntwkserv "NO DATA" _raw!=*disconnect* |  rex field=_raw "(?<PARSER>\D\FIFW\s\w+\s\w+\s.+\DGO\D\D)" max_match=0 | table _time, PARSER,FE_MACHINE,ERROR,Ticket | sort 0 -_time</set>
    </condition>
    <condition value="2">
      <set token="alarms">drqs EXCHANGE sourcetype = ntwkserv TCPReceiver *refused* | rex field=_raw "(?<PARSER>\D\FIFW\s\w+\s\w+\s.+\DGO\D\D)" max_match=0 | table _time, PARSER, MACHINE,ISSUE,iP,pORT,Ticket | sort 0 -_time</set>
    </condition>
    <condition value="3">
      <set token="alarms">drqs EXCHANGE sourcetype = ntwkserv missing _raw!=*refresh* | rex field=_raw "(?<PARSER>\D\FIFW\s\w+\s\w+\s.+\DGO\D\D)" max_match=0 | table _time, PARSER, MACHINE, error, Ticket | sort 0 -_time</set>
    </condition>
    <condition value="4">
      <set token="alarms">drqs EXCHANGE sourcetype = ntwkserv TCPReceiver *Remote* | rex field=_raw "(?<PARSER>\D\FIFW\s\w+\s\w+\s.+\DGO\D\D)" max_match=0 | table _time, PARSER, MACHINE,ISSUE,iP,pORT,Ticket | sort 0 -_time</set>
    </condition>
  </change>
</input>



<panel>
  <table token="alarms">
    <search>
      <query>$alarms$</query>
      <earliest>$field6.earliest$</earliest>
      <latest>$field6.latest$</latest>
    </search>
    <option name="wrap">undefined</option>
    <option name="rowNumbers">undefined</option>
    <option name="drilldown">row</option>
    <option name="dataOverlayMode">none</option>
    <option name="count">20</option>
  </table>
</panel>
0 Karma

DalJeanis
Legend

@ringbbg -

What, specifically, do you mean by "random"? Is it one of the four, or something else?

Ah.

Your table token matches the token you use in your query. That may be confusing matters - using your first output as the second query.

I'd suggest that you change the table token.

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Manage Edge Processor pipelines end to end with APIs

This guide uses the Data Management APIs to create an Edge Processor, onboard one instance, deploy a pipeline ...

Splunk Brings Proof of Control to Digital Asset Transfers

Digital assets now sit inside the core of financial services. HSBC launched its Tokenized Deposit Service in ...

Manage Ingest Processor pipelines end to end with APIs

This guide uses the Data Management APIs to create an Ingest Processor pipeline, deploy it to the ...