Page 1 of 1
NRPE - Connection refused by host
Posted: Mon Feb 06, 2012 10:49 am
by aap
Hi,
I am using Nagios XI 1.8 and hve installed the NRPE agent on a Solaris server to be monitored. However, I get the "Connection refused by host" message in Nagios. The nagios account and password has been setup on the remote host.
What are the additional configuration steps required to get this working both on the Nagios Server and the remote host.
Any assistance is appreciated.
Re: NRPE - Connection refused by host
Posted: Mon Feb 06, 2012 11:58 am
by lmiltchev
Run the following command on your client machine and post the output:
Code: Select all
# /usr/local/nagios/libexec/check_nrpe -H localhost
From your nagios server:
Code: Select all
# /usr/local/nagios/libexec/check_nrpe -H <your_client_IP_address>
also
Code: Select all
# telnet <your_client_IP_address> 5666
Did you check if you have any firewall issues?
Are you using xinetd? If you do, make sure you have your nagios xi server's IP address added to the "only_from = " line.
Re: NRPE - Connection refused by host
Posted: Wed Feb 08, 2012 5:28 am
by aap
Hi, Thanks for the feedback. I have ran the command on the Nagios servers and the result I get is "Connection refused".
My unix support guy assures me that he cannot fine the nrpe command hence cannot run the commands you posted. I previously supplied the nrpe 2.13 installation and he assures me that this has already been installed.
Please can you advise the options I have in monitoring a Solaris 10 machine and what I will need to install on the host to be monitored.
I appreciate your assistance.
Re: NRPE - Connection refused by host
Posted: Wed Feb 08, 2012 12:57 pm
by aap
Now working ok. Missed out the plugins. This is now installed and working fine.
However any ideas how I get it to check_disk and check_cpu_stats?
Thanks.
Re: NRPE - Connection refused by host
Posted: Fri Feb 10, 2012 12:27 pm
by lmiltchev
If you can run the following command successfully from the command line on your Nagios server, you should be able to start running some checks.
Code: Select all
# /usr/local/nagios/libexec/check_nrpe -H <your_client_IP_address>
I am not sure how it will work with Solaris, but you can try running from the command line on your Nagios server, something like this:
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H <IP_of_the_target_machine> -t 30 -c check_disk -a '-w 20% -c 10% -p /'
Make sure you use proper syntax. You can check the usage by running:
Code: Select all
/usr/local/nagios/libexec/check_nrpe -h
and
Code: Select all
/usr/local/nagios/libexec/check_disk -h
It will be similar for the check_cpu_stats.
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H <IP_of_the_target_machine> -t 30 -c check_cpu_stats -a '-w 85 -c 95'