Nagios配置以Docker卷的方式掛載在。/nagios目錄下。Nagios需要監控的配置
也在源碼中,具體內容如下
define host
name regular-host
use linux-server
register 0
max check attempts
define host{
use regular-host
host name clientl
address 192.168.200.15
contact_groups admins
notes test clientl
hostgroups . cfg
define hostgroup {
hostgroup_name test-group
alias Test Servers
members clientl
}
services.cfg
#+BEGIN SRC sh
define service {
use generic-service
hostgroup_name test-group
service description PING
check command check_ping ! 200 . 0, 20 00 ! 600 . 0 ( 60 0。
}
讓我們來試試如果nginx容器會發生什么事情。