[Avcheck] Monitoring [was: Running kavdaemon supervised]

Michael Tokarev mjt@tls.msk.ru
Fri, 19 Oct 2001 17:45:41 +0400


Ralf Hildebrandt wrote:
> 
[]
> You mean: If there is a deferral due to the transport being unavailable,
> check for kavdaemon's status?

No.  I mean: if there is anything wrong with avcheck, then take
*appropriate* actions.  One of them is -- if avcheck said "unable
to connect", then check if av daemon is running, and possible try
to (re)start it.  Another example is -- if avcheck said "unexpected
return code", then notify postmaster about this via email.

Watching a logfile for this may be a good idea (whatever log file --
be if "plain" maillog or special log written by avcheck itself) --
this method allows combining identical entries and take an action
only once.

[]
> > Ummm...  It looks too complicated, is it?
> 
> Yep.

Yes -- this sort of monitoring is a part of a general monitoring
system.

> > > cd /var/spool/avp
> > > /usr/bin/env - HOME=/ \
> > > /var/spool/avp/uchroot -u avpd /var/spool/avp \
> > > ./kavdaemon -dl -f=/ctl /tst
> >
> > Just curious -- why you use `cd' here?
> 
> Because kavdaemon used to barf if it wasn't started from the directory in
> which the binarie resides.

uchroot will chdir to directory specified with -d (defaults to /) anyway
after doing chroot() and before executing given command.  Well, that's
really a non-issue.

Regards,
 Michael.