Page 3 of 5
Re: CONNECTION REFUSED
Posted: Tue Jan 22, 2013 3:36 pm
by slansing
You need to provide the file extension when changing the permissions like so:
chmod +x install.sh
Also, please run all of this from the actual /tmp/ directory not a custom created one, remove all of the current files you were working with and drop just the install.sh script, and the tarball together into the /tmp directory, then run it from there.
Re: CONNECTION REFUSED
Posted: Tue Jan 22, 2013 4:26 pm
by brianweeks22
i was able to follow these instructions as well as yours and fully install NRPE...
http://askaralikhan.blogspot.com/2011/0 ... pe-on.html
but under /etc/nagios/nrpe.cfg i still just have
command[check_mem]=/usr/lib/nagios/plugins/contrib/check_mem.pl -u -w 90 -c 95
~
~
~
~
~
Re: CONNECTION REFUSED
Posted: Tue Jan 22, 2013 4:28 pm
by brianweeks22
Sorry.. I did not see your last post as it was on page 3, until after I wrote my last post..
Would you like for me to still complete your last request (remove custom directories and do as you explained?)
Thanks
Re: CONNECTION REFUSED
Posted: Tue Jan 22, 2013 4:58 pm
by slansing
Yes following those instructions probably did not overwrite your NRPE.cfg file which is going to be the easiest way to create a new, functioning one, however I am going to just attach mine and remove somethings from it, simply replace your old NRPE.cfg file with mine and lets cross our fingers it works. You could still be missing some core things that nrpe requires if your NRPE.cfg file really had nothing in it from the start. I am assuming you may have created it to add a command definition.
Make sure that you add your Nagios, and remote server's IP's to the allowed_hosts section.
You will have to extract the nrpe.cfg file and place it in:
Also make sure it is readable and writable by the system.
Re: CONNECTION REFUSED
Posted: Tue Jan 22, 2013 5:09 pm
by brianweeks22
replaced old nrpe.cfg with new file... added nagios server as well as 2 hosts IP addresses.. comma separated with no spaces..
exP 10.1.1.1, 10.1.1.2, 10.1.1.3
stopped/started nagios service
still saying connection refused./
i place the file (and replaced) inside of this directory on our server
/etc/nagios/nrpe.cfg
NOT /usr/loca/nagios/etc as this directory does not exist
Thanks
Brian
Re: CONNECTION REFUSED
Posted: Tue Jan 22, 2013 5:14 pm
by brianweeks22
also, just some more information.. the CentOS 6 is the nagios server
I am attempting to check windows clients..
Thanks
Re: CONNECTION REFUSED
Posted: Tue Jan 22, 2013 5:18 pm
by slansing
If you installed from source you need to create the /etc directory under:
/usr/local/nagios/
And then place the config file in there, I think you may have installed Nagios from source and not completely finished the installation instructions for NRPE

.
Re: CONNECTION REFUSED
Posted: Tue Jan 22, 2013 5:21 pm
by brianweeks22
so now under /usr/local/nagios i created a folder entitled etc
what all do i put under that folder?
Thanks
Edit:
under /usr/local/nagios/etc i placed the new (modified w/IP addresses) nrpe.cfg
restarted xinetd as well as nagios
"connection refused"
Re: CONNECTION REFUSED
Posted: Tue Jan 22, 2013 5:30 pm
by slansing
So when you run the following pointed at your NSClient++ server:
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H ip.of.the.remote.host.here
You are now getting connection refused?
Have you used NRPE with any of your other host/service checks? I did not realize you had configured NRPE to run in xinetd and not daemonized. Edit the following and add your remote host to it as well:
Re: CONNECTION REFUSED
Posted: Tue Jan 22, 2013 5:37 pm
by brianweeks22
under /libexec there is no check_nrpe only check_mssql_health and check_proc_meminfo
I think we may have our problem?!
could you send me what I need to place under libexec?
(If that is the issue)
Thanks