This is all new to me but hey it's worth having a play
with so I've recorded what I've needed to do to get it working. These steps were performed on a CentOS 7.0 server (minimal install). NSClient++ RPMs were only available from 0.4.3 onwards.
Install EPEL Repository
NSClient++ requires some packages that are in the EPEL Repository. - Type yum -y install epel-release and press Enter
- Wait while the component is downloaded and installed
Install NSClient++
- Type yum -y install wget and press Enter
- Type cd /tmp and press Enter
- Type wget https://github.com/mickem/nscp/releases/download/0.4.3.143/NSCP-0.4.3.143-1.el7.x86_64.rpm and press Enter
- Wait for the file to download
- Type yum -y install NSCP-0.4.3.143-1.el7.x86_64.rpm and press Enter
- Wait for NSClient++ to install
- Type firewall-cmd --zone=public --add-port=5666/tcp and press Enter
- Type firewall-cmd --zone=public --add-port=5666/tcp --permanent and press Enter
At this point NSClient++ is: - Installed but currently not running
- Installed in /usr/sbin
- The configuration file is /etc/nsclient/nsclient.ini but if you look you'll find it is relatively empty
Configure NSClient++I'm going to allow the entire 10.25.0.0/16 subnet to connect to NSClient++, you could change the steps below to a specific IP Address - Type nscp settings --activate-module NRPEServer --add-defaults and press Enter
- Type nscp settings --activate-module CheckSystemUnix --add-defaults and press Enter
- Type nscp settings --path /settings/default --key "allowed hosts" --set 10.25.0.0/16 and press Enter
- Type nscp settings --path /settings/NRPE/server --key "allow arguments" --set true and press Enter
- Type nscp settings --path /settings/NRPE/server --key "allow nasty characters" --set true and press Enter
- Type nscp settings --path /settings/NRPE/server --key insecure --set true and press Enter
Start NSClient++- Type systemctl enable nscp.service and press Enter
- Type systemctl start nscp.service and press Enter
Test NRPE Client / Agent
This
will test that NSClient++ is properly installed and
listening on port 5666. The following command is executed on a Nagios
Core server and the computer running NSClient++ has the ip
address 192.168.142.132. - Type /usr/local/nagios/libexec/check_nrpe -H 192.168.142.132 and press Enter
- You should receive a response like:
- I (0.4.3.143 2015-04-29) seem to be doing fine...
- This confirms that NSClient++ is working
- Some other checks you could perform:
- Type check_nrpe -H 192.168.142.132 -c check_uptime show-all and press Enter
- Type check_nrpe -H 192.168.142.132 -c check_memory show-all and press Enter
- Type check_nrpe -H 192.168.142.132 -c check_os_version show-all and press Enter
The following command is executed on the computer running NSClient++ and is using the nscp command.
- Type nscp nrpe host=127.0.0.1 insecure and press Enter
- You should receive a response like:
- I (0.4.3.143 2015-04-29) seem to be doing fine...
- This confirms that NSClient++ is working
Notes / FindingsI previously had tested version 0.4.3.65 which was a beta. When I installed 0.4.3.73-1 it performed an upgrade however the existing nsclient.ini file was overwritten.
|
|