Dashboards & Visualizations

How to get remaining rows returned by search query? result token only returns first row!!

avisriv
New Member
 source="something_source" topic="something_topic1" OR topic="something_topic2" OR topic="something_topic3" client="cpu1305" | stats latest(msg) as Valuess by topic

Now this search returns something like below:

  **topic**                       **Valuess**
  something_topic1                3
  something_topic2                7
  something_topic3                8

So, if I write something like below in my Splunk dashboard inside <search> tag:

<done>
  <set token="chkStatShow">$result.Values$</set>
</done>

This only returns first row i.e. '3', but I need to access remaining rows as well.
How do I achieve this?

0 Karma

kamlesh_vaghela
SplunkTrust
SplunkTrust

@avisriv

Do you want all values in single chkStatShow token? with comma separated or multivalue?

0 Karma

avisriv
New Member

Multivalue if possible, would be great. Thanks!

0 Karma

kamlesh_vaghela
SplunkTrust
SplunkTrust

Can you please try this?

source="something_source" topic="something_topic1" OR topic="something_topic2" OR topic="something_topic3" client="cpu1305" | stats latest(msg) as Valuess by topic | eventstats values(Valuess) as Valuess

0 Karma

avisriv
New Member
but how do i access these values in my <done> tag ?
 <done>
   <set token="chkStatShow">$result.Values$</set>
 </done>
Like above only gives 1st row 'Valuess', so how to modify this
0 Karma

kamlesh_vaghela
SplunkTrust
SplunkTrust

I have just created new field Valuess to get token.

  <query>source="something_source" topic="something_topic1" OR topic="something_topic2" OR topic="something_topic3" client="cpu1305" | stats latest(msg) as Values by topic | eventstats values(Values) as Valuess</query>
       <done>
            <set token="chkStatShow">$result.Valuess$</set>
        </done>
0 Karma
Get Updates on the Splunk Community!

Routing Data to Different Splunk Indexes in the OpenTelemetry Collector

This blog post is part of an ongoing series on OpenTelemetry. The OpenTelemetry project is the second largest ...

Getting Started with AIOps: Event Correlation Basics and Alert Storm Detection in ...

Getting Started with AIOps:Event Correlation Basics and Alert Storm Detection in Splunk IT Service ...

Register to Attend BSides SPL 2022 - It's all Happening October 18!

Join like-minded individuals for technical sessions on everything Splunk!  This is a community-led and run ...