From owner-freebsd-questions@FreeBSD.ORG Fri Mar 6 06:37:21 2009 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 C8401106564A for ; Fri, 6 Mar 2009 06:37:21 +0000 (UTC) (envelope-from frederique@isafeelin.org) Received: from progress.isafeelin.org (progress.isafeelin.org [84.244.146.92]) by mx1.freebsd.org (Postfix) with ESMTP id 890F98FC0A for ; Fri, 6 Mar 2009 06:37:21 +0000 (UTC) (envelope-from frederique@isafeelin.org) Received: from progress.isafeelin.org (localhost [127.0.0.1]) by progress.isafeelin.org (Postfix) with ESMTP id 6E710130D2F; Fri, 6 Mar 2009 07:21:20 +0100 (CET) Received: from s55919a03.adsl.wanadoo.nl (s55919a03.adsl.wanadoo.nl [85.145.154.3]) (using SSLv3 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by progress.isafeelin.org (Postfix) with ESMTPSA id 31827130D2E; Fri, 6 Mar 2009 07:21:20 +0100 (CET) Received: from [192.168.1.15] (unknown [192.168.1.15]) by s55919a03.adsl.wanadoo.nl (Postfix) with ESMTP id 8A4339581C; Fri, 6 Mar 2009 07:22:46 +0100 (CET) Message-ID: <49B0C0DD.80803@isafeelin.org> Date: Fri, 06 Mar 2009 07:21:17 +0100 From: Frederique Rijsdijk User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) MIME-Version: 1.0 To: mister.olli@googlemail.com References: <1236275168.16526.73.camel@phoenix.blechhirn.net> In-Reply-To: <1236275168.16526.73.camel@phoenix.blechhirn.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP Cc: freebsd-questions@freebsd.org Subject: Re: Monitoring geom 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: Fri, 06 Mar 2009 06:37:22 -0000 Mister Olli wrote: > Hi hi... > > What is the best way to monitor geom software raids (gmirror & gvinum > raid5)??? > > The solution I'm searching for should be a kind of script which checks > the status, and drops me an email if something is wrong. > > I found a nagios plugin, but currently I'm unable to invest enough time > to get nagios up and running for the customer... > > Thanks a lot... > > greetz > Olli > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" I monitor some machines with geom mirrors via Nagios/SNMP. In nagios: -------------------------------------------------------------- define service{ use generic-service host_name host.name.com service_description gmirror check_command check_snmp!1!0!UCD-SNMP-MIB::extOutput.1 } On the machine in snmpd.conf (net-snmp): -------------------------------------------------------------- exec gmirror /usr/local/sbin/checkgmirror The script: -------------------------------------------------------------- #!/bin/sh mirrorstate=`/sbin/gmirror list | /usr/bin/grep ^State |\ /usr/bin/awk '{print $2}'` if [ $mirrorstate != "COMPLETE" ] then echo "1" else echo "0" fi Besides crafthing something of your own, there is also: /usr/ports/net-mgmt/nagios-geom This is a small Nagios plugin written in PERL and designed to monitor the state of FreeBSD GEOM devices (specifically mirrors and striped volumes) from Nagios. WWW: http://www.geocities.com/ntb4real/proj/geom.htm To use in Nagios: In checkcommands.cfg: -------------------------------------------------------------- define command{ command_name check_geom command_line $USER1$/check_geom $ARG1$ $ARG2$ } In your host.cfg: -------------------------------------------------------------- define service{ use local-service host_name host.name.conf service_description mirror check_command check_geom!mirror!gm0 }