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!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...