Page 1 of 1
Memory information
Posted: Mon Jan 19, 2015 8:26 am
by Narie
I'm running Nagios XI 2014R2.3 and use the Nagios PPA to install NRPE on my Ubuntu servers. This installation runs fine, and I use the monitoring wizard to add a Linux server. All of the Ubuntu servers I'm monitoring are running on ESXi (5.5) servers. No matter what the memory usage is, it's allways displayed in XI as a warning, as seen below.
WARNING - 2670 / 3945 MB (%) Free Memory, Used: 1275 MB, Shared: 0 MB, Buffers: 64 MB, Cached: 223 MB
This is the actual check:
Code: Select all
check_nrpe!check_mem!-a '-w 20 -c 10'!!!!!!
Please see my 'free -m' command.
Code: Select all
total used free shared buffers cached
Mem: 3945 1274 2671 0 64 223
-/+ buffers/cache: 986 2958
Swap: 1021 0 1021
Is this warning justified?
Re: Memory information
Posted: Mon Jan 19, 2015 10:49 am
by tgriep
It sounds like Argument Processing isn't enabled on the remote server.
You have to edit the nrpe.cfg file on the remote server and change the following to a one.
# COMMAND ARGUMENT PROCESSING
# This option determines whether or not the NRPE daemon will allow clients
# to specify arguments to commands that are executed. This option only works
# if the daemon was configured with the --enable-command-args configure script
# option.
# Values: 0=do not allow arguments, 1=allow command arguments
dont_blame_nrpe=1
Also your check_mem command in the same file should look like the following
Code: Select all
command[check_mem]=/usr/local/nagios/libexec/check_mem -w $ARG1$ -c $ARG2$
If you are still having problems, please upload your nrpe.cfg file so we can review it.
Re: Memory information
Posted: Mon Jan 19, 2015 11:15 am
by Narie
Thanks for your reply. With the PPA installation the option
is set to 1 automatically. This is the same for the check_mem command.
Re: Memory information
Posted: Mon Jan 19, 2015 11:21 am
by slansing
This may also be a math problem. What version of the nagios plugins package are you using? Or are your using pre-compiled binaries?
Re: Memory information
Posted: Mon Jan 19, 2015 11:30 am
by tgriep
Sorry, I missed it before but your check_mem command should look like this too.
Code: Select all
check_command check_nrpe!check_mem!-a 80 90!!!!!!
The "check_mem" command should go in the $ARG1$ field and "-a 80 90" should go in the $ARG2$ field, no quotes.
This should give you a Warning at 80% and Critical at 90%.
Also could you run this on the remote host?
Code: Select all
/usr/local/nagios/libexec/check_mem --help
Re: Memory information
Posted: Tue Jan 20, 2015 2:23 am
by Narie
Thanks for your help. It turned out to be the missing
dc. When I ran custom_check_mem manually on the monitored host
Code: Select all
/usr/lib/nagios/plugins/custom_check_mem -w 20 -c 10
I got the error message
Code: Select all
/usr/lib/nagios/plugins/custom_check_mem: line 89: /usr/bin/dc: No such file or directory
After installing dc on my Ubuntu host the problem was solved.
Re: Memory information
Posted: Tue Jan 20, 2015 9:40 am
by lmiltchev
I am glad your issues has been resolved! I am locking this post. If you have any more issues/questions, please start a new thread.