Alerting

Alert with email

pudanelilita
Explorer

Hi,
I'm struggling to create email alert.
My search query:
| rex "Heap:\s(?<HeapNum>[\d\.]+)(?<unit>\w+)" | search HeapNum!=" " | eval HeapNum = case(unit="K",HeapNum/1000,unit="M", HeapNum,unit="G", HeapNum*1000) | eval critical=15000 | table _time HeapNum critical

I want, that when it reaches critical value, it sends email to me.
I created alert, but it doesn't work, can you please help with configuration?

alt text

alt text

Tags (1)
0 Karma
1 Solution

gcusello
SplunkTrust
SplunkTrust

Hi pudanelilita,
try something like this

| rex "Heap:\s(?<HeapNum>[\d\.]+)(?<unit>\w+)" 
| search NOT HeapNum=" "  
| eval HeapNum = case(unit="K",HeapNum/1000,unit="M", HeapNum,unit="G", HeapNum*1000) 
| search HeapNum>15000 
| table _time HeapNum critical

Then in the alert's condition put activation when there are results (results>0)

Bye.
Giuseppe

View solution in original post

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi pudanelilita,
try something like this

| rex "Heap:\s(?<HeapNum>[\d\.]+)(?<unit>\w+)" 
| search NOT HeapNum=" "  
| eval HeapNum = case(unit="K",HeapNum/1000,unit="M", HeapNum,unit="G", HeapNum*1000) 
| search HeapNum>15000 
| table _time HeapNum critical

Then in the alert's condition put activation when there are results (results>0)

Bye.
Giuseppe

0 Karma

pudanelilita
Explorer

it shows me: No results found.

0 Karma

gcusello
SplunkTrust
SplunkTrust

At first (my error!) replace

| search HeapNum>15000 

with

| where HeapNum>15000 

if you still have no results, delete the second search and then see what are the values you have for HeapNum to check if the condition is correct.

Bye.
Giuseppe

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...