Splunk Search

Splunk query returns statistics but no events

doffner
Engager

Hi,

New to Splunk so I must be missing something obvious. I looked through previous questions and the docs but didn't see anything about this problem.

I have a Splunk query which is correctly returning the statistic I am expecting but has Events(0) even when Verbose Mode is enabled. 

index=* // search redacted 
|rex "(?P<json>{.+})" 
|table json 
|spath input=json
|stats sum(Response.Selected)

When I execute this query from Splunk Search (Web UI) I am getting the correct sum under the "Statistics" tab but the "Events" tab is (0). 

Any help would be much appreciated.

 

0 Karma
1 Solution

manjunathmeti
SplunkTrust
SplunkTrust

hi, @doffner,

stats is a transforming command which means the command "transforms" the specified cell values for each event into numerical values for statistical purposes. Raw events are not available once you run stats. But if you still need events you can use eventstats command.


Check this page on stats and eventstats command https://www.splunk.com/en_us/blog/tips-and-tricks/search-command-stats-eventstats-and-streamstats-2.....

View solution in original post

manjunathmeti
SplunkTrust
SplunkTrust

hi, @doffner,

stats is a transforming command which means the command "transforms" the specified cell values for each event into numerical values for statistical purposes. Raw events are not available once you run stats. But if you still need events you can use eventstats command.


Check this page on stats and eventstats command https://www.splunk.com/en_us/blog/tips-and-tricks/search-command-stats-eventstats-and-streamstats-2.....

doffner
Engager

Thanks a lot!

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...