Set up NagiosQL management and configure Nagios

Source: Internet
Author: User

NagiosQL is a web graphical management application designed for nagios. It operates databases and configuration files, including writing configuration file information to databases, modify the monitoring configuration of Nagios in the database and update the configuration stored in the database to the file. You can directly modify the configuration on the Web page provided by NagiosQL. The implementation architecture is simple and the functions are very practical.

Features of Nagiosql:

1. Basic configuration management capabilities of nagios, including the ability to import and export configuration files
2. The nagios configuration file check and troubleshooting capabilities
3. Nagiosql can customize the file structure, continue the previous configuration structure, and generate configuration by IP Address
4. Nagiosql backs up the configuration of each configuration change and stores it with a timestamp suffix. In theory, it can be rolled back to any historical configuration.

Environment:

Linux CentOS 6.0 2.6.32-71. el6.x86 _ 64 #1 SMP Fri May 20 03:51:51 BST 2011 x86_64 x86_64 x86_64 GNU/Linux

Software Version:

Nagiosql_311.tar.gz

Nagios-3.3.1.tar.gz

Nagios-plugins-1.4.15.tar.gz

Note: selinux is disabled by default.

I. LAMP Environment Construction

1. install the software package required by lamp

[Root @ centos6 ~] # Yum install make gcc-c ++ zlib-devel libaio-y

2. Install the lamp Environment

[Root @ centos6 ~] # Yum install-y httpd php-mysql-server php-snmp php-pdo perl-DBD-MYSQL

3. Start httpd and mysql

[Root @ centos6 ~] # Service httpd restart

[Root @ centos6 ~] # Service mysqld restart

4. Set apache, mysql, and php to start up

[Root @ centos6 ~] # Chkconfig -- add httpd

[Root @ centos6 ~] # Chkconfig httpd on

[Root @ centos6 ~] # Chkconfig -- list httpd

Httpd 0: off 1: off 2: on 3: on 4: on 5: on 6: off

[Root @ centos6 ~] # Chkconfig -- add mysqld

[Root @ centos6 ~] # Chkconfig mysqld on

[Root @ centos6 ~] # Chkconfig -- list mysqld

Mysqld 0: off 1: off 2: on 3: on 4: on 5: on 6: off

5. test whether the lamp environment is successfully installed (OK)

Ii. Nagios Construction

1. Environment Description

Nagiosql root location:/usr/local/nagiosql

Nagiosql configuration file location:/usr/local/nagiosql/etc

Nagiosql users and user groups: nagiosql | nagiosql

Apache startup users and groups: apache | apache

2. Install the dependency software package of nagios

[Root @ centos6 ~] # Yum install-y gcc glibc-common gd-devel

3. Create a nagios account

[Root @ centos6 ~] # Useradd nagios

[Root @ centos6 ~] # Passwd nagios

[Root @ centos6 ~] # Groupadd nagios

[Root @ centos6 ~] # Usermod-G nagios

4. Install nagios

[Root @ centos6 ~] # Tar-zxvf nagios-3.3.1.tar.gz

[Root @ centos6 nagios] #./configure -- prefix =/usr/local/nagios/-- with-nagios-user = nagios -- with-nagios-group = nagios

[Root @ centos6 nagios] # make all

[Root @ centos6 nagios] # make install

[Root @ centos6 nagios] # make install-init

[Root @ centos6 nagios] # make install-config

[Root @ centos6 nagios] # make install-commandmode

[Root @ centos6 nagios] # make install-webconf

5. Configure the web interface and create a user (and password) for logging on to the nagios web interface.

[Root @ centos6 nagios] # htpasswd-c/usr/local/nagios/etc/htpasswd. users nagiosadmin

New password:

Re-type new password:

Adding password for user nagiosadmin

Restart apache to make the settings take effect

[Root @ centos6 nagios] # service httpd restart

6. Compile and install the official nagios plugin

[Root @ centos6 ~] # Tar-zxvf nagios-plugins-1.4.15.tar.gz

[Root @ centos6 ~] # Cd./nagios-plugins-1.4.15

[Root @ centos6 nagios-plugins-1.4.15] #

./Configure -- prefix =/usr/local/nagios/-- with-nagios-user = nagios -- with-nagios-group = nagios

[Root @ centos6 nagios-plugins-1.4.15] # make & make install

Verify whether the plug-in is successfully installed (this directory contains a plug-in file)

[Root @ centos6 nagios-plugins-1.4.15] # ls/usr/local/nagios/libexec/

7. Start nagios and set startup

[Root @ centos6 nagios-plugins-1.4.15] # chkconfig -- add nagios

[Root @ centos6 nagios-plugins-1.4.15] # service nagios restart

8. Web Testing (logon successful)

  • 1
  • 2
  • 3
  • 4
  • 5
  • Next Page

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.