Nagios Two-time development (IV)---nagios monitoring principle and Nagios architecture Introduction

Source: Internet
Author: User
Tags snmp

Nagios Monitoring Principle

The following is a brief description of Nagios's monitoring principle based on the schematic diagram from the network above:

The 1.nagios is passively monitored by the NSCA. So what is passive monitoring? Passive monitoring: means that the server being monitored actively uploads data to the Nagios monitoring system. This monitoring method improves real-time (in the event of a problem, the monitored server can upload data in a timely manner to notify Nagios, so that the administrator can deal with it as soon as possible, instead of having to wait for the next monitoring cycle to be notified of the status of the monitored server, as in active monitoring). NSCA is a program that can implement Nagios passive monitoring. Currently known, the Linux/unix server can only be passively monitored by the NSCA plugin. There are no plugins available for Windows Server for the time being.

2.nagios is actively monitored via the Nrpe plug-in and SNMP protocol. As for what is active monitoring can refer to the above mentioned. The simple solution is that nagios proactively obtains data from the remote host in accordance with the detection cycle. So real-time is going to be a little worse. Nagios monitors the Linux/unix server through the Nrpe plug-in and SNMP protocols, while monitoring Windows servers, switches, printers, and more through the SNMP protocol. In addition, Nagios can also monitor windows with the nsclient++ client, as to what benefits it has not tested yet.

3.nagios currently relies entirely on the display and configuration of monitoring data for configuration file read/write. Of course the written operation Nagios is not provided, this needs to be manually configured through scripting. However, the presence of the Ndomod module solves the problem that Nagios cannot write data to the database. The plug-in that provides the Ndomod module is ndoutils, andthe Ndomod module needs to be loaded into Nagios's configuration, The Ndoutils plugin analyzes Nagios's configuration files (. cfg) and Status.dat by running the nod2db process and writes the results of the analysis to the MySQL database, but for the time being, the data is equivalent to a backup of a recycle Bin and is not actually used by everyone. But this data is critical for two development.

Nagios Architecture

The following is a brief description of the Nagios architecture:

1. The Nagios Deamon process reads the NAGIOS.CFG configuration file, and the nagios.cfg configuration file holds a list of configuration file storage paths. Specific as.

2. The Nagios Deamon process operates through the information referenced in the NAGIOS.CFG configuration file and performs plugin communication with the agent at the monitored end to obtain monitoring results and data on the server side.

The 3.nagios Deamon process writes the monitoring results to the Status.dat file, and the Status.dat file is equivalent to a log or a db.
The 4.CGI program analyzes the monitoring results in the Status.dat file and merges them with the data in the. CFG configuration, which is eventually displayed in the CGI processing results.

Now let's briefly introduce the following Nagios CGI:

1.CGI is written in C and is a separate program from Nagios, which is not affected by Nagios.

2. For older users of dynamic language, CGI is undoubtedly a good helper, it can dynamically display the information on the Web page, real-time high. And its strongest point is that you can read some of the server's underlying interfaces through C, which is not available in other languages.

3. Some domestic information has been browsed. At present, the domestic use of CGI has been very few, I do not know how to use abroad.

4. It's easy to modify CGI. Can be based on the original CGI on the basis of some custom interface display, of course, I am only a very elementary level. Friends who wish to communicate with CGI we can communicate privately.

These are some superficial understandings of the structure of Nagios. Because the author is not fine, there are omissions, please advise, we progress together.

Please mention the source when the friends reprint, because I am in order to better facilitate everyone to discuss with me. Thank you, sir.

Comments and suggestions: [email protected]

Nagios Two-time development (IV)---nagios monitoring principle and Nagios architecture 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.