Dashboards & Visualizations

Set a token by open a dashboard based on a search

criedman
Explorer

Hi,

is it possible to set a token based on a search result value ?
My search does not work ... =(

 <init>
      <eval token="init">| inputlookup Lookup_1 | search Value="Value_A" | eval valuestatus=Value_A | table valuestatus</eval>
   </init>

Value_A = 0 .... 0 Should be set to the token.

BR
Christoph

Tags (1)
0 Karma
1 Solution

criedman
Explorer

Thats the soluten thank you.

   <dashboard>
      <search>
         <query>| inputlookup Lookup_1 where Value="Value_A" 
  | eval valuestatus=Value_A 
  | table valuestatus
         <done>
           <set token="init">$result.valuestatus$</set>
         </done>
       </search>
     </dashboard>

BR
Christoph

View solution in original post

0 Karma

criedman
Explorer

Thats the soluten thank you.

   <dashboard>
      <search>
         <query>| inputlookup Lookup_1 where Value="Value_A" 
  | eval valuestatus=Value_A 
  | table valuestatus
         <done>
           <set token="init">$result.valuestatus$</set>
         </done>
       </search>
     </dashboard>

BR
Christoph

0 Karma

kamlesh_vaghela
SplunkTrust
SplunkTrust

Hi @criedman

Can you please try following?

  <dashboard>
     <search>
        <query>| inputlookup Lookup_1 where Value="Value_A" 
 | eval valuestatus=Value_A 
 | table valuestatus
        <done>
          <set token="init">$result.valuestatus$</set>
        </done>
      </search>
    </dashboard>

niketn
Legend

@kamlesh_vaghela, where can be added to base inputlookup command to pull only required result instead of fetching all records from lookup file and then filtering specific record.

| inputlookup Lookup_1 where Value="Value_A" 
| eval valuestatus=Value_A 
| table valuestatus
____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
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 ...