All Apps and Add-ons

Dropdown with eventtypes

dackamen
Engager

Is there a way to create dropdown box where you can select one of all the eventtypes?

I currently have this but it takes long time and resources to collect and display all the eventtypes:

  <input type="dropdown" token="field2">
    <label>Eventtype</label>
    <populatingSearch fieldForValue="eventtype">index=* | stats count by host, eventtype</populatingSearch>
  </input>

Is it possible at all or no?

Tags (1)
0 Karma

somesoni2
Revered Legend

The fastest way to do it is using REST API calls. Try this

 <input type="dropdown" token="field2">
<label>Eventtype</label>
<populatingSearch fieldForValue="eventtype">| rest /services/saved/eventtypes | table title | rename title as eventtype</populatingSearch>
</input>

gabetheISguy
Explorer

Yes! It is

Here is a Sample

<input type="dropdown" token="eventtype" searchWhenChanged="false">
<label>Select an Event Type to proceed</label>
<choice value="*">All</choice>
<populatingSearch fieldForLabel="eventtype" fieldForValue="eventtype">
<![CDATA[index="xxxxxxxindex" sourcetype=xxxxxx | stats count by eventtype | dedup eventtype | fields eventtype]]>
</populatingSearch>
<default>*</default>
</input>
0 Karma

Raghav2384
Motivator

Try it without stats and host.

Index =x sourcetype=x|top 25 eventtypes

0 Karma

Raghav2384
Motivator

Try narrowing it down to eventtypes field only

Index= * |fields eventtype|top 25 eventtypes

Keep changing the top x
Thanks,
Raghav

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 ...