Page 2 of 9

Re: Monitoring Ubuntu, Agent File

Posted: Wed Jan 30, 2013 1:23 pm
by abrist
What errors are you receiving?

Re: Monitoring Ubuntu, Agent File

Posted: Wed Jan 30, 2013 1:41 pm
by tonyyarusso
A.Cormack wrote:Tony - The guide that you've just mentioned would it be useful in my situations? I did just try to the first command "add-apt...." but it didn't like it.
Yeah, that guide will install NRPE, plugins, and some command definitions. If you get a "command not found" error for add-apt-repository, you need to do 'apt-get install python-software-properties' first. (That should be added to the guide too, since that package is not standard on current Ubuntu server installations. It should probably also mention that the package is in universe, so you'll need to make sure that's enabled.)

Re: Monitoring Ubuntu, Agent File

Posted: Wed Jan 30, 2013 2:12 pm
by A.Cormack
Abrist - The error i get is..

Code: Select all

nagiosadmin@ubuntu:/tmp/nrpe-2.14$ make install
cd ./src/ && make install
make[1]: Entering directory '/tmp/nrpe-2.14/src'
make install-plugin
make[2]: Entering directory '/tmp/nrpe-2.14/src'
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/libexec
/usr/bin/install: invalid user 'nagios'
make[2]: *** [install-plugin] Error 1
make[2]: Leaving directory '/tmp/nrpe-2.14/src'
make[1]: *** [install] Error 2
make[1]: Leaving directory '/tmp/nrpe-2.14/src'
make: *** [install] Error 2
Tony - Yeah, I tried the apt-get python command before but it still says the command is not found, but i know that is due to something stupid i've missed somewhere

Re: Monitoring Ubuntu, Agent File

Posted: Wed Jan 30, 2013 2:25 pm
by abrist
Looks like you need to make a nagios user/group first. Try:

Code: Select all

useradd -U -M nagios
And then try running the compile again.

Re: Monitoring Ubuntu, Agent File

Posted: Wed Jan 30, 2013 2:55 pm
by A.Cormack
That workd Abrist and I did the rest of the guide too which all seemed to work. Then i closed Vmware to change to a bridge connection, loaded it up and all the files had gone :/

Re: Monitoring Ubuntu, Agent File

Posted: Wed Jan 30, 2013 3:01 pm
by scottwilkerson
It is likely setup, your system is likely clearing the files from /tmp when you shut-down the VM

Re: Monitoring Ubuntu, Agent File

Posted: Wed Jan 30, 2013 3:05 pm
by A.Cormack
Ah ok, so I'm guesssing I need to stop VMware clearing the files? or put the nagios folder in a different location?

Re: Monitoring Ubuntu, Agent File

Posted: Wed Jan 30, 2013 3:11 pm
by abrist
Just move your working source folder to your directory in /home. Then the files will stay persistent through reboots.

Re: Monitoring Ubuntu, Agent File

Posted: Wed Jan 30, 2013 4:23 pm
by A.Cormack
Sorry to be a pain, but still no luck. Followed the guide that Abrist has done.

Went into "nano /usr/local/nagios/etc/nrpe.cfg" changed...

server_address=192.168.19.134
allowed_hosts=127.0.0.1,192.168.19.134
dont_blame_nrpe=1

but Nagios still saying connection is refused

Re: Monitoring Ubuntu, Agent File

Posted: Wed Jan 30, 2013 4:36 pm
by abrist
The server_address directive is the ip of the interface the nrpe server should use, essentially it should be set to 127.0.0.1 unless the remote host has more than 1 interface (it should not be set to the nagios server ip).

On the nagios XI server, run nmap to test port 5666

Code: Select all

nmap 192.168.19.134 -p 5666