Knowledge Management

Summary Indexing a stats query

Oren
Explorer

I have a simple query:

eventtype=request | stats sum(http_bytes) as transfer by http_domain | head 50 | sort -transfer

I'd like to summarize this, and pull out transfer apps over time. When I tried with:

eventtype=request | sistats sum(http_bytes) as transfer by http_domain | sort -transfer | head 100

This query gives me questionable results:

 index="summary" search_name="Z - Top App Transfer - 15 minutes" | stats sum(http_bytes) as bytes by http_domain | sort -bytes | eval bytes = tostring(bytes, "commas") | head 50

The reason I'm summing http_bytes in the query is the sistats didn't seem to store the field "transfer".

Any obvious things I'm doing wrong?

Tags (1)
1 Solution

Stephen_Sorkin
Splunk Employee
Splunk Employee

You should store to your summary index:

eventtype=request | sistats sum(http_bytes) as transfer by http_domain

You should retrieve from your summary index:

index=summary source=<saved_search_name> | stats sum(http_bytes) as transfer by http_domain | sort -transfer | eval transfer = tostring(transfer, "commas") | head 50

Specifically, you're not allowed to do any processing between sistats and the corresponding stats, except saving and retrieving the event set.

View solution in original post

Stephen_Sorkin
Splunk Employee
Splunk Employee

You should store to your summary index:

eventtype=request | sistats sum(http_bytes) as transfer by http_domain

You should retrieve from your summary index:

index=summary source=<saved_search_name> | stats sum(http_bytes) as transfer by http_domain | sort -transfer | eval transfer = tostring(transfer, "commas") | head 50

Specifically, you're not allowed to do any processing between sistats and the corresponding stats, except saving and retrieving the event set.

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 ...