Splunk Search

How to edit my search to display the current count and the count from 5 minutes ago in one line?

RICKZHANG
Engager

Hi

Now I need to show the current count and the count five minutes ago in one row. The current count search is:

 index=app   host="xxxx"   sourcetype=xxx    status>399   route =*   earliest=-15m@m latest=@m| bucket span=5m _time
 | stats count as current_count by _time route

And the respected result is like this:
alt text
How can I do it?

0 Karma

somesoni2
Revered Legend

Try this

index=app host="xxxx" sourcetype=xxx status>399 route =* earliest=-15m@m latest=@m| bucket span=5m _time
| stats count as current_count by _time route | streamstats current=f window=1 values(current_count) as previous_count  by route
0 Karma
Get Updates on the Splunk Community!

.conf25 technical session recap of Observability for Gen AI: Monitoring LLM ...

If you’re unfamiliar, .conf is Splunk’s premier event where the Splunk community, customers, partners, and ...

A Season of Skills: New Splunk Courses to Light Up Your Learning Journey

There’s something special about this time of year—maybe it’s the glow of the holidays, maybe it’s the ...

Announcing the Migration of the Splunk Add-on for Microsoft Azure Inputs to ...

Announcing the Migration of the Splunk Add-on for Microsoft Azure Inputs to Officially Supported Splunk ...