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.
Get Updates on the Splunk Community!

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...