The process of Nagios monitoring Server

Source: Internet
Author: User

The previous three articles said Nagios installation started internal file construction and so on, in short, so much is for this play----use Nagios to monitor the state of the server.


The combination of Nagios and Apache

First login Nagios is not a random landing, it must be a person with account password can login to the Nagios interface, because we are using Apache as a partner of Nagios, then we need to generate an account password under Apache.


In the Apache Bin folder,#./htpasswd-c/nagios installation path/etc/htpasswd.users nagiosadmin, after the carriage return let us output the password and re-confirm the password, If the password two times input the same and error-free, you will be prompted "Adding password for user nagiosadmin", the above command that the nagiosadmin is our login account. Because the default account in the main profile nagios.cfg is nagiosadmin, you can change it yourself, but add it to the main profile.


This is the time to go back to Nagios's etc folder and see the generated htpasswd.users.


Then go back to Apache and make a few changes to the Apache httpd.conf file.

First, find the user, the original daemon changed to Nagios,group is also the same.

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/7E/EF/wKiom1cNFrbwWnJ0AABhG9dxzwI984.png "title=" 1.png " alt= "Wkiom1cnfrbwwnj0aabhg9dxzwi984.png"/>


Second, add the following lines at the end of the entire httpd.conf article:


#settingScriptAlias  /nagios/cgi-bin  Nagios Installation path/sbin <Directory /usr/local/nagios/sbin >   AuthType Basic  Options ExecCGI                #通过execchi来解析AllowOverride  none  order allow, deny  allow from all  authname  "Nagios access"                                    #网页登陆时的提示   authuserfile /nagios Installation path /etc/htpasswd.named             # Files used for this directory access authentication   Require valid-user</Directory>Alias /nagios  "/nagios Installation path/share"         #当访问到/nagios is to visit/share this folder <Directory  Nagios installation path/share >  authtype basic  options none  allowoverride none order allow,deny allow  from all  authname  "nagios access"   authuserfile /nagios installation path/etc/ Htpasswd.named  require valid-user</directory>

After saving the httpd.conf, start the Apache service in the Apache Bin folder #./apachectl-k start and then #service nagios start Start the Nagios process. After two successful processes, open the browser, enter 127.0.0.1/nagios, the return will prompt you to output the account number and password, and this account password is what we just generated hkpasswd.userd content. Once you've entered your password, you'll see the main page of Nagios. That's it!


650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/7E/EC/wKioL1cNG8rAUFvhAAIZZ4AHE2I578.png "title=" Screenshot-1.png "alt=" Wkiol1cng8raufvhaaizz4ahe2i578.png "/>


Some possible issues (to be continued)


This article is from "Life is waiting for Gordo" blog, please make sure to keep this source http://chenx1242.blog.51cto.com/10430133/1763235

The process of Nagios monitoring Server

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.