install nrpe plugins on Ubuntu & Centos


install nrpe plugins  on Ubuntu & Centos 

Find the source code for the latest stable release of NRPE at the NRPE downloads page. Download the latest version to your Nagios server.

root@nagiosclient:/# cd /tmp
root@nagiosclient:/tmp# wget https://github.com/NagiosEnterprises/nrpe/releases/download/nrpe-3.2.0/nrpe-3.2.0.tar.gz
--2017-09-11 14:34:41--  https://github.com/NagiosEnterprises/nrpe/releases/download/nrpe-3.2.0/nrpe-3.2.0.tar.gz
Resolving github.com (github.com)... 192.30.255.112, 192.30.255.113
Connecting to github.com (github.com)|192.30.255.112|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: 
Connecting to github-production-release-asset-2e65be.s3.amazonaws.com (github-production-release-asset-2e65be.s3.amazonaws.com)|54.231.120.35|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 517743 (506K) [application/octet-stream]
Saving to: ‘nrpe-3.2.0.tar.gz’

nrpe-3.2.0.tar.gz                 100%[===========================================================>] 505.61K   152KB/s    in 3.3s

2017-09-11 14:34:47 (152 KB/s) - ‘nrpe-3.2.0.tar.gz’ saved [517743/517743]

Once downloads Extract the build bu using given command.

root@nagiosclient:/tmp# tar xvf nrpe-*.tar.gz
nrpe-3.2.0/
nrpe-3.2.0/.gitignore
nrpe-3.2.0/.travis.yml
nrpe-3.2.0/CHANGELOG.md
nrpe-3.2.0/LEGAL
nrpe-3.2.0/LICENSE.md
nrpe-3.2.0/Makefile.in
nrpe-3.2.0/README.SSL.md
nrpe-3.2.0/README.md
nrpe-3.2.0/SECURITY.md
nrpe-3.2.0/THANKS
nrpe-3.2.0/aclocal.m4
nrpe-3.2.0/build-aux/
nrpe-3.2.0/build-aux/config.guess
nrpe-3.2.0/build-aux/config.sub
nrpe-3.2.0/build-aux/custom_help.m4
nrpe-3.2.0/build-aux/install-sh
nrpe-3.2.0/configure
nrpe-3.2.0/configure.ac
nrpe-3.2.0/contrib/
nrpe-3.2.0/contrib/README.nrpe_check_control
nrpe-3.2.0/contrib/nrpe_check_control.c
nrpe-3.2.0/docs/
nrpe-3.2.0/docs/NRPE.odt
nrpe-3.2.0/docs/NRPE.pdf
nrpe-3.2.0/include/
nrpe-3.2.0/include/acl.h
nrpe-3.2.0/include/common.h.in
nrpe-3.2.0/include/config.h.in
nrpe-3.2.0/include/nrpe.h
nrpe-3.2.0/include/utils.h
nrpe-3.2.0/macros/
nrpe-3.2.0/macros/.gitignore
nrpe-3.2.0/macros/CHANGELOG.md
nrpe-3.2.0/macros/LICENSE
nrpe-3.2.0/macros/LICENSE.md
nrpe-3.2.0/macros/README.md
nrpe-3.2.0/macros/add_group_user
nrpe-3.2.0/macros/ax_nagios_get_distrib
nrpe-3.2.0/macros/ax_nagios_get_files
nrpe-3.2.0/macros/ax_nagios_get_inetd
nrpe-3.2.0/macros/ax_nagios_get_init
nrpe-3.2.0/macros/ax_nagios_get_os
nrpe-3.2.0/macros/ax_nagios_get_paths
nrpe-3.2.0/macros/ax_nagios_get_ssl
nrpe-3.2.0/nrpe.spec.in
nrpe-3.2.0/paths.in
nrpe-3.2.0/sample-config/
nrpe-3.2.0/sample-config/nrpe.cfg.in
nrpe-3.2.0/src/
nrpe-3.2.0/src/Makefile.in
nrpe-3.2.0/src/acl.c
nrpe-3.2.0/src/check_nrpe.c
nrpe-3.2.0/src/nrpe.c
nrpe-3.2.0/src/snprintf.c
nrpe-3.2.0/src/utils.c
nrpe-3.2.0/startup/
nrpe-3.2.0/startup/bsd-init.in
nrpe-3.2.0/startup/debian-init.in
nrpe-3.2.0/startup/default-inetd.in
nrpe-3.2.0/startup/default-init.in
nrpe-3.2.0/startup/default-service.in
nrpe-3.2.0/startup/default-socket-svc.in
nrpe-3.2.0/startup/default-socket.in
nrpe-3.2.0/startup/default-xinetd.in
nrpe-3.2.0/startup/gentoo-init.in
nrpe-3.2.0/startup/mac-inetd.plist.in
nrpe-3.2.0/startup/mac-init.plist.in
nrpe-3.2.0/startup/newbsd-init.in
nrpe-3.2.0/startup/openbsd-init.in
nrpe-3.2.0/startup/openrc-conf.in
nrpe-3.2.0/startup/openrc-init.in
nrpe-3.2.0/startup/rh-upstart-init.in
nrpe-3.2.0/startup/solaris-inetd.xml.in
nrpe-3.2.0/startup/solaris-init.xml.in
nrpe-3.2.0/startup/tmpfile.conf.in
nrpe-3.2.0/startup/upstart-init.in
nrpe-3.2.0/test-wrapper
nrpe-3.2.0/travis-test-1
nrpe-3.2.0/uninstall.in
nrpe-3.2.0/update-cfg.pl
nrpe-3.2.0/update-version
root@nagiosclient:/tmp#



