Nagios new monitoring cluster, uninstall monitoring cluster batch operation

Source: Internet
Author: User

1. Be sure to find the application side to confirm each node needs to monitor the process, do not blindly think all the Hadoop cluster of ZK, journal what are the same, remember!

2. The monitored node only needs to install Nagios-plugin and Nrpe, depending on the need to install xinetd

3. Verify that Nagios is not installed on the monitored node

4. Identify trust between monitored nodes, monitored nodes, and Nagios server

5. Start

5-1 Select a node of cluster A with the operating system, an, target cluster b

SSH an

For DN in Cluster{an. B1}

Do

echo "$DN is configuring the Nagios .................. ..."

SSH $dn useradd nagios-d/usr/local/nagios

Scp-r/usr/local/nagios/[email protected] $DN:/usr/local/

Scp/etc/xinetd.d/nrpe [email protected] $DN:/etc/xinetd.d/nrpe

SSH $dn ' echo ' Nrpe 5666/tcp #nrpe ">>/etc/services"

SSH $dn ' chown-r nagios:nagios/usr/local/nagios/'

SSH $dn ' service xinetd restart '

echo "$DN is end configuring the Nagios ............. ..."

Done

5-2 Batch installation on cluster B

SSH B1

For DN in CLUSTER{B2. Bn}

Do

echo "$DN is configuring the Nagios .................. ..."

SSH $dn useradd nagios-d/usr/local/nagios

Scp-r/usr/local/nagios/[email protected] $DN:/usr/local/

Scp/etc/xinetd.d/nrpe [email protected] $DN:/etc/xinetd.d/nrpe

SSH $dn ' echo ' Nrpe 5666/tcp #nrpe ">>/etc/services"

SSH $dn ' chown-r nagios:nagios/usr/local/nagios/'

SSH $dn ' service xinetd restart '

echo "$DN is end configuring the Nagios ............. ..."

Done

5-3 If Logcheck/var/log/messages is configured, be sure to verify that/var/log/messages permissions are 705

5-4 Adding a new cluster configuration file on the server side

Mkdir-p/usr/local/nagios/etc/servers/b

cd/usr/local/nagios/etc/servers/a

Cat an.cfg|sed ' s/an/bn/g ' |sed ' s/an_ip/bn_ip/g ' >/usr/local/nagios/etc/servers/b/bn.cfg

5-5 Adding a new cluster's group configuration file on the server side

Vi/usr/local/nagios/etc/servers/group.cfg

Define Hostgroup{

Hostgroup_name b

Alias b

Members B1,.... Bn

}

6. Cluster downline

This time it's just in Nagios. Front line, offline cluster retention Nagios software, upgrade and re-monitor

All configuration of the cluster must be deleted (removed) on the server side only.

Note: Do not want to modify the permissions ..... The result of modifying permissions is that Nagios can't get up ...

Nagios new monitoring cluster, uninstall monitoring cluster bulk operations

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.