Alerting

How to set-up an alert when my memory usage goes above 80%?

manja054
Explorer

host=* sourcetype="Perfmon:Memory"

collection=Memory
object=Memory
counter="% Committed Bytes In Use"
Value=27.863303753428205

My stats looks like above and i want to be notified when my memory usage goes above 80%

Tags (2)

stephanefotso
Motivator

Hello! Try a search like this, and save it as an alert.

host=* sourcetype="Perfmon:Memory"  | stats count as mem  count(eval(counter="% Committed Bytes In Use")) as mem_used |eval percentage=round(mem_used/mem,3)*100 | where percentage > 80| fields  mem_used, mem, percentage

Thanks!

SGF

KSinghK
Loves-to-Learn Lots

% Committed Bytes In Use% is not the actual parameter to monitor memory.

 

sourcetype=perfmon* OR sourcetype=winhostmon FreePhysicalMemoryKB="*" i
| eval MemoryUsedPercent=round((TotalPhysicalMemoryKB - FreePhysicalMemoryKB)/TotalPhysicalMemoryKB * 100,2)
| eval MemoryUsedMB=(TotalPhysicalMemoryKB-FreePhysicalMemoryKB)/1024 | Stats count by host

0 Karma

KSinghK
Loves-to-Learn Lots

sourcetype=perfmon* OR sourcetype=winhostmon FreePhysicalMemoryKB="*" index=<your index> 
| eval MemoryUsedPercent=round((TotalPhysicalMemoryKB - FreePhysicalMemoryKB)/TotalPhysicalMemoryKB * 100,2)
| eval MemoryUsedMB=(TotalPhysicalMemoryKB-FreePhysicalMemoryKB)/1024 | stats count by host

 

updated the search just add your index here.

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