Installation and configuration of Nagios under Linux

Source: Internet
Author: User

Nagios is one of the most influential network information monitoring systems in the enterprise, and it can dynamically monitor the specified network status, and issue warning tones or email alerts to operators when the status is abnormal. The type of monitoring and alarm timers are fully customizable.

Another powerful feature of Nagios is its ability to monitor both hosts and services. For example, it can simultaneously monitor both the IP address and the TCP/UDP port number. To further illustrate this feature, we assume that there is a Web server that needs to be monitored, and nagios can use the ip/server name on the server to run the ping command to detect if the server is online, and Nagios will alert whenever the server's RTT (round-trip delay) increases. In addition, Nagios detects whether TCP's 80 port (Web server) is available, such as when the server is online but Apache/iis is not responding.

Nagios-based third-party monitoring tools such as Centreon, FAN, and OP5 Monitor are complemented by an independent Nagios engine based on interface design, automated operation and technical support.

Centos7 under

Install all the required packages first

Yum install httpd php php-cli gd gd-devel gcc glibc glibc-common net-snmp wget

# useradd Nagios # passwd Nagios # Groupadd Nagcmd # usermod-a-G nagcmd Nagios # usermod-a-G nagcmd Apache

Create users and user groups

#cd/usr/local/src#wget http://liquidtelecom.dl.sourceforge.net/project/nagios/nagios-4.x/nagios-4.0.8/nagios-4.0.8.tar.gz #tar xzf nagios-4.0.8.tar.gz#CD nagios-4.0.8#./configure–with-command-group=nagcmd# make all#Make Install#Make install-init#Make install-config#Make Install-commandmode#Make install-webconf

Installing Nagios

d/usr/local/src#  wget http://nagios-plugins.org/download/nagios-plugins-2.0.3.tar.gz # tar xzf nagios-plugins-2.0.3.tar.gz # CD nagios-plugins-2.0.3 # ./configure–with-nagios-user=nagios–with-nagios-group=nagios #  Make # Make Install

Installing plugins

# htpasswd-c/usr/local/nagios/etc/htpasswd.users nagiosadmin # systemctl start httpd # Systemctl Enable httpd

Set a password to start the httpd service

# systemctl start Nagios # Systemctl Enable Nagios

Start Nagios and set up boot

Here is the download with Yum

Yum Install Nagios Nagios-plugins

1, the native monitoring HTTP SSH notifications display warning error, the workaround:

#vim/usr/local/nagios/etc/objects/localhost.cfg

Define Service{
Use Local-service; Name of service template to use
HOST_NAME localhost
Service_description SSH
Check_command Check_ssh
Notifications_enabled 1 #改为1, you can
}

# Define a service to check HTTP in the local machine.
# Disable notifications for the This service by default, as is not all users could have HTTP enabled.

Define Service{
Use Local-service; Name of service template to use
HOST_NAME localhost
Service_description HTTP
Check_command check_http
Notifications_enabled 1 #改为1, you can
}

2. Nagios displays a similar error: HTTP warning:http/1.1 403 Forbidden-5240 bytes in 0.002 second response time.

This error indicates that there are no index.html files in the Apache Web root directory. WORKAROUND: Establish the index.html file in the Web root directory (e.g./var/www/html/directory) and restart Apache and Nagios.

Reference from Https://www.phpini.com/linux/rhel-centos-7-install-nagios

Http://www.sosidc.com/post-41.html

Installation and configuration of Nagios under Linux

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.