Dashboards & Visualizations

Can you help me with an issue involving the collect command?

ngerosa
Path Finder

Hi all,

I'm creating a panel where clicking on a "ACK" row starts a link on a search (in another window) that uses a collect command to write on a column "Acknowledged" a parameter "true".

But, I'm having some problems with the collect command. When starting a link on a search with collect, a warning popup appears: "The search that you are about to run contains commands that might present a security risk", so every time, I have to click on "Run" to start the collect command.

Is there a possibility to avoid this warning popup so link to the search does not open any panel but is hidden?

Thanks all!

0 Karma
1 Solution

jeffland
SplunkTrust
SplunkTrust

You could create and run the search in the same dashboard like this:

<search>
  <query>
    your search | collect | eval runMe = "$startSearch$"
  </query>
</search>
<panel>
  <table>
    ...
  <drilldown>
    <eval token="startSearch">random()</eval>
  </drilldown>
</panel>

The (initially unset) token startSearch will be set (and set again) on drilldown which will in turn make the search manager of the collect-search run. This should run the search silently and without requiring acknowledgement.

View solution in original post

0 Karma

jeffland
SplunkTrust
SplunkTrust

You could create and run the search in the same dashboard like this:

<search>
  <query>
    your search | collect | eval runMe = "$startSearch$"
  </query>
</search>
<panel>
  <table>
    ...
  <drilldown>
    <eval token="startSearch">random()</eval>
  </drilldown>
</panel>

The (initially unset) token startSearch will be set (and set again) on drilldown which will in turn make the search manager of the collect-search run. This should run the search silently and without requiring acknowledgement.

0 Karma

ngerosa
Path Finder
  <dashboard>
  <label>test</label>
   <search>
   <query>
    index="test"
 |  eval id=value1.ALARMDATE
 |  search id="$click.value$"
 |  eval acknowledged="true"
 |  table id _time ALARMDATE DEFTIME value1 ACK 
 acknowledged
   |  collect index="test"
   |  eval runMe = "$startSearch$"
    </query>
     </search>
     <row>
     <panel>
      <table>
        <search>
         <query>index="test"
     |  eval id=value1.ALARMDATE
     |  dedup id
     |  eval ACK="ACK"
     |  table id _time ALARMDATE DEFTIME value1 ACK 
        acknowledged</query>
           <earliest>0</earliest>
           <latest></latest>
             <sampleRatio>1</sampleRatio>
              </search>
                <drilldown>
               <eval token="startSearch">random()</eval>
              </drilldown>
              </table>
              </panel>
              </row>
              </dashboard>

This is how I implemented your suggestion but it doesn't work.
I don't understand how I can pass the "id" value from a click.value command.

Thanks!

0 Karma

ngerosa
Path Finder

I resolve changing

                <eval token="startSearch">random()</eval>

with

                  <set token="startSearch">random()</set>
0 Karma
Get Updates on the Splunk Community!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

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