Dashboards & Visualizations

using radio buttons to control a search that feeds a chart in a dashboard

HattrickNZ
Motivator

I have a search in splunk that uses the predict function that looks something like:

index=core ...$token1$ | fields - upper* lower*

This basically creates a chart that I have other tokens/inputForms being used to control the chart (e.g. timespan, granularity, elements...)

So I want to be able to toggle the search between this:

index=core ...$token1$ |

and this:

index=core ...| fields - upper* lower*

I am thinking I can do something like this:

 <input type="radio" token="toggle" searchWhenChanged="true">
      <label>Toggle On/Off:</label>
      <default>On</default>
      <choice value="fields - upper* lower*">On</choice>
      <choice value="">Off</choice>
   </input>

with my search looking like:

index=core ...$token1$ | fields - upper* lower*

and then the On will give index=core ...$token1$ | fields - upper* lower*

and the Off will give index=core ...$token1$ |

Hmm this seems logical will see how I go

0 Karma

HattrickNZ
Motivator

It worked first time 🙂

0 Karma

HattrickNZ
Motivator

this actually worked 🙂

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...