Install Nagios Client on Enterprise Linux

From Bonus Bits
Jump to: navigation, search

Purpose

This article gives the steps to install Nagios Remote Plug-ins Execution daemon (NRPE or Nagios Client) on CentOS 6.x using RPMForge repository.


Prerequisites

Install RPMForge Repository on Enterprise Linux
Setup Yum Priorities on Enterprise Linux


Install NRPE & Plugins

yum install nagios-nrpe nagios-plugins


Icon-Tip-Square-Green.png To install from a specific repository. One way is to temp disable the repository/s that you don't want to download from.

yum install nagios-nrpe nagios-plugins --disablerepo epel


Gnome-sticky-notes-applet nagios-common setups the user account and common directories.


Configuration Client

  • Edit /etc/nagios/nrpe.cfg
    vim /etc/nagios/nrpe.cfg
    
  • Add Nagios server/s to allow list
    allowed_hosts=127.0.0.1,192.168.1.100

Enable Argument Based Checks (Optional)

  1. Enable Allow Arguments
    dont_blame_nrpe=1
  2. Comment Static Checks
    #command[check_users]=/usr/lib64/nagios/plugins/check_users -w 5 -c 10
    #command[check_load]=/usr/lib64/nagios/plugins/check_load -w 15,10,5 -c 30,25,20
    #command[check_hda1]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /dev/hda1
    #command[check_zombie_procs]=/usr/lib64/nagios/plugins/check_procs -w 5 -c 10 -s Z
    #command[check_total_procs]=/usr/lib64/nagios/plugins/check_procs -w 150 -c 200
  3. Uncomment Argument Checks
    command[check_users]=/usr/lib64/nagios/plugins/check_users -w $ARG1$ -c $ARG2$
    command[check_load]=/usr/lib64/nagios/plugins/check_load -w $ARG1$ -c $ARG2$
    command[check_disk]=/usr/lib64/nagios/plugins/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$
    command[check_procs]=/usr/lib64/nagios/plugins/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$
  4. Add Service/Daemon Check (Optional)
    command[check_service]=/usr/lib64/nagios/plugins/check_procs -w :50 -c 1: -C $ARG1$


Configure Firewall if Needed

Configure iptables to Allow Access to Common Services on Linux

Nagios NRPE Client
TCP Port 5666


Start Service

service nrpe start


Set Service to Start at Boot

chkconfig nrpe on


Related Articles