Page 1 of 1

Another Memory Check Question

Posted: Thu Dec 20, 2012 1:19 pm
by ryan_breneman
Hello! I have another question for you regarding a linux memory check.

I'm running the following command from the nagios server against a Ubuntu 10.04.4 box:

Code: Select all

$USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -c check_mem -a '-w 20 -c 10 -n' 
I'm using the "-n" switch to include cached memory in the free space count (as shown here: http://support.nagios.com/wiki/index.ph ... ree_Memory)

The result is:

Code: Select all

CRITICAL - 2352 / 3964 MB (%) Free Memory, Used: 3543 MB, Shared: 0 MB, Buffers: 118 MB, Cached: 1931 MB
My question is why is it still reporting as critical, and also why doesn't a percentage show? I have already run apt-get install bc on this box and it says the most recent version of bc is already installed.

Thanks!

Re: Another Memory Check Question

Posted: Thu Dec 20, 2012 2:22 pm
by abrist
The -n switch is found in the custom_mem_check plugin, and as far as I know, the switch is not available in the standard check_mem plugin. Download the custom_mem_check plugin from http://assets.nagios.com/downloads/nagi ... _check_mem

Re: Another Memory Check Question

Posted: Thu Dec 20, 2012 2:26 pm
by scottwilkerson
the package actually needed is dc

run

Code: Select all

apt-get install dc
In Ubuntu dc stands alone, on CentOS and RHEL dc comes in bc...

I know it's confusing...

Re: Another Memory Check Question

Posted: Thu Dec 20, 2012 2:34 pm
by ryan_breneman
Thanks Scott, that was it! Installed dc and everything looks good.

Thanks again for the quick reply!