Splunk Search

Delta based on multiple inboxes

manderson7
Contributor

We've gotten a search to work that shows the delta between the number of messages in an inbox for a period of time:

 

<basesearch>
| bin _time span=5m
| stats max(Items) AS Max by _time
| delta Max as Delta
| fields _time Delta
| where Delta>=10

 

But I want to do this based on multiple inboxes, and delta is merging the inboxes together, so the values of each inbox are interfering with each other.

 

<basesearch multiple mailboxes>
| bin _time span=5m
| stats max(Items) AS Max  by _time User
| delta Max as Delta
| fields _time Delta User

 

returns:

_timeUserMaxDelta
09:15user1103 
09:15user2251148
09:15user317-234

and I want the users to be treated as individual accounts, not merged with each other. 

I assume I need to use streamstats for this, but so far I've been unable to work out how.

Labels (2)
Tags (3)
0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

Try this query

<basesearch multiple mailboxes>
| bin _time span=5m
| stats max(Items) AS Max  by _time User
| streamstats window=2 range(Max) as Delta by User
| fields _time Delta User
---
If this reply helps you, Karma would be appreciated.

View solution in original post

richgalloway
SplunkTrust
SplunkTrust

Try this query

<basesearch multiple mailboxes>
| bin _time span=5m
| stats max(Items) AS Max  by _time User
| streamstats window=2 range(Max) as Delta by User
| fields _time Delta User
---
If this reply helps you, Karma would be appreciated.

manderson7
Contributor

That does the trick. Thanks so much.

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