Page 1 of 1

nrpe check_mem

Posted: Wed Aug 08, 2012 4:09 pm
by sal@coned
using: Nagios XI 2011R3.2

I have added a Ubuntu 12.04 server to be monitored and the NRPE check_mem is not behaving properly.
I have the service configured to be applied to a host-group and I'm getting different results depending on the version of Ubuntu.

The older Ubuntu release sends back the correct string, I have tried it with both with and without the % sign.

Any ideas ?

Thanks
Sal

This guest is the older Ubuntu and works as expected:
./check_nrpe -H cdais -t 30 -c check_mem -a '-w 20 -c 10'
OK - 1566 / 3024 MB (51%) Free Memory, Used: 1458 MB, Shared: 0 MB, Buffers: 210 MB, Cached: 1173 MB | total=3024MB free=1566MB used=1458MB shared=0 buffers=210MB cached=1173MB
./check_nrpe -H cdais -t 30 -c check_mem -a '-w 20% -c 10%
- 1524 / 3024 MB (50%) Free Memory, Used: 1500 MB, Shared: 0 MB, Buffers: 211 MB, Cached: 1215 MB | total=3024MB free=1524MB used=1500MB shared=0 buffers=211MB cached=1215MB

This is the Ubuntu 12.04 and it does not return the % used
./check_nrpe -H mrtg-dr-1 -t 30 -c check_mem -a '-w 20 -c 10'
WARNING - 3272 / 3954 MB (%) Free Memory, Used: 682 MB, Shared: 0 MB, Buffers: 79 MB, Cached: 368 MB | total=3954MB free=3272MB used=682MB shared=0 buffers=79MB cached=368MB
./check_nrpe -H mrtg-dr-1 -t 30 -c check_mem -a '-w 20% -c 10%'
- 3272 / 3954 MB (%) Free Memory, Used: 682 MB, Shared: 0 MB, Buffers: 79 MB, Cached: 368 MB | total=3954MB free=3272MB used=682MB shared=0 buffers=79MB cached=368MB

Re: nrpe check_mem

Posted: Wed Aug 08, 2012 4:21 pm
by scottwilkerson
You will get this if the dc package is not installed

Try running this on the 12.04 machine

Code: Select all

apt-get install dc

Re: nrpe check_mem

Posted: Wed Aug 08, 2012 4:27 pm
by sal@coned
Scott,
That worked.

Thanks for the help
Sal