Nagios is an open-source free network monitoring tool that can effectively monitor the status of windows, Linux and UNIX hosts, network settings such as vswitches and routers, and printers. When the system or service status is abnormal, an email or text message alert will be sent immediately to the website O & M personnel. After the status is restored, a normal email or text message notification will be sent, at the same time, an optional browser-based Web interface is provided to facilitate system administrators to view the network status, various system problems, and logs.
On the cloud platform, we can also monitor the status of virtual machines through Nagios.
The following describes how to install Nagios in the project.
1. Check whether Web server, GCC, AND Gd are installed in the centos system. If not, install them:
#Apache yum -y install httpd #GCC compiler yum -y install gcc yum -y install glibc glibc-common #GD development libraries yum -y install gd gd-devel
2. Create a Nagios user and set its password
useradd nagios passwd nagios
3. Create a user group and add Nagios user and Apache user to the user group.
groupadd nagcmd usermod -a -G nagcmd nagios usermod -a -G nagcmd apache
4. download the latest Nagios software package and Nagios plug-in
wget http://osdn.dl.sourceforge.net/sourceforge/nagios/nagios-3.4.2.tar.gz wget http://osdn.dl.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.11.tar.gz
5. Compile and install Nagios
tar xzf nagios-3.4.2.tar.gz cd nagios ./configure --with-command-group=nagcmd make all make install make install-init make install-config make install-commandmode
6. Configure the web interface
Make install-webconf # Add the nagiosadmin admin user htpasswd-C/usr/local/Nagios/etc/htpasswd. Users nagiosadmin # restart the Apache server to make the configuration take effect. Service httpd restart
7. Install the Nagios plugin
tar xzf nagios-plugins-1.4.11.tar.gz cd nagios-plugins-1.4.11 ./configure --with-nagios-user=nagios --with-nagios group=nagios make make install
8. Add the Nagios service to the service list and set auto-start upon startup.
chkconfig --add nagios chkconfig nagios on
9. Check whether configuration errors exist on the Nagios server.
/Usr/local/Nagios/bin/Nagios-V/usr/local/Nagios/etc/Nagios. CFG ===================================================== ============== total Warnings: 0 total errors: 0 =================================================== ============## enable the Nagios Server Service Nagios start if there is no error message!
10. Enter http: // serverip/Nagios/in IE to open the web page normally, indicating that Nagios is successfully installed.
In Nagios, the default Management User is nagiosadmin. In the Nagios configuration file, we can see that the default configuration files are all nagiosadmin users. After normal logon, the performance of the local server can be seen. Other servers need to be manually configured, or you can perform Web configuration according to nagiosql. As for how to install nagiosql, it is really easy. I will introduce it later.