讓我們添加一些 客戶 到達 監視器 經過 Nagios 服務器..

添加 EPEL 存儲庫 安裝”nagios 插件“ 什麼時候”天然橡膠包裝成 客戶端系統。
還要檢查: 如何為 RHEL / CentOS 6/5 啟用 EPEL 存儲庫並在 CentOS 6.3 上安裝 Nagios-3.4
Nagios 服務器:
操作系統 : CentOS 6.4
IP地址 : 192.168.1.80
Nagios 客戶端:
操作系統 : CentOS 6.3
IP地址 : 192.168.1.81
在受監控的客戶端系統上安裝“nrpe”和“nagios-plugins”軟件包。

[[email protected] ~]# yum install -y nrpe nagios-plugins-all openssl

配置客戶端

[[email protected] ~]# nano /etc/nagios/nrpe.cfg
## Line 81 - Add the Nagios server IP ##
allowed_hosts=127.0.0.1 192.168.1.80

啟動nrpe服務

[[email protected] ~]# /etc/init.d/nrpe start
Starting nrpe: [ OK ]
[[email protected] ~]# chkconfig nrpe on

要通過 nagios 服務器添加要監控的客戶端,請打開 nagios 服務器上的“nagios.cfg”文件並取消註釋以下行:

添加服務器客戶端

[[email protected] ~]# nano /etc/nagios/nagios.cfg
## Line 52 - Uncomment ##
cfg_dir=/etc/nagios/servers

在“/etc/nagios/”下創建一個名為“servers”的目錄。

[[email protected] ~]# mkdir /etc/nagios/servers

為您要監控的客戶端創建一個配置文件。

[[email protected] ~]# nano /etc/nagios/servers/clients.cfg

插入這個:

define host{
use linux-server
host_name client
alias client
address 192.168.1.81
max_check_attempts 5
check_period 24x7
notification_interval 30
notification_period 24x7
}

重啟nagios服務。

[[email protected] ~]# /etc/init.d/nagios restart
Running configuration check...done.
Stopping nagios: .done.
Starting nagios: done.

然後在 nagios 管理瀏覽器和左窗格中打開控制台[ホスト]轉到該部分。新添加的客戶端將顯示在那裡。單擊主機以查看是否有任何錯誤或警報。