Alerting

Alert to show if a Users data level goves over 1GB

DDewarSplunk
New Member

Afternoon Splunk Gurus

I am trying to create an alert, where as if a users data (Bytes_out) goes over 1GB then I get an email.

So far I can list the users as per below but am now struggling to define only data over 1GB and get the alert to send me an email (Like a table) with user name PC Name Etc Etc

Any help would be really appreciated.

Thanks

D

sourcetype="traffic" eventtype="traffic"
| stats sum(bytes_out) by user src_ip app app:subcategory eventtype
| dedup user, src_ip, app, app:subcategory
| rename sum(bytes_out) as sbo
| eval "MegaBytes"=((sbo)/1024)/1024
| fields - sbo
| sort -"MegaBytes"
| sort -total | head 10

Tags (1)
0 Karma
1 Solution

mayurr98
Super Champion

hey @DDewarSplunk

You can define your condition in the query itself and just create an alert

sourcetype="traffic" eventtype="traffic" 
| stats sum(bytes_out) by user src_ip app app:subcategory eventtype
| dedup user, src_ip, app, app:subcategory
| rename sum(bytes_out) as sbo 
| eval "MegaBytes"=((sbo)/1024)/1024 
| fields - sbo
| sort -"MegaBytes" 
| sort -total | where MegaBytes>1024

Let me know if it works!

View solution in original post

mayurr98
Super Champion

hey @DDewarSplunk

You can define your condition in the query itself and just create an alert

sourcetype="traffic" eventtype="traffic" 
| stats sum(bytes_out) by user src_ip app app:subcategory eventtype
| dedup user, src_ip, app, app:subcategory
| rename sum(bytes_out) as sbo 
| eval "MegaBytes"=((sbo)/1024)/1024 
| fields - sbo
| sort -"MegaBytes" 
| sort -total | where MegaBytes>1024

Let me know if it works!

DDewarSplunk
New Member

Ahh Thanks....I t I was over thinking \ complicating it !!
Keep it nice and simple is the secret !

Thanks very much Mayurr98

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...