Splunk Search

Using Check box

nmr5316
New Member

How can i use something like checkbox??

I want to index multiple values based on the number of checkbox selected?

How can this be done?

Tags (2)
0 Karma
1 Solution

Wiggy
Splunk Employee
Splunk Employee

To learn how to create a custom form search and use check boxes/radio buttons, the following link will start you from the beginning:

Form Infroduction

For more information on setting up radio buttons, which are like check boxes, the following link describes it in detail:

Creating Radio Buttons

View solution in original post

ArthurGautesen
Path Finder

<input type="checkbox" searchWhenChanged="true" token="Index">
index1
index2
index3
index4
"
"
" AND index="
</input>

Now, if you have a checkbox checked for index3 and index4, then your search would be this:
index=$Index$

$Index$ would be "index3" AND index="index4"

so it would appear in the search as

index="index3" AND index="index4"

0 Karma

sideview
SplunkTrust
SplunkTrust

Do you mean you want to use a Checkbox module in a search interface? Your use of the word 'index' confuses me because this sounds like you want to use it somehow when you're setting up Splunk to index the data instead.

If you want a Checkbox module for searching, I develop an app called Sideview Utils which is available on Splunkbase, and it contains 20-some views of embedded documentation and examples. One of the many things it offers to augment the default Splunk UI, is a Checkbox module. Download the app and check it out. It unlocks a lot of things and makes many familiar tasks in view development a lot easier.

Wiggy
Splunk Employee
Splunk Employee

To learn how to create a custom form search and use check boxes/radio buttons, the following link will start you from the beginning:

Form Infroduction

For more information on setting up radio buttons, which are like check boxes, the following link describes it in detail:

Creating Radio Buttons

sideview
SplunkTrust
SplunkTrust

Note: the Splunk core advanced XML does not have a checkbox module, (which of course means the Simplified XML doesn't either, since simplified is just a macro layer to the advanced xml underneath). I think this question was probably looking for a Checkbox module, hence looking for Sideview Utils / Sideview Development Kit.

0 Karma
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...