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!

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...