In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "how to install and configure nagios in Centos7". In daily operation, I believe many people have doubts about how to install and configure nagios in Centos7. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the doubts about "how to install and configure nagios in Centos7". Next, please follow the editor to study!
Preface (required knowledge)
I. installation planning
1.1 system environment
1.2 required software packages
2. Configure the installation environment
2.1 synchronization time
2.2 disable SElinux
2.3 xftp upload software package
2.4 install the mail service
Third, monitor the installation of the host
3.1Runtime environment for installing nagios
3.2 increase users
3. 3 install nagios
3.4 configure permissions
3.5 install the plug-in
3.6 install nrpe
IV. Remote host installation
4.1 configure the operating environment
4.2 install nagios-plugin
4.3 install nrpe
4.4 start nrpe
Fifth, the monitoring host installs PNP
5.1 configure the development environment
5.2 install pnp4nagios
5.3 configure pnp4nagios
VI. Chart display
Preface (required knowledge)
Nagios is an open source computer system and network monitoring tool, which can effectively monitor the host status of Windows, Linux and Unix, network settings such as switches and routers, printers and so on. When the system or service status is abnormal, send an email or SMS alarm to notify the website operation and maintenance personnel as soon as possible, and send out a normal email or SMS notification after the status is restored.
Main function
(1) Network service monitoring (SMTP, POP3, HTTP, NNTP, ICMP, SNMP, FTP, SSH)
(2) Host resource monitoring (CPU load, disk usage, system logs), including Windows hosts (using NSClient++ plugin)
(3) you can specify your own Plugin to collect data through the network to monitor any situation (temperature, warning …... )
(4) script can be executed remotely by configuring Nagios remote execution plug-in
(5) remote monitoring supports SSH or SSL plus channel monitoring.
(6) simple plugin design allows users to easily develop the inspection services they need, supporting many development languages (shell scripts, C++, Perl, ruby, Python, PHP, C #, etc.)
(7) contains a lot of graphical data Plugins (Nagiosgraph, Nagiosgrapher, PNP4Nagios, etc.)
(8) parallel service check
(9) be able to define the hierarchy of network hosts and allow step-by-step checking, that is, downward checks starting from the parent host.
(10) when there is a problem with the service or host, it can be notified through email, pager, sms or any user-defined plugin
(11) the service or host that has a problem can be reactivated by a custom event handling mechanism.
(12) automatic log cycle
(13) redundant monitoring is supported
(14) including Web interface to view current network status, notifications, problem history, log files, etc.
How Nagios works
The function of Nagios is to monitor the service and host, but it does not include this part of the function. All the monitoring and detection functions are completed through various plug-ins.
After starting Nagios, it will periodically automatically call plug-ins to detect the status of the server. At the same time, Nagios will maintain a queue, and the status information returned by all plug-ins will enter the queue. Nagios will read the information from the head of the queue every time, and after processing, the status result will be displayed through web.
Nagios provides many plug-ins, which can be used to easily monitor the status of many services. After the installation is completed, all the plug-ins that can be used by nagios are placed in the / libexec under the nagios home directory, for example, check_disk is a plug-in to check disk space, check_load is to check CPU load, and so on. Each plug-in can view its usage and functionality by running. / check_xxx-h.
In addition, the alarm function is meaningless if the monitoring system finds that the problem can not be reported to the police, so the alarm is also one of the very important functions of nagios. But, similarly, Nagios itself does not have the alarm part of the code, or even plug-ins, but to the user or other relevant open source project team to complete.
Nagios installation refers to the basic platform, that is, the installation of Nagios software packages. It is not only the framework of the monitoring system, but also the basis of all monitoring.
When you open the official documentation of Nagios, you will find that Nagios basically does not have any dependency packages, but only requires that the system is a system supported by Linux or other Nagios. However, if you do not install apache (http service), then you do not have such an intuitive interface to view monitoring information, so apache is a prerequisite for now. About the installation of apache, there are many on the Internet, just install it. Check to see if it works properly after installation.
Now that you know how Nagios manages server objects through plug-ins, let's look at how it manages remote server objects. The Nagios system provides a plug-in NRPE. Nagios runs it periodically to get all kinds of status information of the remote server. The relationship between them is shown in the following figure:
Nagios manages services remotely through NRPE
1. Nagios executes the check_nrpe plug-in installed in it and tells check_nrpe which services to detect.
two。 Connect the NRPE daemon on the remote computer through SSL,check_nrpe
3. NRPE runs various local plug-ins to detect local services and status (check_disk,..etc)
4. Finally, NRPE sends the test results to the check_nrpe,check_nrpe on the host side and sends the results to the Nagios status queue.
5. Nagios reads the information in the queue in turn, and then displays the results.
At this point, the study on "how to install and configure nagios for Centos7" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.