monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [monit] Question about multi-host testing


From: Martin Pala
Subject: Re: [monit] Question about multi-host testing
Date: Mon, 29 Oct 2007 21:38:04 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.6) Gecko/20070802 Iceape/1.1.4 (Debian-1.1.4-1)



Pablo Iranzo Gómez wrote:
Martin,
        I've did this one before writing to the list, but failed, so that was
the reason:

check host ro5000-gkgRn17229AEBsh17232 with address 10.39.16.1
        if failed ICMP type ECHO count 1 timeout 10 seconds then alert
        alert address@hidden with reminder on 1 cycle

check host pos10.5000-gkgRn17229AEBsh17232 with address 10.39.16.10
        if failed ICMP type ECHO count 1 timeout 10 seconds then alert
        depends on ro5000-gkgRn17229AEBsh17232
        alert address@hidden with reminder on 1 cycle

        The "gkgRn17229AEBsh17232" is just to ensure that there are no service
name duplicates, what I'm getting is two email alerts

Can you run monit in verbose mode (-v option) and send the log? You'll see in it what happened in more detail.


        If I just put "if failed icmp then alert" monit complains about
configuration (I'm using monit-4.9-1), so either I'm doing something
wrong or it's a problem with this verson.

I'm sorry - this was typo (i wrote the example just from memory so, the "type echo" was missing).


Thanks,

Martin





        


El vie, 26-10-2007 a las 23:08 +0200, Martin Pala escribió:
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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]