How to monitor Linux Hosts and send emails to alarms through Nagios

Source: Internet
Author: User
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.

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.