Dashboards & Visualizations

How to display table headers based on form input?

john_dagostino
Path Finder

I'm looking for a way to display a table based on a dropdown input in a dashboard. For example, if I choose "ASA" as the sourcetype, I want the table to only display the fields _time, host, src dest but if I choose "Infoblox" then I want the table to display _time, dhcpresponse, dnsquery, etc. Is there a way to do this in simple XML?

0 Karma
1 Solution

woodcock
Esteemed Legend

Do it like this:

<fieldset>
<input type="dropdown" token="fields_by_sourcetype_token">
  <label>Fields by Sourcetype</label>
  <choice value="_time host src dest ">ASA</choice>
  <choice value="_time dhcpresponse dnsquery">Infoblox</choice>
  <default>ASA</default>
</input>

Then do this:

<searchString>Blah BLAH BlAh | table $fields_by_sourcetype_token$</searchString>

View solution in original post

0 Karma

woodcock
Esteemed Legend

Do it like this:

<fieldset>
<input type="dropdown" token="fields_by_sourcetype_token">
  <label>Fields by Sourcetype</label>
  <choice value="_time host src dest ">ASA</choice>
  <choice value="_time dhcpresponse dnsquery">Infoblox</choice>
  <default>ASA</default>
</input>

Then do this:

<searchString>Blah BLAH BlAh | table $fields_by_sourcetype_token$</searchString>
0 Karma

john_dagostino
Path Finder

You rock!

0 Karma
Get Updates on the Splunk Community!

Automatic Discovery Part 1: What is Automatic Discovery in Splunk Observability Cloud ...

If you’ve ever deployed a new database cluster, spun up a caching layer, or added a load balancer, you know it ...

Real-Time Fraud Detection: How Splunk Dashboards Protect Financial Institutions

Financial fraud isn't slowing down. If anything, it's getting more sophisticated. Account takeovers, credit ...

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

 Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...