Dashboards & Visualizations

Using collect command with post search in dashboard.

dillencehsu
Path Finder

I using collect command with post search in dashboard.
I want to control collect data to summary index or not in dashboard, I created this dashboard.

Panel 1: 
search id="main"
{ main search and table all fields that need. }

Panel 2:
input field
token=collect_index
single selection:
       ・no summary : 
       ・to summary : | collect index=summary_index_name
search base="main"
{ | table fields that need
   |  where user=$drilldown_user$ (from Panel 1 with drilldown token) 
   | eval .... some process
  $collect_index$
}

But, the summary_index_name will have duplicates collected events.

And I tried create 2 dedicate search panel in the dashboard, the collected events did not duplicates.

Any suggestion ?

 

Thanks.

---------------------------------------------------------------------------------------------------------------------------

こんにちは

ダッシュボードの中に、サーチの結果をサマリーインデックスに書き込むかをコントロールしたいので、このダッシュボードを作りました。このダッシュボードの中に2つサーチパネルがあります。

パネル1:
search id="main"
{ メインサーチで必要のフィルドを出します。}

パネル2:
input field
token=collect_index
シングル選択し:
       ・no summary : 
       ・to summray : | collect index=サマリーインデックス名

search base="main"
{ | table 必要なフィルド
   |  where user=$drilldown_user$ (パネル1からのトクンバリュー) 
   | eval などの処理
   $collect_index$
}

ただ、上記の post search で経由して、collect したデータは重複になってます。
index=_audit で確認すると、確かに1秒で同じのサーチ(run_collect)が複数回で実行していた。

そして、
別々のパネルで分けて独立のサーチを作ったことがありますが、独立のサーチは上記の問題発生しません。
index=_audit でも確認した、run_collect ただ1回しかないです。

アドバイスをいただければ助かります。
お手数をおかけしますが、どうぞよろしくお願いいたします。

 
 
 
 
 
Labels (1)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Add something to your query in panel 2 that filters out the duplicates so that only the additions are displayed or add this filter to the selection before the collect command so that only the additions are added to the summary index

0 Karma

dillencehsu
Path Finder

Thanks for your replay.

But, in the panel 2 just have 1 event.
After Collected to summary index, the summary index will have duplicates events.

And I also checked the index=_audit, "run_collect" has been run many times in the same second.
I don't know what happened.

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

May 2026 Splunk Expert Sessions: Security & Observability

Level Up Your Operations: May 2026 Splunk Expert Sessions Whether you are refining your security posture or ...

Network to App: Observability Unlocked [May & June Series]

In today’s digital landscape, your environment is no longer confined to the data center. It spans complex ...

SPL2 Deep Dives, AppDynamics Integrations, SAML Made Simple and Much More on Splunk ...

Splunk Lantern is Splunk’s customer success center that provides practical guidance from Splunk experts on key ...