check_mem command misreporting

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
cshaffer
Posts: 38
Joined: Tue May 13, 2014 10:45 am

check_mem command misreporting

Post by cshaffer »

Using Nagios XI 2014R2.7

I am setting up monitoring on an Ubuntu 14.04 server. I used the Wizard to setup the monitoring. The Memory Usage command works, but I'm getting memory warnings on the server that don't make sense to me. The command is:
$USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -c $ARG1$ $ARG2$

Here's the output of a test
COMMAND: /usr/local/nagios/libexec/check_nrpe -H 10.206.201.37 -t 30 -c check_mem -a '-w 20 -c 10'
OUTPUT: WARNING - 1811 / 3009 MB (%) Free Memory, Used: 1198 MB, Shared: 26 MB, Buffers: 217 MB, Cached: 636 MB | total=3009MB free=1811MB used=1198MB shared=26 buffers=217MB cached=636MB

1811 / 3009 = 60% free memory. So why the warning?
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: check_mem command misreporting

Post by lmiltchev »

I believe you are missing a package (dc) as the percentages are not shown...
OUTPUT: WARNING - 1811 / 3009 MB (%) Free Memory, Used: 1198 MB, Shared: 26 MB, Buffers: 217 MB, Cached: 636 MB | total=3009MB free=1811MB used=1198MB shared=26 buffers=217MB cached=636MB
Run the following command on your Ubuntu box:

Code: Select all

sudo apt-get install dc
Hope this helps.
Be sure to check out our Knowledgebase for helpful articles and solutions!
cshaffer
Posts: 38
Joined: Tue May 13, 2014 10:45 am

Re: check_mem command misreporting

Post by cshaffer »

That fixed it. Thanks.
Locked