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容器会发生什么事情。