![]() |
Cài đặt và giám xác các dịch vụ trên Centos bằng Negios
Cài đặt và giám sát các dịch vụ trên Centos bằng Negios 1. Install Nagios on Centos 5 By Fabio Milano Installing Nagios server and network monitoring on Centos 5 server The official documentation can be found at http://support.nagios.com/knowledge-...-documentation Install necessary packages Mã:
Mã:
Mã:
groupadd nagcmdMã:
Save file to directory /opt/Nagios http://www.nagios.org/download/download.php As of this writing Nagios 3.0.6 (Stable) and Nagios Plugins 1.4.13 (Stable) Extract Files: Mã:
cd /opt/NagiosCompile and Configure Nagios Mã:
Mã:
Mã:
make install** Do Not Start Nagios ** Nagios has now been installed to the directory /usr/local/nagios/ Install Nagios Web Interface: Mã:
make install-webconfCreate Web Interface Login User: ** This is not the most secure method ** We will create user “nagiosadmin” ( remember the password you assign !) Mã:
Install Nagios Plugins Extract Files: Mã:
Mã:
Configure nagiosadmin email address for alerts Mã:
Mã:
Mã:
Mã:
2. Nagios NRPE add Services to Monitor Scenario / Question: I followed the Tutorial on installing and configuring NRPE, but now I want to monitor more services on the remote server. Solution / Answer: You can add services by configuring nrpe.cfg on the remote host and adding a new service definition on the Nagios monitoring server. Download Service Plugin on Remote Host Server 1. Download the plugin to folder /usr/local/nagios/libexec/ 2. Change permissions on plugin to nagios Mã:
# cd /usr/local/nagios/libexec/Add a new command definition to the nrpe.cfg file on the remote host Mã:
# vi /usr/local/nagios/etc/nrpe.cfgMã:
Add Service Definition to Nagios Monitoring Server On the monitoring host, you need to define a new service for check_something on the remote host. Add the following entry to one of your object configuration files (linux-server-remote.cfg) define service{ use generic-service host_name remotehost service_description Check Something check_command check_nrpe!check_something } Next, verify your Nagios configuration files and restart Nagios. Mã:
# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfgBonus 1: Tôi muốn cài đặt 1 server Nagios để giám xác các dịch vụ (HTTP, SSH, SMTP, POP3,IMAP...Server Windows or Linux từ xa) thì tôi làm như sau: 1. Trên Server cần giám xác(Do nothing) 2. Trên Server Nagios tôi cài đặt Nagios, Nagios_Pluins, NRPE (3 thành phần này phải được cài trên server Nagios) 3. Và làm theo hướng dẫn theo tài liệu của Nagios Bonus 2: Tôi muốn cài đặt 1 server Nagios để giám xác (RAM, CPU load, HDD trên ....Server Windows or Linux từ xa) thì tôi làm như sau: Bài viết được tổng hợp từ nhiều nguồn: nagios, kernalhardware. Các links liên quan: http://www.kernelhardware.org/nagios...es-to-monitor/ Chúc các bạn thành công :battay: http://quantrinet.com/ads/quantrinet1.png |
| Bây giờ là 11:32 PM. Giờ GMT +7 |
Diễn đàn tin học QuantriNet
quantrinet.com | quantrimang.co.cc
Founded by Trương Văn Phương | Developed by QuantriNet's members.
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.