你如何在NAGIOS中inheritance服务检查?

我们有一个使用inheritance的nagios设置比我以前更大的程度。 我已经阅读了文档:

http://nagios.sourceforge.net/docs/3_0/objectinheritance.html

但是我仍然无法理解如何实现我的目标。

我有通知过程警告的服务器/主机。 我调查了这一点,这是一个已知的错误,并安全地忽略这个特定的服务器。 理想情况下,我想增加这个主机的服务定义的警告/关键点; 但我也很舒服,只是没有使用此服务检查,直到当前问题的补丁发出。 禁用通过networking界面是不是我的pipe理者可以接受的select。

服务定义:

define service{ use unix-agent-service hostgroup_name linux-servers service_description Agent: Total Processes check_command check_nrpe!check_total_procs } 

主机定义:

 define host{ use linux-server host_name unixlab alias Unix Lab address PRIVATE } 

组/服务器定义:

 define host{ name linux-server use generic-host alias Linux server hostgroups linux-servers register 0 } 

主机inheritance主机组linux-servers中定义的所有服务。 我已经尝试给服务检查一个名称,然后在主机定义中将该名称设置为null,但我认为这个语法是错误的和/或我不理解inheritance的那部分:

 define service{ **name agent-total-processes** use unix-agent-service hostgroup_name linux-servers service_description Agent: Total Processes check_command check_nrpe!check_total_procs } 

主机定义:

 define host{ use linux-server host_name unixlab alias Unix Lab address PRIVATE **agent-total-processes null** } 

我相信我错过了一些显而易见的东西……根据我对inheritance的理解,这应该是可能的,但是我无法把头围绕在它周围。

思考?

在服务定义中,您可以排除(使用!)您不想运行的特定主机:

 define service { use unix-agent-service hostgroup_name linux-servers host_name !unixlab service_description Agent: Total Processes check_command check_nrpe!check_total_procs } 

这将使该服务适用于除“unixlab”以外的每个“linux-servers”成员。