Nagios Configuration Guide (1)

Source: Internet
Author: User

Nagios is very good and powerful,Nagios ConfigurationThe process is also very simple.

 

Figure-Nagios

Configuration is the most complex part of nagios. It involves the configuration of multiple files. To facilitate the description, configure them one by one here.

1. apache configuration.

The configuration is completed in two steps. The first step is to modify the configuration file httpd. conf of apache. The file path here is/usr/local/apache/conf/httpd. conf. Change apache runtime user [1] and runtime group to nagios, and append the following line to the end of the file httpd. conf:

 
 
  1. # Setting for nagios
  2.  
  3. ScriptAlias/nagios/cgi-bin/usr/local/nagios/sbin
  4.  
  5. // Cgi File directory
  6.  
  7. AuthType Basic
  8.  
  9. Options ExecCGI
  10.  
  11. AllowOverride None
  12.  
  13. Order allow, deny
  14.  
  15. Allow from all
  16.  
  17. AuthName "Nagios Access"
  18.  
  19. AuthUserFile/usr/local/nagios/etc/htpasswd // verify the file path
  20.  
  21. Require valid-user
  22.  

 
 
  1. Alias/nagios/usr/local/nagios/share
  2.  
  3. // Nagios page file directory
  4.  
  5. AuthType Basic
  6.  
  7. Options None
  8.  
  9. AllowOverride None
  10.  
  11. Order allow, deny
  12.  
  13. Allow from all
  14.  
  15. AuthName "nagios Access"
  16.  
  17. AuthUserFile/usr/local/nagios/etc/htpasswd // verify the file path
  18.  
  19. Require valid-user
  20.  
 

The preceding text block is used to verify the user of the nagios directory. Only authorized users can access the page files of nagios. Step 2: generate the user authentication file: run the command/usr/local/apache/bin/htpasswd-c/usr/local/nagios/etc/htpasswd sery, the legitimate web access user sery is generated. for interactive command execution, you need to enter the password twice, then write a line in the file/usr/local/nagios/etc/htpasswd-the first field is the generated user name, and the second is the encrypted password, if you want to add more users, you do not need to select "-c" when executing the command htpasswd. Otherwise, all generated rows will be overwritten.

After the configuration is complete, run/usr/local/apache/bin/apachctl-t to check whether the apache configuration file has a syntax error, use/usr/local/apache/bin/apachctl start & to start apache, and enter the nagios access address (for example, [url] http: // ip/nagios [/url]). If it is normal, the login verification window appears waiting for user input:

Enter the user name and password created with htpasswd to test the configuration.


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.