Installing Nagios agent on Ubuntu servers

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
Beena_Jogin
Posts: 54
Joined: Fri Jan 22, 2016 4:58 am

Installing Nagios agent on Ubuntu servers

Post by Beena_Jogin »

Hi,

We are trying to install Nagios agent on Ubuntu servers. Version 14.04.3

we are executing the below commands and addition to that we are executing the command #./configure where ssl and ssl-lib files are added. In this ssl files are not available in the document which we are executing and let us know it will not affect any production changes while executing it.

Since we are getting below error while executing ./configure without the SSl-lib files.

#./configure --enable-command-args
configure: error: Cannot find ssl libraries

For installing Nagios in Ubuntu servers do we need to install nagios-agent and nrpe both document commands for successful installation.

Referring document Installing-the-Ubuntu-and-Debian-Agent-in-Nagios-XI
#add-apt-repository ppa:nagiosinc/ppa
#apt-get update
#apt-get install nagios-agent
#dpkg-reconfigure nagios-agent
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Referring document How-To-Configure-NRPE-and-Install-From-Source-with-Nagios-XI
#cd /tmp
#wget http://sourceforge.net/projects/nagios/ ... .14.tar.gz
#tar vfxz nrpe-2.14.tar.gz
#cd nrpe-2.14
#./configure --with-ssl=/usr/bin/openssl --with-ssl-lib=/usr/lib/x86_64-linux-gnu  which is not in document SSL
#make
#make install
#mkdir /usr/local/nagios/etc
#cp sample-config/nrpe.cfg /usr/local/nagios/etc
#cd /tmp/nrpe-2.14
#make install-xinetd
#Vi /etc/xinetd.d/nrpe
only_from = 127.0.0.1 x.x.x.x
(where x.x.x.x is your Nagios XI server's ip)
Finally, we need to add the nrpe port and service declaration in /etc/services:
#vi /etc/services
Add:
nrpe 5666/tcp

#service xinetd start
#cd /usr/local/nagios/libexec
#./check_nrpe -H localhost
You should see the following output:
NRPE v2.14
If you get the nrpe version number

#/tmp
#wget https://www.nagios-plugins.org/download ... 2.0.tar.gz
#tar zxvf nagios-plugins-2.0.tar.gz
#cd /tmp/nagios-plugins-2.0
#./configure --with-nagios-user=nagios --with-nagios-group=nagios
#make
#make install

To recap, nrpe and the nagios-plugins pack installed to /usr/local/nagios/libexec.
The nrpe.cfg config file is located at /usr/local/nagios/etc.
#vi /usr/local/nagios/etc/nrpe.cfg
allowed_hosts=127.0.0.1,<your Nagios XI IP address>
dont_blame_nrpe=1
#service xinetd status
If service not started start it.
#service xinetd start
bwallace
Posts: 1145
Joined: Tue Nov 17, 2015 1:57 pm

Re: Installing Nagios agent on Ubuntu servers

Post by bwallace »

Regarding the error "cannot find ssl headers" run this command apt-get install libssl-dev and (re) ./configure afterwards. This, nor any of the steps below, will have any impact on production.

I've seen with other NRPE installs on Ubuntu where after the above executes, you'll end up with a new error:
checking for SSL libraries... configure: error: Cannot find ssl libraries

If that is the case, you'll have to use 'apt-file' to search for where these SSL headers reside, so run the following:
apt-get install apt-file -y
Then run
apt-file update
Now you should be ready to actually use apt-file, like so:
apt-file search libssl |grep libssl-dev

You should see something similar to this:

Code: Select all

libssl-dev: /usr/lib/i386-linux-gnu/libssl.a
libssl-dev: /usr/lib/i386-linux-gnu/libssl.so
libssl-dev: /usr/lib/i386-linux-gnu/pkgconfig/libssl.pc
libssl-dev: /usr/share/doc/libssl-dev/changelog.Debian.gz
libssl-dev: /usr/share/doc/libssl-dev/changelog.gz
libssl-dev: /usr/share/doc/libssl-dev/copyright
Now you can reconfigure using the '--with-ssl-lib' option (run from the nrpe-* directory)
./configure --with-ssl-lib=/usr/lib/i386-linux-gnu/
Be sure to check out the Knowledgebase for helpful articles and solutions!
Locked