How to configure Nagios Remote Plugin Executor (NRPE) in Linux)

Source: Internet
Author: User
Tags linux mint

How to configure Nagios Remote Plugin Executor (NRPE) in Linux)

Nagios is one of the most powerful tools for network management. Nagios can monitor the accessibility of remote hosts and the status of running services. But what if we want to monitor anything other than the network service in the remote host? For example, we may want to monitor the disk utilization or CPU processor load on the remote host. Nagios Remote Plugin Executor (NRPE) is a tool that can help you complete these operations. NRPE allows you to execute the Nagios plugin installed on a remote host and integrate it into an existing Nagios server.

How to Use the Nagios remote execution plug-in (NRPE) to detect server memory usage

Network Monitor Nagios Overview

Nagios construction and Configuration

Build a Nagios monitoring platform in the Nginx Environment

Configure the basic Nagios System on RHEL5.3 (using Nagios-3.1.2)

CentOS 5.5 + Nginx + Nagios monitoring and control terminal installation and Configuration Guide

Install Nagios Core for Ubuntu 13.10 Server

This tutorial describes how to configure NRPE in a deployed Nagios instance. This tutorial consists of two parts:

  • Configure the remote host.
  • Configure the Nagios monitoring server.

Then, we will end this tutorial by defining some custom commands that can be used by NRPE.

Step 1: Install the NRPE Service

You need to install the NRPE service on each remote host that you want to use NRPE monitoring. The NRPE service daemon on each remote host will communicate with a Nagios monitoring server.

The software packages required by the NRPE service can be easily installed using apt-get or yum, depending on the platform. For CentOS, because NRPE is not in the CentOS repository, we need to add a Repoforge repository.

For Debian, Ubuntu, or Linux Mint:

  1. # Apt-get install nagios-nrpe-server

For CentOS, Fedora, or RHEL:

  1. # Yum install nagios-nrpe
Step 2: Prepare the configuration file

The configuration file/etc/nagios/nrpe. cfg is similar in Debian or RedHat-based systems. Let's back up and modify the configuration file:

  1. # Vim/etc/nagios/nrpe. cfg
  1. # The NRPE service port can be customized ##
  2. Server_port = 5666
  3.  
  4. # Allow access from Nagios monitoring server ##
  5. # Note: There is no space after the comma ##
  6. Allowed_hosts = 127.0.0.1, X.X.X.X-IP _ v4_of_Nagios_server
  7.  
  8. # In the following example, the parameters are hardcoded.
  9. # These parameters can be modified as needed.
  10.  
  11. # Note: For CentOS 64-bit users, use/usr/lib64 instead of/usr/lib ##
  12.  
  13. Command [check_users] =/usr/lib/nagios/plugins/check_users-w 5-c 10
  14. Command [check_load] =/usr/lib/nagios/plugins/check_load-w 15,10, 5-c 30,25, 20
  15. Command [check_hda1] =/usr/lib/nagios/plugins/check_disk-w 20%-c 10%-p/dev/hda1
  16. Command [check_zombie_procs] =/usr/lib/nagios/plugins/check_procs-w 5-c 10-s Z
  17. Command [check_total_procs] =/usr/lib/nagios/plugins/check_procs-w 150-c 200

Now that the configuration file is ready, the NRPE service can be started.

Step 3: Initialize the NRPE Service

For RedHat-based systems, the NRPE service needs to be added as a startup service.

For Debian, Ubuntu, and Linux Mint:

  1. # Service nagios-nrpe-server restart

For CentOS, Fedora, or RHEL:

  1. # Service nrpe restart
  2. # Chkconfig nrpe on
Step 4: Verify the NRPE service status

The status information of the NRPE daemon can be found in the system log. For Debian-based systems, log files are stored in/var/log/syslog, while for RedHat-based systems, the log files are/var/log/messages. A sample log is provided below for your reference:

  1. Nrpe [19723]: Starting up daemon
  2. Nrpe [19723]: Listeningfor connections on port 5666
  3. Nrpe [19723]: Allowing connections from: 127.0.0.1, X. X

If a firewall is used, TCP port 5666 used by the NRPE daemon should be enabled.

  1. # Netstat-tpln | grep 5666
  1. Tcp 000.0.0.0: 56660.0.0.0: * LISTEN 19885/nrpe

For more details, please continue to read the highlights on the next page:

  • 1
  • 2
  • 3
  • Next Page

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.