Nagios installation configuration (includes Nrpe side) full (one)

Source: Internet
Author: User

One, Nagios installation:

1 , install the following command:

This is a few system commands that I use to define my own plugin when I monitor my service. Do not install.

(1)iostat: monitoring disk IO information:


Apt-getinstall Sysstat


(2)Ifstat: monitoring network information:


Apt-getinstall Ifstat


(3)gnuplot: Drawing:


Apt-getinstall gnuplot


2 , ensure that the following packages are installed:

    • Apache2

    • Php

    • Gcccompiler and development libraries

    • GD Development Libraries

assuming no installation, use Apt-get to install these packages, use the following command:

sudo apt-get install apache2sudo apt-get install libapache2-mod-php5sudo apt-get install build-essentialsudo apt-get install Libgd2-devOrsudo apt-get install Libgd2-xpm-dev3, create user information:BecomeRootUser. Create aNagiosUser and Set Password:/usr/sbin/useradd-m-s/bin/bash Nagiospasswd Nagios



To add a new nagcmd Group:

/usr/sbin/groupadd Nagcmd/usr/sbin/usermod-a-G nagcmd Nagios/usr/sbin/usermod-a-G nagcmd www-data4, downloadNagiosand its plugins:wget http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-3.2.3.tar.gz  http://www.nagios.org/download/plugins/     Download Nagios inPluginsThese two compressed packages are Zctech The file folder has been downloaded well.

5 , compiling and installing Nagios :

Installation path is /usr/local/

Cd/usr/local

nagios-3.2.3.tar.gz < Span style= "FONT-SIZE:14PX;" > Copy to /usr/local

tar xzf nagios-3.2.3.tar.gz CD nagios-3.2.3 ./configure--with-command-group=nagcmd  make all Make Install Make install-init Make install-config Make Install-commandmode

6 , define your own configuration:

The configuration file is installed in the /usr/local/nagios/etc folder .

The specific configuration is added to the service after the installation is complete.

7 , configure the Web interface

To install the Nagios web configuration file:

Make install-webconf

To create an account login Web interface, remember password:

Htpasswd-c/usr/local/nagios/etc/htpasswd.users Nagiosadmin



Restart Apache :

/etc/init.d/apache2 Reload

8 , compile and install nagiosplugins :

Installation path is /usr/local/

Cd/usr/local

  tar xzf nagios-plugins-2.0.3.tar.gz     CD nagios-plugins-2.0.3     make     make install     9      , start       Nagios     :    

Boot start:

Ln-s/etc/init.d/nagios/etc/rcs.d/s99nagios

To verify the configuration file:

/usr/local/nagios/bin/nagios-v/usr/local/nagios/etc/nagios.cfg

If there are no errors, start Nagios.

/etc/init.d/nagios StartTen, LoginWebInterface:Address bar Enter the following URL. You can log in. In this case, use the account set earlier, for example nagiosadmin and password.

http://localhost/nagios/ Successful login means Nagios successfully installed.

Nagios installation configuration (includes Nrpe side) full (one)

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.