How to monitor the health of the MailScanner architecture

Alistair Carmichael Alistair.Carmichael at ntltravel.com
Tue Jul 10 17:04:04 IST 2007


-----Original Message-----
From: mailscanner-bounces at lists.mailscanner.info [mailto:mailscanner-bounces at lists.mailscanner.info] On Behalf Of Glenn Steen
Sent: 10 July 2007 16:50
To: MailScanner discussion
Subject: Re: How to monitor the health of the MailScanner architecture

On 10/07/07, Jonas A. Larsen <jonas at vrt.dk> wrote:
> Hi Glenn
> > >
> > Um, just script up a snippet that send a mail through to a service
> > account (use telnet with expect, or perl or whatever... Make that
> > sending snippet a function/sub/procedure and let it take an argument
> > servername, then loop through the list of servers.... You know what to
> > do:-), then use an automated MUA in the same script (whatever you
> > need) to check that it is received within a reasonable time... Nail
> > within an expect script would be nice for that last bit ... How hard
> > can it be:-):-).
> > You'd have to keep an eye on reasonable timing, and think through how
> > to report errors...
> > Could probably be incorporated as a testscript into any monitoring
> > app... Or run from cron with some reasonable regularity.
> > Should be fairly easy to write up ... But I'm on vacation, so you do
> > it yourself;-).
> > This is precisely what is needed :) regarding the "fairly easy to write
> up" I guess that depends on how elite coding scriptiong skills you have and
> how much time you got :)
True:-)

> We currently got it running using a freeware windows monitoring tool, that
> had this precise check.
(Yuk! Well, whatever works, I guess...:-)

> I was just looking for something that already existed and general comments.
> (because I'm a lazy boy)

That's generally the big motivator to do something like that... The
effort to make it is less than doing it by hand (if even
possible:-):-).

> People seem to have misunderstood it a bit since they are recommending
> generic monitoring solutions. Neither nagios, bigbrother or others have the
> above solution. I actually think munin had something but it would have to be
> re-scripted to be useable (assuming I don't want to run munin)

True. This would probably slot into something more generic, to handle
the alerting etc... Laziness again, why reinvent that part of it:-).

> I do find it odd though, that more or less nobody appears to be monitoring
> their mail systems in this way. I still say it's the only way to be 100% if
> your system is functioning or not. Checking the mta daemon, mailscanner
> daemon, queue sizes etc. are all not a perfect way to check if the
> mailscanning process is functioning.

I suspect that people fall into a lot of different categories here...
Some have small installations that don't really need that kind of
alerting.... The users and perhaps something like
MailWatch/Vispan/MailScanner-MRTG/whatever is enough of an alerting
system:-). For larger systems something homegrown in [favourite
monitoring app] is likely enough.

Another "problem" is that anything like this will become somewhat
specific to how your "mailflow topology" looks... So the bigger
players probably do have something like this in place already, but
deem it way to specific to their setup to be meaningful to share.

If I find the time and energy when I'm back from vacation (not that
likely, but ... if:), I might make something simple to work from...
Yes, that is half a promise of half a solution:-).
>
> Cheers

Likewise!

One method I thought of by using a shell script in conjunction with mailwatch is to run a shell script to generate a message every minute to output "$$`date +%s`" to a temp file, then run the mail command using the output (cat) of this file as the subject and send the message to a generic postmaster address. Then sleep for half a min or so and then run a mysql query on your mailwatch database's maillog table like "select Count(*) from maillog where subject = 'cat /tmp/myfile'"
If the result of count(*) is 1 then the message has been collected and scanned by mailscanner, if the answer is zero then it has not.
It probably wouldn't take too long to throw together into a shell script.
The only downside I think would be if you have one mailwatch database used by 3 mailscanners like we do this query can take a while to execute due to the sheer size of the database but might work ok for a single server setup.
My 2 more cents ;)

>
> Med venlig hilsen / Best regards
>
> Jonas Akrouh Larsen
>
> TechBiz ApS
> Laplandsgade 4, 2. sal
> 2300 København S
>
> Office: 7020 0979
> Direct: 33369974
> Fax:    7020 0978
> Mobile: 51201096
> Web: www.techbiz.dk.
>
>

-- 
-- Glenn (off in the west-swedish wilderness around Arvika... No, I'm
going to give the festival a miss this year too:-)
email: glenn < dot > steen < at > gmail < dot > com
work: glenn < dot > steen < at > ap1 < dot > se
-- 
MailScanner mailing list
mailscanner at lists.mailscanner.info
http://lists.mailscanner.info/mailman/listinfo/mailscanner

Before posting, read http://wiki.mailscanner.info/posting

Support MailScanner development - buy the book off the website! 

This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail.

This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail.


More information about the MailScanner mailing list