I am not able to monitor Memory Usage of Nagios

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
xerez
Posts: 77
Joined: Wed Apr 22, 2015 7:50 am

I am not able to monitor Memory Usage of Nagios

Post by xerez »

Hi, I am trying to monitor the Memory Usage of Nagios's server with NRPE. However, I am not able to do it.

Code: Select all

[nagios@hostname libexec]$ ./check_nrpe -H localhost
connect to address ::1 port 5666: Connection refused
connect to address 127.0.0.1 port 5666: Connection refused
connect to host localhost port 5666: Connection refused[nagios@hostname libexec]$

Code: Select all

[nagios@hostname libexec]$ netstat -at | grep nrpe
[nagios@hostname libexec]$
I am using xinetd.

Edit:
Now, I have added the IP of Nagios in /etc/xinetd.d/nrpe, and the error has changed.

Code: Select all

[nagios@hostname libexec]$ ./check_nrpe -H localhost 
CHECK_NRPE: Error - Could not complete SSL handshake.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: I am not able to monitor Memory Usage of Nagios

Post by tmcdonald »

Check section 3:

https://assets.nagios.com/downloads/nag ... utions.pdf

The guide should be mostly applicable to both XI and Core. Likely you did not compile SSL support into the agent.
Former Nagios employee
xerez
Posts: 77
Joined: Wed Apr 22, 2015 7:50 am

Re: I am not able to monitor Memory Usage of Nagios

Post by xerez »

I followed that document and nothing...
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: I am not able to monitor Memory Usage of Nagios

Post by hsmith »

Can you post the contents of /etc/xinetd.d/nrpe please?
Former Nagios Employee.
me.
xerez
Posts: 77
Joined: Wed Apr 22, 2015 7:50 am

Re: I am not able to monitor Memory Usage of Nagios

Post by xerez »

Code: Select all

[nagios@hostname objects]$ cat /etc/xinetd.d/nrpe
# default: on
# description: NRPE (Nagios Remote Plugin Executor)
service nrpe
{
        flags           = REUSE
        socket_type     = stream
        port            = 5666
        wait            = no
        user            = nagios
        group           = nagios
        server          = /usr/local/nagios/bin/nrpe
        server_args     = -c /usr/local/nagios/etc/nrpe.cfg --inetd
        log_on_failure  += USERID
        disable         = no
        only_from       = 127.0.0.1 [IP Nagios]
}
Finally I got that NRPE works with the Nagios's IP or 127.0.0.1, but not with localhost:

Code: Select all

[nagios@ccnagios libexec]$ ./check_nrpe -H localhost
CHECK_NRPE: Error - Could not complete SSL handshake.
[nagios@hostname libexec]$ ./check_nrpe -H 127.0.0.1
NRPE v2.15
[nagios@hostname libexec]$ ./check_nrpe -H [ip]
NRPE v2.15
Now, to check the Physical Memory to Nagios. What plugin or command command I can use? Thanks.
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: I am not able to monitor Memory Usage of Nagios

Post by hsmith »

What are you trying to monitor the memory of? We have a lot of different plugins for monitoring a wide variety of devices.
Former Nagios Employee.
me.
xerez
Posts: 77
Joined: Wed Apr 22, 2015 7:50 am

Re: I am not able to monitor Memory Usage of Nagios

Post by xerez »

I would like monitoring the Physical Memory (RAM) in the Nagios server.
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: I am not able to monitor Memory Usage of Nagios

Post by hsmith »

I would recommend you use the check_mem.pl plugin on your server, and just write a service check to have it check itself.
Former Nagios Employee.
me.
xerez
Posts: 77
Joined: Wed Apr 22, 2015 7:50 am

Re: I am not able to monitor Memory Usage of Nagios

Post by xerez »

Thanks!!
User avatar
lgroschen
Posts: 384
Joined: Wed Nov 27, 2013 1:17 pm

Re: I am not able to monitor Memory Usage of Nagios

Post by lgroschen »

xerez,

would you consider this topic resolved? If so I will lock it, but only if you have no further questions.
/Luke
Locked