[mrtg] Re: Sendmail Monitoring
Yannis Nikolopoulos
yanodd at otenet.gr
Fri Jul 26 01:19:23 MEST 2002
On Fri, Jul 26, 2002 at 01:07:50AM +0200, Alex van den Bogaerdt wrote:
> Yannis Nikolopoulos wrote:
>
> > the simplest way is to write a small shell (or perl) script that runs
> > as a cron job every 5 minutes and does a pgrep sendmail | wc -l
> > and stores that into a text file.
> >
> > the mrtg conf file is trivial also. Make sure you have a target
> > definition like :
> > Target[host]: `cat text_file`
> > and you probably need the gauge and nopercent options.
>
> First of all: you seem to count lines. This number will grow over
> time, until the logfile is purged. This therefore is an increasing
> counter that wraps around. Not a gauge.
no, it's not an increasing counter. The text file that holds the output of
"pgrep sendmail | wc -l" is overwritten every 5 mins,
therefore the curent number of sendmail processes is fed to MRTG, therefore,
it IS a gauge.
> MaxBytes is going to be
> *very* important in this setup as the wrap will occur at semi-random
> numbers.
MaxBytes IS very important for threshold checking . No wrapping occurs.
> Also: Why output 'pgrep sendmail | wc -l' to a text file and then
> Target[host]: `cat text_file` ? Wouldn't it work when you do
> Target[host]: `pgrep sendmail | wc -l` ?
of course it would :)
> cheers,
> --
--
Yannis Nikolopoulos OTEnet S.A. Internet Service Provider
yanodd at otenet.gr Tel: +30 10 3826199
---------------------------------------------------------------------
-= AGAINST HTML MAIL =-
--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive http://www.ee.ethz.ch/~slist/mrtg
FAQ http://faq.mrtg.org Homepage http://www.mrtg.org
WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
More information about the mrtg
mailing list