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!

BSides Splunk 2022 - The Call for Papers is now Open!

TLDR; Main Site: https://bsidessplunk.com CFP Site: https://bsidessplunk.com/cfp CFP Opens: December 15th, ...

Sending Metrics to Splunk Enterprise With the OpenTelemetry Collector

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

What's New in Splunk Cloud Platform 9.0.2208?!

Howdy!  We are happy to share the newest updates in Splunk Cloud Platform 9.0.2208! Analysts can benefit ...