Monitor SMS alerts using naigos

Source: Internet
Author: User
Article title: naigos implements monitoring of SMS alarms. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

1. install nagios on the server

# Vim nagios-install

#! /Bin/bash

#### For nagios client installation, note the install nagios section ###

# Install nagios

Tar zxvf nagios-3.0.6.tar.gz cd nagios-3.0.6./configure -- prefix =/usr/local/nagios -- with-nagios-user = nagios -- with-nagios-group = nagios

Make all

Make install

Make install-init

Make install-config

Make install-commandmode

Make install-webconf

Cd ..

# Install nagios-plugins

Tar zxvf nagios-plugins-1.4.13.tar.gz cd nagios-plugins-1.4.13./configure -- prefix =/usr/local/nagios

Make

Make install

Cd ..

# Install nrpe

Tar zxvf nrpe-2.12.tar.gz cd nrpe-2.12./configure -- enable-ssl -- enable-command-args

Make all

Mkdir-p/usr/local/nagios/etc

Mkdir-p/usr/local/nagios/bin

Cp sample-config/nrpe. cfg/usr/local/nagios/etc/

Cp src/nrpe/usr/local/nagios/bin/

Sed-I's/127.0.0.1/127.0.0.1, 192.168.1.253/'/usr/local/nagios/etc/nrpe. cfg sed-I's/usr \/local/nagios/g'/usr/local/nagios/etc/nrpe. cfg

II. start nrpe

#/Usr/local/nagios/bin/nrpe-c/usr/local/nagios/etc/nrpe. cfg-d if you need to restart nrpe, killall-9 nrpe and then start

3. configure nagios

After Nagios is successfully installed, there are several directories in/usr/local/nagios:

Bin etc libexec sbin share var

1. create a linux directory under/usr/local/nagios/etc and create a hosts. cfg file.

The content in this file is divided into three major parts: (1) define the host, that is, host (2), define the monitoring group, that is, hostgroup (3), and define the services of the monitoring host, server

Example:

# Define webgroup host for the testers machine # Define a host

Define host {

Host_name web01

Alias web01.com address 192.168.1.10

Check_command check-host-alive

Max_check_attempts 10

Check_period 24x7

Icationication_interval 20

Icationication_period 24x7

Notification_options d, r

Contact_groups admins

Name web01

}

Define host {

Host_name web02

Alias web02.com address 192.168.1.20

Check_command check-host-alive

Max_check_attempts 10

Check_period 24x7

Icationication_interval 20

Icationication_period 24x7

Notification_options d, r

Contact_groups admins

Name web02

}

Define host {

Host_name web03

Alias web03.com address 192.168.1.20

Check_command check-host-alive

Max_check_attempts 10

Check_period 24x7

Icationication_interval 20

Icationication_period 24x7

Notification_options d, r

Contact_groups admins

Name web02

}

[1] [2] [3] Next page

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.