Page 1 of 2
memory usage data alert incorrect
Posted: Mon Jul 17, 2017 8:12 am
by BradZynda
Hello,
have been noticing for Linux the memory usage is grabbing total and buff/cache but this is incorrect as the linux server will put back buff/cache as needed for the system.
Memory Usage 2 Physical memory: 99%used(31595MB/31963MB) (>98%) : CRITICAL
The correct usage should be when buff/cache = 0 and starts to swap or when available hits 0.
Getting a lot of false positive alerts from this.
Thanks,
Brad
Re: memory usage data alert incorrect
Posted: Mon Jul 17, 2017 9:25 am
by BradZynda
After some thought on this.. (plays Jeopardy music)
amount_used = (buff/cache) - available
total_percent_used = $amount_used / total_mem
May want to get a second opinion on that but what it is currently doing is giving me a percent free plus what is used in buff/cache as a percent of total physical RAM.
Hope that clarifies it a little.
Thanks,
Brad
Re: memory usage data alert incorrect
Posted: Mon Jul 17, 2017 4:50 pm
by tmcdonald
Can you clarify what plugin is being used in this case? There might be flags you can pass in to change how the memory is calculated.
Re: memory usage data alert incorrect
Posted: Tue Jul 18, 2017 6:47 am
by BradZynda
The Linux SNMP plugin that came in the base
Re: memory usage data alert incorrect
Posted: Tue Jul 18, 2017 1:20 pm
by bolson
You might consider using the nrpe plugin "check_mem". This plugin returns a free memory value which includes cached memory (phys mem - in use + cached)
This document explains the NRPE agent:
https://assets.nagios.com/downloads/nag ... g_NRPE.pdf
Re: memory usage data alert incorrect
Posted: Wed Jul 19, 2017 1:36 pm
by BradZynda
Due to security rules xinetd can not be on our servers, so that isn't an option for us. Is there a way to fix the Linux SNMP values? Kind of a deciding factor as memory usage is a must have..
Thanks,
Brad
Re: memory usage data alert incorrect
Posted: Wed Jul 19, 2017 1:42 pm
by dwhitfield
NRPE does not require xinetd. That is simply an option that our installer is designed to use. The source install does not use xinetd by default:
https://support.nagios.com/kb/article.php?id=515
Re: memory usage data alert incorrect
Posted: Thu Jul 20, 2017 8:22 am
by BradZynda
looked it over and that looks like a bit more of setting up and firewall rules needed, also it is getting away from going in the direction of SNMP.. before that route I am going to try the "without buffers" option on the mem check to see if that fixes anything.
Thanks,
Brad
Re: memory usage data alert incorrect
Posted: Thu Jul 20, 2017 9:05 am
by dwhitfield
BradZynda wrote:also it is getting away from going in the direction of SNMP..
Yes. I was just responding to your concern about xinetd. With snmpd.conf and such, I don't know that NRPE is really any more setup, but if you already know SNMP, I certainly understand your concern about switching.
Let us know how your test goes.
Re: memory usage data alert incorrect
Posted: Fri Jul 21, 2017 7:41 am
by BradZynda
Yah we want to do SNMP v3 across the board setting a strict allow and view set with read-only.
So I tested the "Run without buffers" checked to off and that seems to be returning a closer representation of the memory used without false positives.
Thanks,
Brad