Memory information

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
Narie
Posts: 57
Joined: Thu Apr 18, 2013 9:36 am

Memory information

Post 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?
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Memory information

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Narie
Posts: 57
Joined: Thu Apr 18, 2013 9:36 am

Re: Memory information

Post by Narie »

Thanks for your reply. With the PPA installation the option

Code: Select all

dont_blame_nrpe=1
is set to 1 automatically. This is the same for the check_mem command.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Memory information

Post 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?
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Memory information

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
Narie
Posts: 57
Joined: Thu Apr 18, 2013 9:36 am

Re: Memory information

Post 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.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Memory information

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked