Adding NRPE To servers

Client NRPE Install

  • Download nrpe and nagios-plugin.
    Tarball names will vary depending on the release number of the packages
  • wget
  • wget
  • tar -xf nrpe-2.15.tar.gz
  • tar -xf nagios-plugins-1.5.tar.gz

Nagios Plugin Installation

  • cd nagios-plugins-1.5
  • ./configure
  • make
  • make install
  • chown nagios.nagios /usr/local/nagios
  • chown -R nagios.nagios /usr/local/nagios/libexec

NRPE Installation

  • cd ..
  • cd nrpe-2.15
  • ./configure
  • make all
  • make install-plugin
  • make install-daemon
  • make install-daemon-config
  • make install-xinetd
  • edit /etc/xinetd.d/nrpe
    add the name of the Nagios server to the line
    only_from =
  • edit /etc/services
    add the line
    nrpe 5666/tcp
  • Restart xinetd daemon with
    service xinetd restart


  • Test nrpe with
    netstat -at | grep nrpe
  • Edit TCP wrappers
    vi /etc/hosts.allow
    Add the line
    where is your Nagios server DNS name

Test New client

  • /usr/local/nagios/libexec/check_nrpe -H localhost

If you get back the NRPE version number, you are done on the client


  • iptables -I RH-Firewall-1-INPUT -p tcp -m tcp –dport 5666 -j ACCEPT
    lets all packets with a destination of port 5666 past the firewall

Published on: Aug 26, 2020

Categories: Linux Server's