Install Nagios monitoring software

Source: Internet
Author: User
Tip 2. install/soft/monitoring/nagios/bin/./install. sh3. check the configuration

I. software installation
Ll
-Rwxrwxr-x 1 root 9097591 2009-12-31 nagios-20091231.tar.bz2
 
1. decompress the software package
Tar jxvf nagios-20091231.tar.bz2
2. Installation
/Soft/monitoring/nagios/bin/
./Install. sh
3.
Check the configuration file
Rpm-ql nagios
/Etc/httpd/conf. d/nagios. conf
/Etc/logrotate. d/nagios
/Etc/nagios
/Etc/nagios/cgi. cfg
/Etc/nagios/commands. cfg
/Etc/nagios/localhost. cfg
/Etc/nagios. cfg
/Etc/nagios/private
/Etc/nagios/private/resource. cfg
/Etc/rc. d/init. d/nagios
/Usr/bin/nagiostats
4. add a startup item
Chkconfig -- add nagios
Chkconfig nagios on
5. check whether the configuration file is correct
Root @ monitor nagios] # nagios-v nagios. cfg
6. start the service
/Etc/init. d/nagios start
7. View service processes
Ps axw | grep nagios
24782? Ssl 0: 00/usr/sbin/nagios-d/etc/nagios. cfg
24800 pts/1 R + grep nagios
8. configure access control
[Root @ monitor nagios] # cd/etc/httpd/conf. d/
[Root @ monitor conf. d] # ls
Cacti. conf nagios. conf php. conf python. conf squid. conf webalizer. conf
Manual. conf perl. conf proxy_ajp.conf README ssl. conf welcome. conf
Vi nagios. conf
1 ScriptAlias/nagios/cgi-bin // usr/lib/nagios/cgi-bin/
2
3 Options ExecCGI
4 order deny, allow
5 deny from all
6 allow from 127.0.0.1
7 allow from 10.24.29.0 # set to allow access from other network segments
8 AuthType Basic
9 AuthUserFile/etc/nagios/passwd
10 AuthName "nagios"
11 require valid-user
12
13
14 Alias/nagios // usr/share/nagios/html/
15
16 Options None
17 order deny, allow
18 deny from all
19 allow from 127.0.0.1
20 allow from 10.24.29.0 # set to allow access from other network segments
21 AuthType Basic
22 AuthType Basic
23 AuthUserFile/etc/nagios/passwd # access password storage location
9. create a password for logging on to nagios
[Root @ monitor conf. d] # cd/etc/nagios/
[Root @ monitor nagios] # ls
Cgi. cfg commands. cfg localhost. cfg nagios. cfg private
10. add logon user password
[Root @ monitor nagios] # htpasswd-bmc passwd michael
Adding password for user Michael
11. verify user and password generation
[Root @ monitor nagios] # ls
Cgi. cfg commands. cfg localhost. cfg nagios. cfg passwd private
[Root @ monitor nagios] # pwd
/Etc/nagios
Root @ monitor nagios] # cat passwd
Michael: $ apr1 $ NOb5F... $/Hlz07.veQcIM/ucJdkX50
12. restart the WEB service
Root @ monitor nagios] #/etc/init. d/httpd restart
13. page access test

 
14. modify WEB access management permissions

[Root @ monitor nagios] # pwd
/Etc/nagios
[Root @ monitor nagios] # ls
Cgi. cfg commands. cfg localhost. cfg nagios. cfg passwd private
[Root @ monitor nagios] # sed-I's/^ # \ (authorized_for. * \) =. * $/\ 1 = michael/g'cgi. cfg # Sort script modifications to files
Authorize the access management of Michal
[Root @ monitor nagios] # grep authorized cgi. cfg
Verify
Authorized_for_system_information = michael
Authorized_for_configuration_information = michael
Authorized_for_system_commands = michael
Authorized_for_all_services = michael
Authorized_for_all_hosts = michael
Authorized_for_all_service_commands = michael
Authorized_for_all_host_commands = Michael
15. login verification
 
 
 

Login successful! Monitoring Device addition and configuration file modification to be continued ...............
Author: "Kang Jianhua"

Related Article

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.