Dashboards & Visualizations
Highlighted

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

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
Highlighted

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

Champion

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
Highlighted

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

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
Highlighted

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

Path Finder

I resolve changing

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

with

                  <set token="startSearch">random()</set>
0 Karma