The icmp test is part of host check only. If you want to check more
hosts, you thus need to specify one "check host" per each host and use
dependency to set the relationship. Example:
--8<--
check yourswitch with address 10.10.10.2
if failed icmp then alert
check yourneighbour with address 10.10.10.10
if failed icmp then alert
depends on yourswitch
check yourrouter with address 10.10.10.1
if failed icmp then alert
depends on yourswitch
check remoterouter with address 192.168.1.1
if failed icmp then alert
depends on yourswitch
depends on yourrouter
check remoteswitch with address 192.168.1.2
if failed icmp then alert
depends on yourswitch
depends on yourrouter
depends on remoterouter
check remotehost with address 192.168.1.10
if failed icmp then alert
depends on yourswitch
depends on yourrouter
depends on remoterouter
depends on remoteswitch
--8<--
Monit currently supports soft dependency, which provides correct
sequence ... the hard dependency support is planned:
http://www.tildeslash.com/monit/doc/next.php#27
Martin
Pablo Iranzo Gómez wrote:
Hi
I would like to do a chain-testing for connectivity using the ICMP
test, for example:
If you have this network layout:
Your computer -> a computer in your same switch -> the switch -> router
-> remote router -> remote switch -> remote computer
It doesn't make sense to report a connectivity problem with remote
computer, if every step in the chain could fail, so to correclty
determine the problem you would need something like:
Chech host remotecomputer with address 10.10.10.10
if passed host yourneighbour then
if passed host yourswitch then
if passed host your router then
if passed host remoterouter then
if passed host remoteswitch then
if failed host remotecomputer then alert
But afaik, ICMP doesn't accept specifying "host", as it is supposed to
be inside a check host sentence... otherwise, using "depends" just works
for starting/stoping services, not for chain-dependencing failures (like
first check if you can ping your router before claiming host being down)
¿There's anything that I could have not considered in order to archieve
this?
Regards
Pablo
------------------------------------------------------------------------
--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general
--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general
------------------------------------------------------------------------
--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general