From owner-freebsd-questions@FreeBSD.ORG Mon Aug 4 09:46:54 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1C2A1065679 for ; Mon, 4 Aug 2008 09:46:54 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from smtp.infracaninophile.co.uk (gate6.infracaninophile.co.uk [IPv6:2001:8b0:151:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id 4A11D8FC0A for ; Mon, 4 Aug 2008 09:46:54 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost [IPv6:::1]) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.14.2/8.14.2) with ESMTP id m749klVN021415; Mon, 4 Aug 2008 10:46:48 +0100 (BST) (envelope-from m.seaman@infracaninophile.co.uk) X-DKIM: Sendmail DKIM Filter v2.7.0 smtp.infracaninophile.co.uk m749klVN021415 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=infracaninophile.co.uk; s=200708; t=1217843208; bh=ujO9BbVrI+U8nl YfllUWalM1lk6UCnaEnVd5/9srH4g=; h=Message-ID:Date:From:MIME-Version: To:CC:Subject:References:In-Reply-To:Content-Type:Cc:Content-Type: Date:From:In-Reply-To:Message-ID:Mime-Version:References:To; z=Mes sage-ID:=20<4896D001.8030100@infracaninophile.co.uk>|Date:=20Mon,=2 004=20Aug=202008=2010:46:41=20+0100|From:=20Matthew=20Seaman=20|Organization:=20Infracaninophile|User -Agent:=20Thunderbird=202.0.0.16=20(X11/20080726)|MIME-Version:=201 .0|To:=20Maximillian=20Dornseif=20|CC:=20freebsd-ques tions@freebsd.org|Subject:=20Re:=20Handling=20of=20daily=20and=20we ekly=20mails|References:=20<18748908.post@talk.nabble.com>|In-Reply -To:=20<18748908.post@talk.nabble.com>|X-Enigmail-Version:=200.95.6 |Content-Type:=20multipart/signed=3B=20micalg=3Dpgp-sha256=3B=0D=0A =20protocol=3D"application/pgp-signature"=3B=0D=0A=20boundary=3D"-- ----------enig1E38EE846C92A1B5DB4E4576"; b=KRenLCZH9OrelkKNrhrpA7t6 vEuLM+wC1o3mkCOMyzbrqj5Yr8VZBDr3PnfJlaY2LeFhnPKf7MPcEFkT4HziVC3orMI KxUcJX1Qf8YqKnGj9cdpVHmwRIo8rLt5MGsaWlNLQCvqHLrDSlHnjSZCXyQgCnbR8TW 7ykMr+edfXN50= Message-ID: <4896D001.8030100@infracaninophile.co.uk> Date: Mon, 04 Aug 2008 10:46:41 +0100 From: Matthew Seaman Organization: Infracaninophile User-Agent: Thunderbird 2.0.0.16 (X11/20080726) MIME-Version: 1.0 To: Maximillian Dornseif References: <18748908.post@talk.nabble.com> In-Reply-To: <18748908.post@talk.nabble.com> X-Enigmail-Version: 0.95.6 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig1E38EE846C92A1B5DB4E4576" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0 (smtp.infracaninophile.co.uk [IPv6:::1]); Mon, 04 Aug 2008 10:46:48 +0100 (BST) X-Virus-Scanned: ClamAV 0.93.3/7930/Mon Aug 4 01:09:38 2008 on happy-idiot-talk.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-3.0 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VERIFIED,NO_RELAYS autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on happy-idiot-talk.infracaninophile.co.uk Cc: freebsd-questions@freebsd.org Subject: Re: Handling of daily and weekly mails X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Aug 2008 09:46:54 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig1E38EE846C92A1B5DB4E4576 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Maximillian Dornseif wrote: > I administer about a dozen FreeBSD Servers. This results in me > getting about 100 mails a week from the PERIODIC(8) scripts. > Obviously this is to much to read with care. =20 > I wonder what the canonical approach is to handling hundreds of > status mails like the ons generated by periodic. Yeah. Periodic scripts are great if you only have a few machines not doing anything really critical. It's a mark of the standards required by the FreeBSD project that the baseline system comes with a working=20 monitoring system built-in. However, periodic e-mails really do not scale to tens, let alone hundreds= , of machines and once a day is really far too infrequent for checking important services. My recommendation is to redirect all of the periodic output to local log files -- daily.log, weekly.log etc. -- according to the comments in /etc/defaults/periodic.conf. Then set up a full blown monitoring system using eg. Nagios. For a dozen or so servers, you won't need anything particularly special to run Nagios on. Sticking it in a jail on one of your existing machines might work well for you. Nagios monitoring needs to be developed over time. With the standard plugins supplied by the net-mgmt/nagios-plugins port, you'll be able to monitor most services with external listeners. However, to get the most out of Nagios I find that installing net-mgmt/net-snmpd on all monitored machines is a necessity. You'll need to be careful about how you do that -- SNMP v2c or lower does the equivalent of sending passwords across the net in plain text, so it's useful if you can arrange for some sort of private back-end network between all your servers. While the intrinsic capabilities of net-snmpd add a great deal of monitorable information, the real advantage is the ability to hook up arbitrary scripts via the 'extend' mechanism. This coupled with the ability to write custom plugins for Nagios means you can do a lot of very interesting things. Trivial example: we routinely hook up running 'gmirror status -s' through snmpd and then use a very short Nagios plugin script to alert us to RAID problems. There's also nagios-exchange with plenty of interesting and useful stuff = available -- see for instance http://www.nagiosexchange.org/cgi-bin/page.cgi?g=3DDetailed%2F1562.html;d= =3D1 Nagios and periodic don't fulfil exactly the same functions, but there is enough overlap to allow replacing one with the other. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW --------------enig1E38EE846C92A1B5DB4E4576 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEAREIAAYFAkiW0AcACgkQ8Mjk52CukIz0ugCfRp0bKOmv/xMkBueRFNawkQHw o48AmwVcuZiUXHc1IHKCXiMQa+I8b5eK =A2AX -----END PGP SIGNATURE----- --------------enig1E38EE846C92A1B5DB4E4576--