不幸的是,这说起来容易做起来难.是否有一种简单的方法来为主机(或我的路由器)在服务器上的所有服务设置服务依赖性?
Nagios有一些文档,但为每个服务添加单个服务依赖项定义将非常耗时.
http://nagios.sourceforge.net/docs/3_0/objectdefinitions.html#servicedependency
此外,从2.0文档的同一部分可以看出,如果主机关闭,服务将不会发出警报(保存这些警报):
Whenever a service check results in a
non-OK status level,Nagios will
attempt to check and see if the host
that the service is running on is
“alive”. Typically this is done by
pinging the host and seeing if any
response is received. If the host
check command returns a non-OK state,
Nagios assumes that there is a problem
with the host. In this situation
Nagios will “silence” all potential
alerts for services running on the
host and just notify the appropriate
contacts that the host is down or
unreachable. If the host check command
returns an OK state,Nagios will
recognize that the host is alive and
will send out an alert for the service
that is misbehaving.
默认情况下,服务依赖项不能从主机模板继承,但我相信父项是.所以你可以从模板继承父母(如果我在这里是正确的)并节省一些打字.
最后,我实际上希望启用无法访问的警报.如果路由器出现故障,我希望我的手机能够“疯狂”.