您好,登錄后才能下訂單哦!
服務(wù)端
一. nagios 的配置文件在 /usr/local/nagios/etc
1.vi cgi.cfg
refresh_rate=30 #nagios主頁的刷新時間,我設(shè)置成30秒自動刷新
use_authentication=0 #關(guān)閉認(rèn)證功能,當(dāng)nagios配置好后,建議開回來
2.在配置文件/usr/local/nagios/etc/nagios.cfg
已經(jīng)定義了所用主機文件都在servers
3.在servers 下創(chuàng)建新建主機目錄
例:被監(jiān)控的主機IP:192.168.66.221
[root@localhost etc]# cd /usr/local/nagios/etc/servers
[root@localhost servers]# vi 192.168.66.221.cfg
編輯內(nèi)容為:
define service{
use generic-service
host_name 192.168.66.221 (被監(jiān)控主機的IP)
service_description check_sda1
check_command check_nrpe!check_sda1
max_check_attempts 5
normal_check_interval 1
}
define host{
use linux-server
host_name 192.168.66.221 (被監(jiān)控主機的IP)
alias 192.168.66.221 (被監(jiān)控主機的IP)
address 192.168.66.221 (被監(jiān)控主機的IP)
}
define service{
use generic-service
host_name 192.168.66.221 (被監(jiān)控主機的IP)
service_description check_ping
check_command check_ping!100.0,20%!200.0,50%
max_check_attempts 5
normal_check_interval 1
}
define service{
use generic-service
host_name 192.168.66.221 (被監(jiān)控主機的IP)
service_description check_ftp
check_command check_ftp!21
max_check_attempts 5
normal_check_interval 1
}
define service{
use generic-service
host_name 192.168.66.221 (被監(jiān)控主機的IP)
service_description check_ssh
check_command check_ssh
max_check_attempts 5
normal_check_interval 1
}
define service{
use generic-service
host_name 192.168.66.221 (被監(jiān)控主機的IP)
service_description check_http
check_command check_http
max_check_attempts 5
normal_check_interval 1
}
被監(jiān)控端
在/usr/local/nagios/etc 下的nrpe.cfg
修改配置;server_address=192.168.66.221(本地IP)
allowed_hosts=192.168.211.129(服務(wù)端IP)
未完
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。