Dashboards & Visualizations

Show list of Eventtypes in Dashboard Drop Down

Asolano4224
New Member

I have multiple event types that are tagged with either Defect or Error.

What I would like to do is show all the eventtypes in a drop down on a dashboard so i will be able to search by eventtype.

Tags (1)
0 Karma

woodcock
Esteemed Legend

Here is a much better (faster and always complete) way to get your eventtype names:

| rest/servicesNS/-/-/configs/conf-eventtypes 
| search eai:acl.app="*" 
| dedup id 
| table eai:acl.owner eai:acl.sharing disabled title search priority 
| rename eai:acl.* AS *
| table title
| sort 0 title

If you need only those in context of app foo, then change to this part:

| rest/servicesNS/-/foo/configs/conf-eventtypes

If you need only those owned by app foo, then change to this part:

| rest/servicesNS/-/foo/configs/conf-eventtypes
| search eai:acl.app="foo"
0 Karma

DalJeanis
Legend

1) code a search that gives you the list you want.

for example

index=foo  (your search terms that gets all events for the time range) | dedup eventtype | table eventtype | sort 0 eventype

2) put that search as the source query for the dropdown and set <fieldForLabel> and <fieldForValue> to eventtype.

There is an example input similar to this (but slightly more complicated in the query itself) called TokFilter1 here...
https://answers.splunk.com/answers/590143/how-to-dynamically-populate-field-names-in-dropdow.html

Look for the section that starts <input type="dropdown" token="tokFilter1" searchWhenChanged="true"> and ends </input>.

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

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...