Splunk Search

Can you use a wild character in a Multiselect?

robertlynch2020
Influencer

Hi

In a MultiSelect is there any way to us a wild character?

My Data

XYC_123
EOD_1234
EOD_23232
EOD_343434
aassss_34343

So, i would like to pick all the EOD so (Star)EOD(Star).

I can put this in manually, however, I want to do it dynamically from the search box.
I want to put in (Star)ANYTHING(Star)

alt text

alt text

0 Karma

thambisetty
SplunkTrust
SplunkTrust

@jeffland Thanks for the solution. That's exactly what I was looking for. 
https://docs.splunk.com/Documentation/Splunk/8.0.0/Viz/PanelreferenceforSimplifiedXML#input_.28form....

————————————
If this helps, give a like below.
0 Karma

493669
Super Champion

try this run anywhere example:

<form>
   <label>Checkbox</label>
   <fieldset submitButton="false">
     <input type="checkbox" token="source" searchWhenChanged="true">
       <label>Source</label>
       <default></default>
       <fieldForLabel>source</fieldForLabel>
       <fieldForValue>source</fieldForValue>
       <search>
         <query>index=_* | eval source=substr('source',1,5) | stats count by source</query>
         <earliest>0</earliest>
         <latest></latest>
       </search>
       <choice value="">ALL</choice>
       <initialValue></initialValue>
       <delimiter> OR </delimiter>
       <prefix>(</prefix>
       <suffix>)</suffix>
       <valuePrefix>source like "%</valuePrefix>
       <valueSuffix>%"</valueSuffix>
     </input>
   </fieldset>
   <row>
     <panel>
       <table>
         <title>$source$</title>
         <search>
           <query>index=_* | where $source$ | stats count</query>
           <earliest>-24h@h</earliest>
           <latest>now</latest>
           <sampleRatio>1</sampleRatio>
         </search>
         <option name="count">20</option>
         <option name="dataOverlayMode">none</option>
         <option name="drilldown">none</option>
         <option name="percentagesRow">false</option>
         <option name="rowNumbers">false</option>
         <option name="totalsRow">false</option>
         <option name="wrap">true</option>
       </table>
     </panel>
   </row>
 </form>

Reference: https://answers.splunk.com/answers/615201/why-is-the-checkbox-input-filter-source-in-my-dash.html

0 Karma

jeffland
SplunkTrust
SplunkTrust

The easy solution to this is the option "allowCustomValues" on a multiselect. With this, you can input custom values that can include a wildcard.

<input type="multiselect" token="multi_tok">
<label>multi with custom values</label>
<fieldForLabel>sourcetype</fieldForLabel>
<fieldForValue>sourcetype</fieldForValue>
<search>
<query>| tstats count where index=_internal by sourcetype</query>
<earliest>-60m@m</earliest>
<latest>now</latest>
</search>
<allowCustomValues>true</allowCustomValues>
</input>

jeffland_0-1658141812308.png

 

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!

Calling All Security Pros: Ready to Race Through Boston?

Hey Splunkers, .conf25 is heading to Boston and we’re kicking things off with something bold, competitive, and ...

Beyond Detection: How Splunk and Cisco Integrated Security Platforms Transform ...

Financial services organizations face an impossible equation: maintain 99.9% uptime for mission-critical ...

Customer success is front and center at .conf25

Hi Splunkers, If you are not able to be at .conf25 in person, you can still learn about all the latest news ...