The previous article (see http: www.linuxidc.comLinux2011-0943910.htm) introduced how to set up the nagios monitoring service on a linux host and monitor the service status change on the windows host, this time we continue with the previous content. First, the nagios Service monitors other linux Hosts. Secondly, when the monitored mysql service is offline
Previous Article (see http://www.linuxIdC.com/Linux/2011-09/43910.htm) describes how to set up the nagios monitoring service on a linux host and monitor the service status changes on the windows host. This time, we continue with the previous content.
First, the nagios Service monitors other linux Hosts, and then provides the Apsara stack alarm mechanism when the monitored mysql service is offline.
1. Configure nagios monitoring for other linux Hosts.
On the monitored linux host:
1. Add a nagios user to execute the service.
UseraDdNagios
2. Install the nagios-plugins-1.4.15.tar.gz plug-in before installing nrpe.
Tar zxf nagios-plugins-1.4.15.tar.gz
CdNagios-plugins-1.4.15
./Configure -- with-nagios-user = nagios -- with-nagios-group = nagios
Make
Make install
3rd compile and install nrpe-2.12.tar.gz
Tar-zxvf nrpe-2.12.tar.gz
Cd nrpe-2.12
(Note: Before proceeding to the next step, ensure that openssl and openssl-devel have been installed on the host; otherwise, an error indicating that the ssl header file cannot be found will be prompted during compilation, compilation fails)
./Configure
Make all
Make install-plugin
Make install-daemon
Make install-daemon-config
4. Configure the configuration file/usr/local/nagios/etc/nrpe. cfg of nrpe.
Vim/usr/local/nagios/etc/nrpe. cfg
Server_address = 127.0.0.1 IP addresses that can be monitored
5. Check the syntax of the configuration file and start the service.
/Usr/local/nagios/bin/nrpe-c/usr/local/nagios/etc/nrpe. cfg-d
If no prompt is displayed, the syntax is correct and the service has been started.
So far, our configuration on the monitored linux host has been completed.