root@nagiosclient:/tmp/nrpe-3.2.0# ./configure --with-ssl=/usr/bin/openssl --with-ssl-lib=/usr/lib/x86_64-linux-gnu --prefix=/etc/nagios4 --enable-command-args
checking for a BSD-compatible install... /usr/bin/install -c
checking what the operating system is ... linux
checking what the distribution type is ... debian
checking what init system is being used ... systemd
checking what inetd is being used ... systemd
checking for which paths to use ... default
checking for which init file to use ... default-service
checking for which inetd files to use ... default-socket
checking for gcc... gcc
checking for pkg-config... pkg-config
checking for SSL headers... found in /usr/include/openssl
checking for SSL libraries... found in /usr/lib/x86_64-linux-gnu
checking whether compiling and linking against SSL works... yes
checking for openssl... /usr/bin/openssl
*** Generating DH Parameters for SSL/TLS ***
Generating DH parameters, 2048 bit long safe prime, generator 2
This is going to take a long time
...............................................+............................................................................................................................................................................................................................................................................+.....................................................................+....................................................................................................................................................+....................................+................+...........................................................................................................................................+............................+..........+.....................................................+.............................................................................................+...........................................................................................................................+............................................................................+................................+.................................................+.............................................................+......+..................+........................................................................................................................+......................................................................................................+...............................................................+...................................................................................................................................................................................................................................................................................+................................................+.............................................................+.....................................................................+.........................................+..................+......+................................................++*++*
checking for perl... /usr/bin/perl
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating nrpe.spec
config.status: creating uninstall
config.status: creating sample-config/nrpe.cfg
config.status: creating startup/bsd-init
config.status: creating startup/debian-init
config.status: creating startup/default-init
config.status: creating startup/default-inetd
*** Configuration summary for nrpe 3.2.0 2017-06-27 ***:
 General Options:
 -------------------------
 NRPE port:    5666
 NRPE user:    nagios
 NRPE group:   nagios
 Nagios user:  nagios
 Nagios group: nagios
Review the options above for accuracy.  If they look okay,
type 'make all' to compile the NRPE daemon and client
or type 'make' to get a list of make options.

