[mrtg] Re: Sendmail Monitoring

Alex van den Bogaerdt alex at ergens.op.HET.NET
Fri Jul 26 01:07:50 MEST 2002

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.

Yannis,  I'm not going to judge the usefulness of this small script
but I do have some remarks about its implementation:

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.  MaxBytes is going to be
*very* important in this setup as the wrap will occur at semi-random

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` ?

 / alex at slot.hollandcasino.nl                  alex at ergens.op.het.net \
| work                                                         private |
| My employer is capable of speaking therefore I speak only for myself |
| Technical questions sent directly to me will be nuked. Use the list. | 
| http://faq.mrtg.org/                                                 |
| http://rrdtool.eu.org  --> tutorial                                  |

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