Nagios is an open-source system and network monitoring application that can monitor your specified host and service. When a problem occurs, you are reminded to help you improve the system. Nagios initially runs in Linux, but it runs in most other Unix. Nagios features include: monitoring of network services (SMTP, POP3, HTTP, NNTP, PING, etc.) Monitoring hosts
Nagios is an open-source system and network monitoring application that can monitor your specified host and service. When a problem occurs, you are reminded to help you improve the system. Nagios initially runs in Linux, but it runs in most other Unix. Nagios features include: monitoring of network services (SMTP, POP3, HTTP, NNTP, PING, etc.) Monitoring hosts
Nagios is an open-source system and network monitoring application that can monitor your specified host and service. When a problem occurs, you are reminded to help you improve the system. Nagios initially runs in Linux, but it runs in most other Unix.
Nagios features include:
- Monitoring Network Services (SMTP, POP3, HTTP, NNTP, PING, etc)
- Monitor host resources (processor load, disk usage, etc)
- Simple plug-in design allows you to easily develop your own service inspection
- Parallel service check
- Define the network host hierarchy using the "parent" host to detect and differentiate hosts
- When a service or host problem occurs, it notifies you (via email, pager or user-defined method)
- Define the event handler capability to proactively solve problems during service or host running
- Log Files
- Support for redundant host monitoring
- Optional Web interface to view the current network status, notification and problem history, log files, and so on.
Before installation, you 'd better have installed the lamp server software. In addition, you need to install some dependency packages and use the following command:
Sudo apt-get install wget build-essential php5-gd wget libgd2-xpm libgd2-xpm-dev libapache2-mod-php5 apache2-utils daemon
Download Nagios and plug-ins:
wget http://nagios-plugins.org/download/nagios-plugins-2.0.3.tar.gz
wget http://nchc.dl.sourceforge.net/project/nagios-cn/sourcecode/zh_CN%203.2.3/nagios-cn-3.2.3.tar.bz2
wget http://nchc.dl.sourceforge.net/project/nagios/nagios-3.x/nagios-3.2.3/nagios-3.2.3.tar.gz
Add Nagios users and groups
Adduser nagios
/Usr/sbin/groupadd nagcmd
/Usr/sbin/usermod-G nagcmd nagios
/Usr/sbin/usermod-G nagcmd www-data
Install nagios now
Try to log on as root and run the following command
Decompress the downloaded file (Nagios kernel and plug-in)
1. Nagios kernel installation:
Tar zxvf nagios-3.2.3.tar.gz
Tar zxvf nagios-plugins-2.0.3.tar.gz
Cd nagios-3.2.3/
Apt-get install sendmail
./Configure -- with-nagios-group = nagios -- with-command-group = nagcmd -- with-mail =/usr/sbin/sendmail
Make all
Make install
Make install-init
Make install-commandmode
Make install-config
Make install-webconf
Cp-R contrib/eventhandlers // usr/local/nagios/libexec/
Chown-R nagios: nagios/usr/local/nagios/libexec/eventhandlers
/Usr/local/nagios/bin/nagios-v/usr/local/nagios/etc/nagios. cfg
/Etc/init. d/nagios start
2. Plug-in Installation
Cd ..
Cd nagios-plugins-2.0.3/
./Configure -- with-nagios-user = nagios -- with-nagios-group = nagios
Make
Make install
Ln-s/etc/init. d/nagios/etc/rcS. d/S99nagios
Apt-get install libxml2
Apt-get install libxml2-dev
Sudo apt-get install apache2 php5-mysql libapache2-mod-php5 mysql-server
Sudo touch/var/www/test. php
Vim/var/www/test. php
Sudo apt-get install php5-gd php5-curl php5-xdebug
Sudo/etc/init. d/nagios restart
3. Install the Chinese plug-in
Cd ..
Tar xvf nagios-cn-3.2.3.tar.bz2
Cd nagios-cn-3.2.3/
./Configure -- with-nagios-user = nagios -- with-nagios-group = nagios
Make all
Make
Make install
Make install-init
Make install-commandmode
Make install-config
Htpasswd-c/usr/local/nagios/etc/htpasswd. users nagiosadmin
Sudo/etc/init. d/nagios restart
Access nagios address: http: // localhost/nagios