Ita*_*not 6 linux monitoring nagios centos6
我有一个 Nagios 服务器,其中包含许多hostgroups
. 其中一个hostgroups
包括我想从被检查的一个特定的Nagios排除其中一台服务器Check
,但我希望它继续存在的一个成员hostgroup
,因此可能会检查所有其他checks
的hostgroup
被检查。有没有exclude
类似的选项可以帮助我实现我的目标?谢谢
Dio*_*lis 11
!
在服务定义中添加带有前缀的特定主机。下面的服务检查将适用于agroup
除ahost
.
define service {
hostgroup_name agroup
host_name !ahost
service_description Shared NFS mount
check_command check_nrpe!check_shared_mount
use generic-service
Run Code Online (Sandbox Code Playgroud)
}
还没有在主机上尝试过,但是在主机组上尝试过,以!
作品为前缀。我使用它在繁忙的服务器上运行不同的负载检查:
define host {
use physical-host
host_name busy-host.example.com
alias busy-host.example.com
address 10.43.16.1
hostgroups linux,centos,ldap,http,busy
}
define host {
use physical-host
host_name normal-host.example.com
alias narmal-host.example.com
address 10.43.1.1
hostgroups linux,centos,dns,proxy,ldap,hp,http,puppetmaster
}
define service {
use generic-service
hostgroup_name linux,!busy
service_description Load
check_command check_snmp_load
}
define service {
use generic-service
hostgroup_name busy
service_description Load
check_command check_snmp_load_busy
}
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
13362 次 |
最近记录: |