Nagios Monitoring of Linux system Resource Usage-Nagios Introduction

Source: Internet
Author: User

Scenario: Both the test environment and the runtime environment require a real-time monitoring program to monitor the health of the system (Linux Redhat), and the monitoring requirements are focused on: Cpu,memory,disk io,network usage.

The basic idea of Nagios is that Nagios server gets information about the monitored node (monitored server), which is presented to administrators through CGI (Web GUI) or mail.

I have previously introduced how to Monitor system resource usage through Jmeter+jmeter-plugins, and with Nagios we gave up the use of JMeter because Nagios was used more fully.

Take a look at the method of monitoring unlx/linux provided in Nagios addons (excerpt from http://nagios.sourceforge.net/docs/3_0/addons.html)


The acquisition of information is mainly divided into active take, passive get, in which the active points directly to be monitored node or intermediate database node fetch.

If it is all monitored node directly to fetch, more than one machine, Nagios system CPU may not be able to carry, so our system in the test environment using the passive acquisition of NSCA, may later go to the ndoutils mode, through the database to achieve monitoring and monitoring end of the separation.


The data displayed in Nagios is not very friendly, but it has a very good plug-in Pnp4nagios,pnp4nagios can be used to display data graphically well, Pnp4nagios there are several modes, the current is more popular is BULK+NPCD mode, Synchronized mode is available with data on the drawing (the synchronous mode will work very good up to about1.000 services in a 5 minute IntervaL) , the bulk mode is a centralized point-in-time drawing (lines were processed in 0.06 seconds. This is the data volume of about und processing using a, second interval. It means we blocked Nagios for exactly 0.06 seconds.). BULK+NPCD uses a separate NPCD process to process data drawings without affecting Nagios's normal functionality.


The final mode of the monitoring system:Nagios + NSCA + pnp4nagios (BULK&NPCD).

NSCA is responsible for collecting data, and Nagios writes the collected data to the spool file in the format required by Pnp4nagios, moving the file to the spool folder NPCD processing every 15 minutes, NPCD call Process_ Perfdata.pl handles the files in the spool folder, and finally saves it to RRD, and can view the graphical monitoring data by adding the Pnp4nagios Web Access URL to the Nagios monitoring page.

S



Now, let's talk about our Nagios installation,

Nagios Server

One Liunx server (CentOS), install the corresponding version of the following installation package

1. Basic Nagios and Web GUI installation package

httpd-*.tar.gz,php-*.tar.gz, nagios-*.tar.gz, nagios-plugins-*.tar.gz

Installation steps

2. Graphical performance data installation package

Pnp4nagios-*.tar.gz

Installation steps

3. Linux System Monitoring Plugin

Active mode: nrpe-*.tar.gz, passive mode: nsca-*.tar.gz
NSCA Installation Steps

NOTE:INETD or xinetd not used in our system


Nagios Monitored clients

For the NSCA mode, we used the Python script +cron Job (crontab) to periodically send data to Nagios Server in a format, so it was only possible to install Python on the monitored device.


Article Two: Nagios server-side configuration

Article three: Nagios monitored client Configuration and scripting implementation

Nagios Monitoring of Linux system Resource Usage-Nagios Introduction

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.