[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] Monitoring Sendmail (smtp/pop/mailqueu) with MRTG => How ?



Hi Andy,

Do you know if it is possible ot accomplish the same if MRTG is running on
it's own dedicated server?

We do not want to install MRTG on each server.

regards

Erik Venema
DutchNet Internet

----- Original Message -----
From: "Andy Brown" <andy.brown@xxxxxxxxxxxxx>
To: <cobalt-users@xxxxxxxxxxxxxxx>
Sent: Tuesday, August 20, 2002 2:22 PM
Subject: RE: [cobalt-users] Monitoring Sendmail (smtp/pop/mailqueu) with
MRTG => How ?


> <snip>
> > I have installed mrtg on the famous blue box. It is running
> > fine. However I
> > don't get MRTG to monitor sendmail processess (also http).
> </snip>
>
> Hi Robert,
>
> If you need a script which simply checks how many processes of a
particular type are running (e.g. sendmail, httpd, admserv, etc) then
something like this should do you:
>
> #!/bin/sh
>
> name=$1
> process=$2
> numproc=`ps ax |grep $process | grep -v grep | wc -l | awk '{print $1}'`
>
> echo $numproc
> echo $numproc
> echo `uptime | cut -d"," -f1,2`
> echo $name
>
>
> Then in your mrtg.cfg just do:
> Target[index]: `/usr/sbin/pscheck index httpd`
>
>
> Or do check how many mails are waiting in the mailq, use a script like
this:
>
> #!/bin/sh
>
> name=$1
> nummail=`echo $((((\`mailq | wc -l | awk '{print $1}'\` - 2)) / 2))`
>
> echo $nummail
> echo $nummail
> echo `uptime | cut -d"," -f1,2`
> echo $name
>
> Again, in MRTG:
> Target[mailer]: `/usr/sbin/mailqcheck index`
>
> (Though I haven't tested the mailq one fully, it should be fine as a rough
guide)
>
>
> Hope that does what you need.
>
> Regards,
>
> Andy
> andy@xxxxxxxxxx
> http://www.raqpak.com/ <-- Raq/Qube unofficial PKGs and support advice
>
> _____________________________________
> cobalt-users mailing list
> cobalt-users@xxxxxxxxxxxxxxx
> To subscribe/unsubscribe, or to SEARCH THE ARCHIVES, go to:
> http://list.cobalt.com/mailman/listinfo/cobalt-users
>
>