Installing NRPE on XenServer

I like to have as little run in dom0 as possible. However some things you really need checked from dom0, like the status of your raid perhaps. Just some quick instructions on getting Nagios NRPE running in XenServer.

  1. Install EPEL repository and disable it by default (remember we don’t want to accidentally install unnecessary packages)
    wget$(uname -i)/epel-release-5-3.noarch.rpm
    rpm -hiv epel-release*.rpm
    sed -i 's/enabled=1/enabled=0/g' /etc/yum.repos.d/epel.repo
  2. Install nrpe and configure it to start on boot
    yum install --enablerepo=epel nrpe
    chkconfig nrpe on
  3. Modify the firewall to allow NRPE connections. Add the following before the REJECT line in /etc/sysconfig/iptables
    -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 5666 -j ACCEPT
  4. Restart your firewall and start nrpe
    restart your firewall , and start nrpe
    /etc/init.d/iptables restart && /etc/init.d/nrpe start
  5. Configure nrpe like normal and have fun


  • Hi,
    I’ve installed with no problem, but I can’t see any plugins that nrpe can execute.
    I’ve installed nagios-plugins package but seems to be none there.

    Where can I get check_disk, check_load, etc.


  • Look in /usr/lib64/nagios/plugins or /usr/lib/nagios/plugins

  • I don’t have lib64 and in lib is:

    # cd /usr/lib/nagios/plugins/
    # ls -l
    total 88
    -rwxr-xr-x 1 root root 43096 Oct 7 12:11 negate
    -rwxr-xr-x 1 root root 40376 Oct 7 12:11 urlize
    -rwxr-xr-x 1 root root 862 Oct 7 12:11

    I’m using XenServer 5.6:
    # cat /etc/redhat-release
    XenServer release 5.6.100-39215p (xenenterprise)

    And instead of using epel-release-5-3.noarch.rpm I have to use epel-release-5-4.noarch.rpm

  • If I copy a plugin from other server (that doesn’t have lib64 neither) I receive this error:

    # /opt/nagios/check_disk -w 10% -c5%-p /dev/sda1
    /opt/nagios/check_disk: /lib/ version `GLIBC_2.8′ not found (required by /opt/nagios/check_disk)

  • Try installing nagios-plugins-all then look in /usr/lib/nagios/plugins.

    Also be sure you are checking what you think you are checking. What kind of storage is backing your vms? The default LVM storage locally wont be reporting what you might expect with check_disk

  • Thank you very much! I’ve installed:

    yum install –enablerepo=epel nagios-plugins-load.i386
    yum install –enablerepo=epel nagios-plugins-procs.i386
    yum install –enablerepo=epel nagios-plugins-disk.i386

    And now everything works.

  • Glad you were able to get what you want installed. I am very curious what you are measuring with the load, proc, and disk checks on a Xenserver domO. Do you care to share?

  • Gus, you might find this helpful. its a nagios plugin to check on the license expiration for XenServer.

  • I’m just checking the standard things: load, disk and procs. I’ve this on all my linux boxes (not Xens). It has help me a few times, mainly the disk check.

    Thanks for the License plugin. I’ll install it as well.

  • Ok well just be careful of the meaning of the metrics your pulling. The stats you see on a dom0 are not what you would expect of a typical server. You wont see domU (guest) activity reported back up through dom0. You would need to use some xenapi stuff to get much meaningful information.

  • Flyte Windows other version Google Chrome 18.0.1025.168 wrote:

    Thanks for the tutorial!

    Just one thing – the first line needs updating to:
    wget$(uname -i)/epel-release-5-4.noarch.rpm
    as the URL has been discontinued and the package is updated to 5.4.

    Otherwise it’s all gravy 🙂

  • Flyte Windows other version Google Chrome 18.0.1025.168 wrote:

    Also, here’s the line to install the most basic plugins, as nagios-plugins-all has some dependency errors:
    yum install –enablerepo=epel nagios-plugins-disk nagios-plugins-load nagios-plugins-procs

  • Flyte Windows other version Google Chrome 18.0.1025.168 wrote:

    Last comment..

    On XenServer 6.0.2 there’s a permissions bug which sets the ‘/.’ directory to 700. This causes the nrpe user to be unable to check /etc/hosts.allow and /etc/hosts.deny and refuses connections. This shows up in the logs:
    warning: cannot open /etc/hosts.allow: Permission denied
    warning: cannot open /etc/hosts.deny: Permission denied

    And nagios complains that it “Could not complete SSL handshake.”

    To fix this, run this command from any directory as root on the XenServer:
    chmod 755 /.

    Hope that helps.

Leave a Reply

Your email is never shared.Required fields are marked *

To submit your comment, click the image below where it asks you to...
Clickcha - The One-Click Captcha