Page 2 of 2

Re: installing NRPE on Ubuntu 10.04LTS

Posted: Tue Jan 22, 2013 5:47 pm
by jeremy.garman
Thanks gshergill, I really appreciate your dilligence. As I'm working off of a VM, I keep reverting to previous snapshots and restarting from scratch...
this latest time, I took my bear-bones Ubuntu 10.04LTS install, did an "apt-get update", manually installed "build-essential", "libssl-dev" and "xinetd" and successfully ran the configure for the Nagios plugins, this time downloading a fresh copy of the plugins tar file from the website.
I got the same error messages as before when running the make (including the one that you displayed in your most recent post), and several errors like this:
libtool: link: cannot find the library `' or unhandled argument `plug-ins/nagios-plugins-1.4.16/plugins'
make[2]: *** [check_apt] Error 1
make[2]: Leaving directory `/opt/nagios/nagios plug-ins/nagios-plugins-1.4.16/plugins'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/opt/nagios/nagios plug-ins/nagios-plugins-1.4.16'
make: *** [all] Error 2

when I run the make install for the plugins, I get all of the following errors and none of the system file directories are created (as evidenced by a "directory does not exist" type of error message when I try to chmod them afterwards):
make[4]: Nothing to be done for `install-data-am'.
make[4]: Leaving directory `/opt/nagios/nagios plug-ins/nagios-plugins-1.4.16/gl'
make[3]: Leaving directory `/opt/nagios/nagios plug-ins/nagios-plugins-1.4.16/gl'
make[2]: Leaving directory `/opt/nagios/nagios plug-ins/nagios-plugins-1.4.16/gl'
make[1]: Leaving directory `/opt/nagios/nagios plug-ins/nagios-plugins-1.4.16/gl'
Making install in tap
make[1]: Entering directory `/opt/nagios/nagios plug-ins/nagios-plugins-1.4.16/tap'
make[2]: Entering directory `/opt/nagios/nagios plug-ins/nagios-plugins-1.4.16/tap'
make[2]: Nothing to be done for `install-exec-am'.
test -z "/usr/local/nagios/include" || /bin/mkdir -p "/usr/local/nagios/include"
make[2]: Leaving directory `/opt/nagios/nagios plug-ins/nagios-plugins-1.4.16/tap'
make[1]: Leaving directory `/opt/nagios/nagios plug-ins/nagios-plugins-1.4.16/tap'
Making install in lib
make[1]: Entering directory `/opt/nagios/nagios plug-ins/nagios-plugins-1.4.16/lib'
Making install in .
make[2]: Entering directory `/opt/nagios/nagios plug-ins/nagios-plugins-1.4.16/lib'
make[3]: Entering directory `/opt/nagios/nagios plug-ins/nagios-plugins-1.4.16/lib'
make[3]: Nothing to be done for `install-exec-am'.
make[3]: Nothing to be done for `install-data-am'.
make[3]: Leaving directory `/opt/nagios/nagios plug-ins/nagios-plugins-1.4.16/lib'
make[2]: Leaving directory `/opt/nagios/nagios plug-ins/nagios-plugins-1.4.16/lib'
Making install in tests
make[2]: Entering directory `/opt/nagios/nagios plug-ins/nagios-plugins-1.4.16/lib/tests'
make[3]: Entering directory `/opt/nagios/nagios plug-ins/nagios-plugins-1.4.16/lib/tests'
make[3]: Nothing to be done for `install-exec-am'.
make[3]: Nothing to be done for `install-data-am'.
make[3]: Leaving directory `/opt/nagios/nagios plug-ins/nagios-plugins-1.4.16/lib/tests'
make[2]: Leaving directory `/opt/nagios/nagios plug-ins/nagios-plugins-1.4.16/lib/tests'
make[1]: Leaving directory `/opt/nagios/nagios plug-ins/nagios-plugins-1.4.16/lib'
Making install in plugins
make[1]: Entering directory `/opt/nagios/nagios plug-ins/nagios-plugins-1.4.16/plugins'
/bin/bash ../libtool --tag=CC --mode=link gcc -DNP_VERSION='"1.4.16"' -g -O2 -L. -o check_apt check_apt.o utils.o ../lib/libnagiosplug.a ../gl/libgnu.a runcmd.o -lpthread -ldl
libtool: link: cannot find the library `' or unhandled argument `plug-ins/nagios-plugins-1.4.16/plugins'
make[1]: *** [check_apt] Error 1
make[1]: Leaving directory `/opt/nagios/nagios plug-ins/nagios-plugins-1.4.16/plugins'
make: *** [install-recursive] Error 1

followed by:
root@:~# chmod -R 777 /usr/local/nagios/libexec
chmod: cannot access `/usr/local/nagios/libexec': No such file or directory

previously, I tried simply copying over all the missing directories and check commands, but that didn't work either.

anyone have any ideas?

Re: installing NRPE on Ubuntu 10.04LTS

Posted: Thu Jan 24, 2013 11:31 am
by yancy
jeremy,

it looks like the configure script can't find the plugins directory

can you try the following:

Code: Select all

sudo updatedb 

Code: Select all

sudo locate "nagios-plugins-1.4.16"
regards,

-Yancy

Re: installing NRPE on Ubuntu 10.04LTS

Posted: Fri Jan 25, 2013 9:54 am
by jeremy.garman
Thanks for the suggestion yancy, but I tried it, re-configured successfully and got exactly the same issue when I tried to make and make install.
Very frustrating...

Re: installing NRPE on Ubuntu 10.04LTS

Posted: Fri Jan 25, 2013 3:08 pm
by sreinhardt
Jeremy, could you send us the result of the sudo locate "nagios-plugins-1.4.16" command please?

Re: installing NRPE on Ubuntu 10.04LTS

Posted: Fri Jan 25, 2013 4:45 pm
by jeremy.garman
Success!!!!!!!!
There were several variables that I changed at the same time, so I'm not 100% sure which was responsible for the success (doh!!), but I suspect its the following #1 :
1) my installation directory for both Nagios plugins and the NRPE agent had spaces in it, so I shortened the directory name with dashes and the system recognized the directory names
2) I added a configure reference to SSL and SSL lib for the NRPE agent installation

Here are my steps:
1) apt-get install libgd2-xpm-dev libssl-dev openssl build-essential xinetd chkconfig, then apt-get update
2) make sure installation directory names have no spaces in them!!
3) useradd nagios, passwd nagios
4) from Nagios plugin installation directory:
./configure --with-nagios-user=nagios --with-nagios-group=nagios
make
make install
5) from Nagios NRPE installation directory:
./configure --with-ssl=/usr/bin/openssl --with-ssl-lib=/usr/bin/x86_64-linux-gnu --enable-command-args
make all
make install-plugin
make install-daemon
make install-daemon-config
make install-xinetd
6) edit /etc/xinetd.d/nrpe, add nrpe server IP to "only_from" field
7) edit /etc/services, add "nrpe 5666/tcp #NRPE" at the appropriate line
8) reboot server
9) chkconfig nrpe on
10) netstat -at |grep nrpe
11) ./usr/local/nagios/libexec/check_nrpe -H localhost

what a pain in the @#$%& that was!! : )
thanks so much to everyone who submitted suggestions and advice, my solution seemed to be a wild combination of everyone's suggestions and bits and pieces from the community.
much appreciated!!!

- Jeremy

Re: installing NRPE on Ubuntu 10.04LTS

Posted: Fri Jan 25, 2013 4:52 pm
by sreinhardt
Glad its working, and thank you for providing working steps! Hopefully this also helps someone else in the future.