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