3. Run the make all command.

root@nagiosclient:/tmp/nrpe-3.2.0# make all
cd ./src/; make
make[1]: Entering directory '/tmp/nrpe-3.2.0/src'
gcc -g -O2 -I/usr/include/openssl -DHAVE_CONFIG_H -I ../include -I ./../include -o nrpe ./nrpe.c ./utils.c ./acl.c -L/usr/lib/x86_64-linux-gnu  -lssl -lcrypto -lnsl
gcc -g -O2 -I/usr/include/openssl -DHAVE_CONFIG_H -I ../include -I ./../include -o check_nrpe ./check_nrpe.c ./utils.c -L/usr/lib/x86_64-linux-gnu  -lssl -lcrypto -lnsl
make[1]: Leaving directory '/tmp/nrpe-3.2.0/src'

*** Compile finished ***

You can now continue with the installation or upgrade process.

Read the PDF documentation (docs/NRPE.pdf) for information on the next
steps you should take to complete the installation or upgrade.

root@nagiosclient:/tmp/nrpe-3.2.0#

4. Install the software :

root@nagiosclient:/tmp/nrpe-3.2.0# make install
cd ./src/; make install
make[1]: Entering directory '/tmp/nrpe-3.2.0/src'
make install-plugin
make[2]: Entering directory '/tmp/nrpe-3.2.0/src'
/usr/bin/install -c -m 755 -d /etc/nagios4/bin
/usr/bin/install -c -m 755 ../uninstall /etc/nagios4/bin/nrpe-uninstall
/usr/bin/install -c -m 775 -o nagios -g nagios -d /etc/nagios4/libexec
/usr/bin/install -c -m 775 -o nagios -g nagios -d /etc/nagios4/libexec
/usr/bin/install -c -m 775 -o nagios -g nagios check_nrpe /etc/nagios4/libexec
make[2]: Leaving directory '/tmp/nrpe-3.2.0/src'
make install-daemon
make[2]: Entering directory '/tmp/nrpe-3.2.0/src'
/usr/bin/install -c -m 755 -d /etc/nagios4/bin
/usr/bin/install -c -m 755 ../uninstall /etc/nagios4/bin/nrpe-uninstall
/usr/bin/install -c -m 755 nrpe /etc/nagios4/bin
/usr/bin/install -c -m 755 -o nagios -g nagios -d /etc/nagios4/var
/usr/bin/install -c -m 755 -d /usr/lib/tmpfiles.d
/usr/bin/install -c -m 644 ../startup/tmpfile.conf /usr/lib/tmpfiles.d/nrpe.conf
make[2]: Leaving directory '/tmp/nrpe-3.2.0/src'
make[1]: Leaving directory '/tmp/nrpe-3.2.0/src'
root@nagiosclient:/tmp/nrpe-3.2.0#

5. Install Service / Daemon

root@nagiosclient:/tmp/nrpe-3.2.0# make install-init
/usr/bin/install -c -m 644 startup/default-service /lib/systemd/system/nrpe.service
root@nagiosclient:/tmp/nrpe-3.2.0#

6. Install Configuration Files

root@nagiosclient:/tmp/nrpe-3.2.0# make install-config
/usr/bin/install -c -m 775 -o nagios -g nagios -d /etc/nagios4/etc
/usr/bin/install -c -m 644 -o nagios -g nagios sample-config/nrpe.cfg /etc/nagios4/etc
root@nagiosclient:/tmp/nrpe-3.2.0#


7. Update server ip address in configuration file, It is located:

#/usr/local/nagios/etc/nrpe.cfg

#SERVER ADDRESS
server_address=192.168.1.111 ; nagios server ip


Comments

Popular Posts

Install and configure rsyslog Centralized logging server in CentOS

How to fix postfix/smtp Network is unreachable error

Could not join realm: Necessary packages are not installed: sssd-tools sssd libnss-sss libpam-sss adcli