基本安装参考文章 https://www.server-world.info/en/note?os=CentOS_7&p=nagios
新增主机配置:
在conf.d目录下新建设备配置 gateway.conf
define host{
use linux-server
host_name 10.1.0.1 #注意此处应配置IP,否则无法重启nagios服务
alias gateway
address 10.1.0.1
}
define service{
use generic-service
host_name 10.1.0.1
service_description check_ping
check_command check_ping!100.0,20%!200.0,50%
max_check_attempts 5
normal_check_interval 1
}