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!

Mile High Learning with Splunk University, Denver, Colorado

If Denver is known for its mile-high elevation, Splunk University is about to raise the bar on technical ...

IT Service Intelligence 5.0 Series: Your Guide to the June Launch

We are excited to announce the June release of Splunk IT Service Intelligence (ITSI) 5.0. This update ...

Agent Mode Engaged! Enchaining Agentic Operations with Splunk AI Assistant 2.0

    Are you ready to transform how your team handles complex data requests? We invite you to our upcoming ...