我有一个包含许多主机组的Nagios服务器。 其中一个主机组包括一个服务器,我想排除检查一个特定的Nagios Check但我希望它继续作为主机组的成员,所以它可能会检查所有其他checks hostgroup检查。 有exclude选项或类似的东西可以帮助我实现我的目标吗? 谢谢
还没有尝试与主机,但与主机组,前缀一个! 作品。 我使用这个在繁忙的服务器上运行不同的负载检查:
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 }
添加一个特定的主机! 服务定义中的前缀。 下面的服务检查将适用于除了agroup以外的所有主机。
define service { hostgroup_name agroup host_name !ahost service_description Shared NFS mount check_command check_nrpe!check_shared_mount use generic-service
}