Nagios One-click installation script

Source: Internet
Author: User

Nagios has a very powerful alarm function. You can also draw graphics when combined with PNP implementations. can be defined according to your needs: Nagios's foot type, can be said to monitor services, Nagios has done everything: The following gives Nagios installation steps. The latter will slowly update how to write footsteps define the Enterprise Nagios monitoring system: The Footstep installation package is already placed in the/USR/LOCAL/SRC directory:

installation scripts. (The LAMP environment is already installed.) Nagios Most powerful is the open source function, you can write Nrpe script to collect data in a way to monitor the alarm, you can create a set of their own monitoring system according to their own needs.

Yum-y Install httpd gcc gcc-c++ glibcglibc-common gd gd-devel

Useradd Nagios

Groupadd Nagcmd

Usermod-g Nagcmd Nagios

Usermod-g Nagcmd Apache

Cd/usr/local/src

Tar zxvf nagios-3.0.6.tar.gz

CD nagios-3.0.6

./configure--with-command-group=nagcmd--prefix=/usr/local/nagios

Make all

Make install

Make Install-init

Make Install-config

Make Install-commandmode

Make install-webconf

Cd.. /

Tar zxvf nagios-plugins-1.4.13.tar.gz

CD nagios-plugins-1.4.13

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

Make && make install

Cd.. /

Tar zxvf nrpe-2.13.tar.gz

CD nrpe-2.13

./configure

Make all

Make Install-plugin

Make Install-daemon

Make Install-daemon-config

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

123456

echo "aliasnagioscheck= '/usr/local/nagios/bin/nagios-v/usr/local/nagios/etc/nagios.cfg '" >>/ROOT/.BASHRC

Source/root/.bashrc

Chkconfig Nagios on

Chkconfig httpd on

Service httpd Start

Service Nagios Start

# The basic installation process is not repeated here,HTPASSWD-BC This line of code does not require human intervention to generate a password named 123456 angiosadmin users, and later because often to modify /usr/local/nagios/etc/nagios.cfg configuration file, so its syntax needs to be detected, so its long command generates an alias command named Nagioscheck.

The Nagios client automatically installs the script as follows:

Useradd Nagios

Cd/usr/local/src

Tar zxvf nagios-plugins-1.4.13.tar.gz

CD nagios-plugins-1.4.13

./configure

Make

Make install

Chown Nagios:nagios/usr/local/nagios

Chown-r nagios:nagios/usr/local/nagios/libexec

Cd.. /

Tar zxvf nrpe-2.13.tar.gz

CD nrpe-2.13

./configure

Make all

Make Install-plugin

Make Install-daemon

Make Install-daemon-config

/usr/local/nagios/bin/nrpe-c/usr/local/nagios/etc/nrpe.cfg-d

echo "/usr/local/nagios/bin/nrpe-c/usr/local/nagios/etc/nrpe.cfg-d" >>/etc/rc.local


Nagios: Server-side Chinese plug-in installation:

5. Install the culture plugin in Nagios

Chinese plugin:

http://sourceforge.net/projects/nagios-cn/files/

Download The Chinese plugin for the Nagios version and start the installation:

[[Email protected] ~] #tar xvfznagios-cn-3.2.0.tar.bz2

[[email protected] nagios-cn-3.2.0] #cdnagios-cn-3.2.0

[Email protected] Nagios-cn-3.2.0]#./configure

[[email protected] nagios-cn-3.2.0] #make all

[[email protected] nagios-cn-3.2.0] #make Install

Note: The installation of the Chinese plug-in is easy to garbled. Typically by adding Apache 's UTF8 support you can complete

<directory/>

Adddefaultcharset UTF-8 # join format support

</Directory>

To Open the CGI module :

LoadModule Cgid_module modules/mod_cgid.so

LoadModule actions_modulemodules/mod_actions.so

re-starting Apache


This article is from the "Little Luo" blog, please be sure to keep this source http://xiaoluoge.blog.51cto.com/9141967/1587079

Nagios One-click installation script

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.