--On Monday, September 02, 2002 5:49 PM +0200 Germain <[EMAIL PROTECTED]> wrote:

> Hi !
>
> I an new on the ML and i wonder if my question have already been
> answered. Aniway i cannot access to the ml archive :(
>
> I need to use dependencies but i don't understand how it work (something
> like regexp, i believe)... Is there anyone who have experienced this part
> ? and mainly is there anyone who could give me some examples ?
>


Mon dependencies are just arbitrary perl statements.  Except that anything 
that looks like 'hostgroup:service' gets replaced with either 1 (OK) or 0 
(bad), based on the opstatus of the particular service.  The magic string 
'SELF' can be used to refer to the current hostgroup, i.e 'SELF:ping'.

A simple example would be:
depend SELF:ping

More complex examples might look like:
depend SELF:ping && SELF:sometest
(i.e. depend on two other tests on this same hostgroup)
or
depend SELF:ping && SELF:sometest && (routergroup1:ping || 
routergroup2:ping)
(i.e. depend on two tests on this hostgroup, plus one of two groups of 
routers being pingable (for redundant routes to a specific host))

You can get arbitrarily complicated if you want, but anything more then 
ANDs and ORs is probably overkill 99% of the time.


-David

David Nolan                    <*>                    [EMAIL PROTECTED]
curses: May you be forced to grep the termcap of an unclean yacc while
      a herd of rogue emacs fsck your troff and vgrind your pathalias!

Reply via email to