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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...