The nature of monitoring
There are many kinds of servers: Web page server, game server, database server, application server, central log server and so on. These servers are the lifeblood of the company on the Internet, and ensuring the safe survival of these lifeblood is the basic responsibility of every OPS engineer. Nagios is a monitoring software, the main task is to monitor the real-time or historical situation of each server.
Server plainly is a high-level computer, its hardware equipment is nothing more than CPU, memory, disk capacity, network card, mouse keyboard display and other parts. And we need to monitor the hardware is nothing more than monitoring the above several.
CPU: Understand its percent usage, and understand the CPU's handling of all tasks by percent
Memory: Understand the amount of used and available memory to understand system memory overhead
Disk capacity: Knowledge of disk headroom to see if disk memory is sufficient
Network card: Network card throughput rate to understand the upstream and downstream situation, to avoid network congestion
It says the hardware section, and the software section below.
Take the Web server as an example, in general, a Web server installed within the important software is no different from the following: Apache, Tomcat, Nginx. This three-bit main monitoring object is "port survival and availability", and then infer that the HTTP service is normal. In fact, whether it is hardware data or software data on Linux have a corresponding command can be displayed, but due to the operation and maintenance personnel to be responsible for more servers, a one of the output command is more boring, and the Linux feedback is the figure rather than the more intuitive form of the image, and when the value reached the threshold, Monitoring software can take emergency measures and notify the responsible person by email or SMS, so it is necessary to introduce monitoring software.
How Nagios Works
In general, the network topology diagram within the enterprise should look like this.
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/7E/EB/wKiom1cMun_CZAqmAAGG_tpnOs0506.png "title=" 1.png " alt= "Wkiom1cmun_czaqmaagg_tpnos0506.png"/>
While Nagios may be installed on one of the "Application Servers" above, because these servers are in the same network segment, they can communicate with each other, so Nagios can collect hardware software data from other servers, and then we can log on to the Nagios server, Output this data as a Web page.
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/7E/ED/wKiom1cM4ZORzrnWAAEdWr-uC1Y855.png "title=" 1.png " alt= "Wkiom1cm4zorzrnwaaedwr-uc1y855.png"/>
Nagios's work is based on the above diagram, the monitoring host installed Nagios software, and Nagios through the Check_nrpe module with the SSL protocol to the target server Nrpe module communication, the target server Nrpe module received monitoring instructions, start check _disk and other external plug-ins to the target machine data collection, and then return the results of the acquisition to the Nrpe module, and then the Nrpe module presented to the monitoring host Nagios core, and Nagios this information through CGI parsing, in the form of Web pages on the screen for workers to watch.
This article is from "Life is waiting for Gordo" blog, please make sure to keep this source http://chenx1242.blog.51cto.com/10430133/1763067
How Nagios Works