From owner-freebsd-questions@FreeBSD.ORG Fri Mar 6 09:07:12 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 EFC821065678 for ; Fri, 6 Mar 2009 09:07:11 +0000 (UTC) (envelope-from mister.olli@googlemail.com) Received: from mail-bw0-f164.google.com (mail-bw0-f164.google.com [209.85.218.164]) by mx1.freebsd.org (Postfix) with ESMTP id 4B9868FC25 for ; Fri, 6 Mar 2009 09:07:10 +0000 (UTC) (envelope-from mister.olli@googlemail.com) Received: by bwz8 with SMTP id 8so249931bwz.43 for ; Fri, 06 Mar 2009 01:07:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:subject:from:reply-to:to:cc :in-reply-to:references:content-type:date:message-id:mime-version :x-mailer:content-transfer-encoding; bh=YWh5uqTrfVvMAJzn0pziRt+1beYQUEPpyynJnjaHSZ8=; b=K2Ug2FtxiLnEFR7oGDyQPS6HGElwVwVA49n/wXUaR51I6wgk1ctZlYw2NNS3AfgNvy OFhM6xEAgC4wZLsFGE1pNS4UkcXKJ/Si947HjrM+9bMmH4E8y8dTEyl6DX5yKaO2fwnd q5n6xPFmQbKvpXHFQImcjHmEwSQAXvIZW71R4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=subject:from:reply-to:to:cc:in-reply-to:references:content-type :date:message-id:mime-version:x-mailer:content-transfer-encoding; b=OkKduOidB2GZkkU+nirhVAH6Lq+MrDirttjsK0zOWWQLynlHov4x0jWOmTyk4kbW31 RtDV6thGS7xuZUeGXHAbjMe12Qg0VgZW484CPWITfrf3alYnJh/rDNmLz6n0LP96TArh qfRtwcmOWgkdKexaNXbzcGPkTeK5k3TXXU3BM= Received: by 10.103.11.7 with SMTP id o7mr938549mui.103.1236330429076; Fri, 06 Mar 2009 01:07:09 -0800 (PST) Received: from ?80.187.238.77? ([80.187.238.77]) by mx.google.com with ESMTPS id s10sm1275157muh.52.2009.03.06.01.07.01 (version=SSLv3 cipher=RC4-MD5); Fri, 06 Mar 2009 01:07:08 -0800 (PST) From: Mister Olli To: Frederique Rijsdijk In-Reply-To: <49B0C0DD.80803@isafeelin.org> References: <1236275168.16526.73.camel@phoenix.blechhirn.net> <49B0C0DD.80803@isafeelin.org> Content-Type: text/plain Date: Fri, 06 Mar 2009 10:05:59 +0100 Message-Id: <1236330359.4395.7.camel@phoenix.blechhirn.net> Mime-Version: 1.0 X-Mailer: Evolution 2.12.3 Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: Monitoring geom X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: mister.olli@googlemail.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2009 09:07:12 -0000 Hi, thanks for the tip, but somehow nagios is completly overdosed for the customer I'm installing this thing for... Seems like there's no way than coding it myself... greetz olli Am Freitag, den 06.03.2009, 07:21 +0100 schrieb Frederique Rijsdijk: > 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 > } >