Build a Nagios Monitoring Alarm System

Source: Internet
Author: User
Nagios is a powerful and stable open-source State change monitoring software. Its excellent features conquer almost all O & M engineers. Let's take a look at nagios. Nagios is an open-source network monitoring software that complies with GPLv2. It can monitor hosts and services of a specified variety of systems and change their working status. Nagios It is an open-source State change monitoring software with powerful functions and stable performance. Its excellent features conquer almost all O & M engineers. Let's take a look at the details below.Nagios.

NagiosIs a complianceGPLv2Open-source network monitoring software can be used to monitor hosts and services of a specified variety of systems, and notify administrators when their working status changes.

Functions and features of Nagios:

1)MONITORING NETWORK SERVICE(HTTP,POP3,SMTP,PING,MySQLAnd so on)

2)Monitor host resources(Disk Space Utilization, memory utilization,CPULoad)

3)The Simple plug-in design interface allows you to easily develop the required detection script

4)Parallel Service Mode

5)Easily describe the network structure and distinguish between "down" and "inaccessible hosts"

6)Notify the administrator of changes in the working status of the host or service by email or user-defined means.6When a service or host problem occurs and is resolved, the alarm is sent to the contact (throughEMail, SMS, user-defined method)It can be passed to the Administrator through Apsara and other methods to ensure efficient server maintenance.

7)Automatic Log Rolling

8)Support for host monitoring in redundancy mode

9)You can useWebAllows you to view the current network status, history of notifications and problems, and log files. This component is optional.

NagiosWorking principle:

NagiosUsually by a main program(Nagios), A plug-in program(Nagios-plugins)And four optionalADDON (NRPE,NSCA,NSClient ++AndNdotiLs)Composition

NagiosMonitoring is implemented through plug-ins. Therefore,NagiosAndNagios-pluginsIt is a required component for server operations. And fourADDON

(1)NRPE: Used for remote monitoringLinux/UnixExecute the script plug-in on the host to monitor these host resources
(2)NSCA: Used for remote monitoringLinux/UnixThe host sends monitoring informationNagios ServiceTool(This is especially used in redundancy monitoring mode.)

(3)NSClient ++: Used for monitoringWindowsHost InstallationWindowsComponents on the host
(4)NDOUtils:NagiosConfiguration Information andEventThe generated data is stored in the database for quick retrieval and processing.

The fourADDON (Attachment)Medium,NRPEAndNSClient ++Working on the client,NDOUtilsWorking on the server side, whileNSCAYou must install it on both the server and client.

NagiosCall relationships between components:

650) this. wIdTh = 650; "border = 0>


NagiosInstallation:

Preparations before installation

(1)SolutionNagiosDependencies:

NagiosThe running of basic components depends onHttpd,GccAndGd. You can use the followingCommandTo checkNagiosDependentRpmWhether the package has been fully installed:

Yum-y install httpd gcc glibc-common * gd *PhpPhp-mysql-server

(2) ConfigurationSelinux

If your system has enabledSelinuxService, the system will reject it by default.Nagios web cgiProgram running, so we should check whether the system is enabledSelinux

Getenforce

If the above command result shows thatSelinuxService, temporarily disable it using the following command:

SetEnforce 0

If you want to disable it in the futureSelinux, You can edit/Etc/sysconfig/selinuxFileSelinuxThe value"Force"To"Disable.

Of course, we canNagiosOfCGIProgram running onSELinux/targetEdMode instead of disablingSelinux:

Chcon-R-t httpd_sys_content_t/usr/local/nagios/sbin

Chcon-R-t httpd_sys_content_t/usr/local/nagios/share

However, we disable it for the sake of lab construction.Selinux

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.