memory usage data alert incorrect

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
BradZynda
Posts: 31
Joined: Thu Jul 06, 2017 12:43 pm

memory usage data alert incorrect

Post 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
BradZynda
Posts: 31
Joined: Thu Jul 06, 2017 12:43 pm

Re: memory usage data alert incorrect

Post 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
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: memory usage data alert incorrect

Post 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.
Former Nagios employee
BradZynda
Posts: 31
Joined: Thu Jul 06, 2017 12:43 pm

Re: memory usage data alert incorrect

Post by BradZynda »

The Linux SNMP plugin that came in the base
bolson

Re: memory usage data alert incorrect

Post 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
BradZynda
Posts: 31
Joined: Thu Jul 06, 2017 12:43 pm

Re: memory usage data alert incorrect

Post 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
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: memory usage data alert incorrect

Post 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
BradZynda
Posts: 31
Joined: Thu Jul 06, 2017 12:43 pm

Re: memory usage data alert incorrect

Post 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
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: memory usage data alert incorrect

Post 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.
BradZynda
Posts: 31
Joined: Thu Jul 06, 2017 12:43 pm

Re: memory usage data alert incorrect

Post 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
Locked