no way to compare when less than two revisions

Differences

This shows you the differences between two versions of the page.


tech:linux:install_nagios_plugin_nrpe_redhat [2014/11/15 15:13] (current) – created - external edit 127.0.0.1
Line 1: Line 1:
 +====== Install Nagios Plugin and NRPE on Redhat ======
 +Prerequisite install
 +  * xinetd
 +  * openssl-devel
 +
 +Redhat 3rd party libraries if added to yum can let you install nrpe via yum.  However, below is an explanation of now to compile this locally.
 +
 +===== Download and Extract files =====
 +Download and copy files to /tmp
 +  * nrpe-2.15.tar.gz
 +  * nagios-plugins-1.5.tar.gz
 +Extract files
 +<code bash>
 +cd /tmp
 +tar zxvf nrpe-2.15.tar.gz
 +tar zxvf nagios-plugins-1.5.tar.gz
 +</code>
 +
 +===== Create nagios Account =====
 +<code>
 +groupadd nagios
 +useradd -d /var/log/nagios -g nagios -m -p somepassword nagios
 +date|md5sum|cut -b "1-10" | passwd --stdin nagios
 +id nagios
 +</code>
 +
 +===== Install the Nagios Plugins =====
 +<code>
 +cd nagios-plugins-1.5
 +./configure
 +make
 +make install
 +chown -R nagios:nagios /usr/local/nagios
 +</code>
 +
 +===== Install the NRPE daemon =====
 +<code>
 +cd nrpe-2.15
 +./configure
 +make all
 +make install-plugin
 +make install-daemon
 +make install-daemon-config
 +make install-xinetd
 +
 +chown -R nagios:nagios /usr/local/nagios
 +</code>
 +
 +Update nagios server IP address here.  Included additional IP separated by spaces.
 +<code>
 +grep only /etc/xinetd.d/nrpe
 +</code>
 +
 +Use the following example to replace easily!
 +<code>
 +sed -i 's@only_from       = 127.0.0.1@only_from       = 127.0.0.1 10.50.60.0/24 204.67.86.0/24@' /etc/xinetd.d/nrpe
 +</code>
 +
 +Add the NRPE daemon to services
 +<code>
 +echo "nrpe            5666/tcp                # NRPE" >> /etc/services
 +service xinetd restart
 +</code>
 +
 +
 +===== Test NRPE daemon =====
 +Check for Listening port
 +<code>
 +netstat -at | grep nrpe
 +</code>
 +should have output as
 +<code>
 +tcp        0      0 *:nrpe                      *:*                         LISTEN
 +</code>
 +
 +Run the call to service
 +<code>
 +/usr/local/nagios/libexec/check_nrpe -H 127.0.0.1
 +</code>
 +Should return **NRPE v2.15**
 +
 +===== Additional plugins =====
 +Copy any additional plugins to ''/usr/local/nagios/libexec/'' such as ''check_linux_stats.pl''
 +
 +
 +===== File locations =====
 +Nagios Core, Nagios NRPE Deamon and Nagios Plugin Locations
 +
 +==== Compiled Version ====
 +=== Plugins (executables) ===
 +/usr/local/nagios/libexec/check_nrpe
 +
 +=== NRPE Deamon config file (settings) ===
 +/etc/xinetd.d/nrpe
 +
 +=== NRPE Config file (commands) ===
 +/usr/local/nagios/etc/nrpe.cfg
 +
 +==== Ubuntu ====
 +=== Core Nagios Monitoring config directory (settings) ===
 +/etc/nagios3/conf.d/
 +
 +=== Plugin Location (executables) ===
 +/usr/lib/nagios/plugins
 +
 +==== Redhat ====
 +=== NRPE Config file (commands) ===
 +/etc/nagios/nrpe.cfg
 +=== Plugin Location ===
 +/usr/lib64/nagios/plugins/
 +
 +
 +===== Related =====
 +Install ''Sys:Statistics:Linux'' via CPAN
 +
 +[[http://search.cpan.org/~bloonix/Sys-Statistics-Linux-0.66/lib/Sys/Statistics/Linux.pm|Sys:Statistics:Linux]]
 +
  

QR Code
QR Code tech:linux:install_nagios_plugin_nrpe_redhat (generated for current page)