Splunk Search

What is the difference between stats eventstats streamstats?

maitrifer
Engager

Hi All I'm new to Splunk and I'm confused between stats eventstats and streamstats. Can anyone help me to understand?

Labels (1)
1 Solution

isoutamo
SplunkTrust
SplunkTrust
Hi
Here is one explanation https://splunkonbigdata.com/2018/09/29/difference-between-streamstats-and-eventstats-command-in-splu.... Shortly streamstats calculate over sliding window and eventstats over all values.
r. Ismo

View solution in original post

vikramyadav
Contributor

stats

Stats calculate aggregate statistics over the dataset, similar to SQL aggregation. If called without a by clause, one row is produced, which represents the aggregation over the entire incoming result set. 

eventstats

Eventstats calculates a statistical result same as stats command only difference is it does not create statistical results, it aggregates them to the original raw data.

streamstats

Streamstats command uses events before the current event to compute the aggregate statistics that are applied to each event.

 

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

If this help your like will be appreciated 🙂

isoutamo
SplunkTrust
SplunkTrust
One addition to streamstats, you could define the window which it use to calculate stats. Also you could define some conditions dynamically for window. There are some cases where this is mandatory to get correct result. https://docs.splunk.com/Documentation/Splunk/8.0.5/SearchReference/Streamstats

isoutamo
SplunkTrust
SplunkTrust
Hi
Here is one explanation https://splunkonbigdata.com/2018/09/29/difference-between-streamstats-and-eventstats-command-in-splu.... Shortly streamstats calculate over sliding window and eventstats over all values.
r. Ismo

ITWhisperer
SplunkTrust
SplunkTrust

stats replaces the pipleline  - only calculated values based all the data in the pipeline are passed down the line

eventstats adds to the pipeline as a whole - calculated values are based on all the data in the pipeline and added as additional fields to the rows passed down the line

streamstats adds to the pipeline as it passes through - calculated values are based on the data received so far

Get Updates on the Splunk Community!

Updated Team Landing Page in Splunk Observability

We’re making some changes to the team landing page in Splunk Observability, based on your feedback. The ...

New! Splunk Observability Search Enhancements for Splunk APM Services/Traces and ...

Regardless of where you are in Splunk Observability, you can search for relevant APM targets including service ...

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...