The Nagios configuration sets the Apache2 server so that after installing nagiosNagios when apache2 is started, we need to check the monitoring information of nagios from the browser. Otherwise, if you want to directly view the nagios log file, people will go crazy. Then, how can we see the nagios information from the browser? In this case, you need to use the apache2 server, that is, access nagios data through a browser based on apache2.
1. All we need to do is configure apache, that is, modify the configuration file. The content to be modified has been generated during Nagios configuration compilation, and is the httpd. conf file under the sample-config directory. Add all the content of this file to the main configuration file of apache2!
2. When the authorized users of Nagios configuration view the monitoring information of nagios from the browser, we can impose some restrictions on different users. For example, some users can view only some information. First, use htpasswd to add authorized users (users who can log on to the nagios monitoring page from a browser ). For example, htpasswd-c/usr/local/nagios/etc/htpasswd. users nagiosadmin and then enter the password to log on to Nagios with the user name and password. After the Nagios configuration is started, all information is stored in the log file under the var directory. A tool is required to display all nagios information in the browser, it is CGI, which displays information on the webpage.
The restrictions on user permissions are exactly here! Next, in the main configuration file of cgi, there is a variable use_authentication. The default value is 1, that is, authentication is required. At the beginning, I suggest you change the value to 0 to save trouble. This configuration is really convenient. In this step, you can view the monitoring information of Nagios configuration. However, all users authorized by htpasswd can view all the information, which is not safe. We need to restrict different users.
Therefore, we recommend that you change use_authentication to 1, and then add users with various permissions to the following variables, such as login _
Hostsauthorized_for_all_service_commandsauthorized_for_all_host_commands ......
When use_authentication is 0, all values of these variables are invalid. The default value is all users.
- Implementation of the Nagios network management module in Linux
- Open-Source Monitoring Project Nagios derivative new project ICINGA is more community-oriented
- O & M monitoring Nagios serialization 3: deploying and configuring the Nagios Service
- O & M monitoring Nagios serialization 2: deploying an apache server
- O & M monitoring serialization: full solution to nagios, an open-source monitoring tool