Page 3 of 9
Re: Monitoring Ubuntu, Agent File
Posted: Wed Jan 30, 2013 4:42 pm
by A.Cormack
Sorry Rookie mistake
changed back to
and did the nmap
says its open and its server is nrpe
But stil getting connection refused on Nagios
Re: Monitoring Ubuntu, Agent File
Posted: Wed Jan 30, 2013 5:18 pm
by abrist
Alright, the port on the remote host is open. These edits are being done on the remote host's nrpe.cfg, is that correct? I am sorry, the nmap should be the ip of the remote host, not the nagios server.
Is 192.168.19.134 the nagios server or the nrpe remote host?
Re: Monitoring Ubuntu, Agent File
Posted: Wed Jan 30, 2013 5:24 pm
by A.Cormack
Nagios Server - 192.168.19.134
Ubuntu Server - 192.168.19.141
The nrpe.cfg is being edited on the Ubuntu Server (.141).
So, If i've understood what you said, I went to the Nagios serer (.134) and typed..
Which says
Code: Select all
PORT STATE SERVICE
5666/TCP CLOSED NRPE
So I'm guessing thats my problem and I need to open it? if so how?
Re: Monitoring Ubuntu, Agent File
Posted: Wed Jan 30, 2013 5:28 pm
by abrist
Alright. I assume you have successfully compiled nrpe on the ubuntu server. Lets try starting nrpe if you have not done so:
On the ubuntu host, we will try to xinetd first, and if that does not work, try to start it by it's init script:
if that does not work, try:
Re: Monitoring Ubuntu, Agent File
Posted: Wed Jan 30, 2013 5:31 pm
by A.Cormack
I've really messed up somewhere I think, sorry for wasting your time.
I've just done "ls" in my init.d directory and xinetd or nrpe are not there :/
I think it might be best i start from fresh again.
Re: Monitoring Ubuntu, Agent File
Posted: Wed Jan 30, 2013 5:38 pm
by A.Cormack
Ok, So I did
Code: Select all
sudo apt-get install xinetd
sudo apt-get install nagios-nrpe-server
now in Nagios I get
Code: Select all
CHECK_NRPE Received 0 bytes from Daemon. Check remote server logs for error messages
Re: Monitoring Ubuntu, Agent File
Posted: Wed Jan 30, 2013 5:45 pm
by abrist
You will most likely need to edit the nrpe.cfg file again. The nrpe file for the package-based install is located in /etc/nagios. Go there and re apply your changes to the nrpe.cfg file.
Re: Monitoring Ubuntu, Agent File
Posted: Wed Jan 30, 2013 5:52 pm
by A.Cormack
Yeah, I already changed them back to
Code: Select all
allowed_hosts=127.0.0.1,192.168.19.134
dont_blame_nrpe=1
still same message on Nagios
Re: Monitoring Ubuntu, Agent File
Posted: Wed Jan 30, 2013 6:01 pm
by abrist
Alright, run the nmap command again to see if port 5666 is open. Could you post you /etc/nagios/nrpe.cfg file as well?
On the Nagios server:
On the Ubuntu server:
You may want to stop the nrpe service, killall nrpe, and then bring it back up to make sure you are using the right config:
Code: Select all
/etc/init.d/nrpe stop
killall nrpe
/etc/init.d/nrpe start
ps -aef |grep nrpe
Re: Monitoring Ubuntu, Agent File
Posted: Wed Jan 30, 2013 6:14 pm
by A.Cormack
After doing the NRPE commands you said, the message has now gone back to connection refused.
Its 23:09 here and been here since 17:00 so anything I do will have to be tomorrow. Thanks for all your help today, really appricaite it specially when I have no knowledge at all, hopefully I can get this resolved tomorrow.
As for the log file, it doesnt seem to want to copy/paste so ill just give you all the values if thats ok? If not just say and ill get you the full log tomorrow.
Code: Select all
log_facility=daemon
pid_file=/ar/run/nrpe.pid
serer_port=5666
server_address=127.0.0.1
nrpe_group=nagios
allowed_hosts=127.0.0.1,192.168.19.134
dont_blame_nrpe=1
allow_bash_command_substitution=0
command_prefix=/usr/bin/sudo
debug=0
connection_timeout=300