Yes, I'm aware of how dep_behavior works.  I don't think it has much
bearing here, though, seeing as how the dependencies get evaluated
either way, and, either way, it's going to evaluate to "infinite
loop"...right?  I could be wrong, but that's how I see it...

Can anyone give an example of a dependency setup for the situation I
described in my original e-mail?  (see below)

Many Thanks in Advance...

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Ryan Clark
Sent: Wednesday, July 13, 2005 11:26 AM
To: Aaron Segura; [email protected]
Subject: RE: Recursive Dependencies

For the dependencies I've always setup the dep_behavior switch as well
to tell mon what should and how a dependency is understood.

 

 

Here's a clip from the man page describing how it works.

 

dep_behavior {a|m} 

The evaluation of dependency graphs can control the suppression of
either alert or monitor invocations. 

Alert suppression. If this option is set to "a", then the dependency
expression will be evaluated after the monitor for the service exits or
after a trap is received. An alert will only be sent if the evaluation
succeeds, meaning that none of the nodes in the dependency graph
indicate failure. 

Monitor suppression. If it is set to "m", then the dependency expression
will be evaulated before the monitor for the service is about to run. If
the evaulation succeeds, then the monitor will be run. Otherwise, the
monitor will not be run and the status of the service will remain the
same. 

 

For the double dependency I'm not 100% sure if that works, I've never
tried using it that way.  Typically the root depend is either DNS
resolving or ping if it is just an ip address.

 

 

Here's a typical host:

 

Host A

 Service ping

            Service SNMP

            Service SSH

            Service etc..

 

And all of the services would rely on ping on the host before they would
report failures.

 

 

Ryan Clark, MCP
System Administrator
Internet Marketing Center
[EMAIL PROTECTED]
604-730-2833 Ext 234



 

________________________________

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Aaron Segura
Sent: Tuesday, July 12, 2005 12:50 PM
To: [email protected]
Subject: Recursive Dependencies

 

Hi all, sorry if this has already been covered, but I coulnd't find
anything in the list archive indicating that it has...

 

I have two systems that *pretty much* run the same services, except one.
If this service is running on A, it should not be running on B, and if
running on B, it should not be running on A.

 

So I set up dependencies as follows:

 

dep_behavior = a

 

Watch A

    service ping

    interval 60s

    monitor ping.monitor

        period...

        alert...

    service snmp

    interval 60s

    monitor snmp.monitor

        depend SELF:ping

        period...

        alert...

    service IMGService

    interval 60s

    monitor ....

        depend SELF:ping && SELF:snmp && ! B:IMGService

 

Watch B

    service ping

    interval 60s

    monitor ping.monitor

        period...

        alert...

    service snmp

    interval 60s

    monitor snmp.monitor

        depend SELF:ping

        period...

        alert...

    service IMGService

    interval 60s

    monitor ....

        depend SELF:ping && SELF:snmp && ! A:IMGService

 

...which seemed like the right thing to do at the time, but I'm getting
"dep recursion too deep" message in the logs whenever mon attempts to
resolve the dependencies.  Looking at the logs leads me to believe the
following is happening:

 

A:ping (OK) 

A:snmp (OK)

B:IMGService -> Depends on...

    B:ping (OK)

    B:snmp (OK)

    A:IMGService -> Depends on...

        A:ping (OK)

        A:snmp (OK)

        B:IMGService -> Depends on...

            B:ping (OK)

            B:snmp (OK)

            A:IMGService -> Depends on...

                A:ping(OK)

                A:snmp(OK)

                B:IMGService -> Depends on...

                    B:...

 

etc...etc...

 

So, my question is:  How does one set up dependencies for such a thing?
I'm sure this is going to be one of those "Did you even READ the manual
page?" things...it always does when I finally break down and ask for
help...but yeah, I did...honest! :)

 

ams


_______________________________________________
mon mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/mon

Reply via email to