Dashboards & Visualizations

How to edit my dashboard to include a radio button for each index displayed?

leomedina
Explorer

Hello all,

In a bit of a pickle here with this and greatly appreciate the feedback and suggestions. I'm trying to create a dashboard that on one side it has one index (i.e. index=datapower) and the other side another (i.e. index=tibco). I created two different lookup tables (one for datapower and one for tibco) and would like to have two separate radio buttons for each one.

So far I have this and it's still not working.

<input type="radio" token="datapowerenvironment" searchWhenChanged="true">
      <label>DataPower Environment</label>
      <search>
        <query>| inputlookup datapower_hosts.csv | search datacenter=$datacenter$ | stats count by environment | rename environment as datapowerenvironment</query>
        <earliest>-24h@h</earliest>
        <latest>now</latest>
      </search>
      <fieldForLabel>datapowerenvironment</fieldForLabel>
      <fieldForValue>datapowerenvironment</fieldForValue>
      <default>datapowerProd</default>
      <initialValue>datapowerProd</initialValue>
    </input>
<input type="radio" token="tibcoenvironment" searchWhenChanged="true">
      <label>Tibco Environment</label>
      <search>
        <query>| inputlookup tibco_hosts.csv | search datacenter=$datacenter$ | stats count by environment | rename environment as tibcoenvironment</query>
        <earliest>-24h@h</earliest>
        <latest>now</latest>
      </search>
      <fieldForLabel>tibcoenvironment</fieldForLabel>
      <fieldForValue>tibcoenvironment</fieldForValue>
      <default>tibcoProd</default>
      <initialValue>tibcoProd</initialValue>
    </input>

I am getting a "Could not create search." response, and would sincerely appreciate any suggestions and/or help.

Thanks!

0 Karma
1 Solution

3no
Communicator

the $datacenter$ token is not define.

View solution in original post

0 Karma

3no
Communicator

the $datacenter$ token is not define.

0 Karma

ckunath
Communicator

Are you sure that the $datacenter$ token is set before the search runs? What exactly are you searching for with datacenter?

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...