From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Aug 21 09:30:05 2008 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 13469106564A for ; Thu, 21 Aug 2008 09:30:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id E6E6C8FC26 for ; Thu, 21 Aug 2008 09:30:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m7L9U45j091216 for ; Thu, 21 Aug 2008 09:30:04 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m7L9U4i3091215; Thu, 21 Aug 2008 09:30:04 GMT (envelope-from gnats) Resent-Date: Thu, 21 Aug 2008 09:30:04 GMT Resent-Message-Id: <200808210930.m7L9U4i3091215@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Eygene Ryabinkin Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 80DFC106567B for ; Thu, 21 Aug 2008 09:22:39 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) Received: from 0.mx.codelabs.ru (0.mx.codelabs.ru [144.206.177.45]) by mx1.freebsd.org (Postfix) with ESMTP id 3A6B58FC21 for ; Thu, 21 Aug 2008 09:22:39 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) Received: from void.codelabs.ru (void.codelabs.ru [144.206.177.25]) by 0.mx.codelabs.ru with esmtps (TLSv1:CAMELLIA256-SHA:256) id 1KW6NK-000OJb-AR for FreeBSD-gnats-submit@freebsd.org; Thu, 21 Aug 2008 13:22:38 +0400 Message-Id: <20080821092238.2CC741AF41C@void.codelabs.ru> Date: Thu, 21 Aug 2008 13:22:38 +0400 (MSD) From: Eygene Ryabinkin To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/126711: New port: net-mgmt/nagios-geom X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Eygene Ryabinkin List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2008 09:30:05 -0000 >Number: 126711 >Category: ports >Synopsis: New port: net-mgmt/nagios-geom >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Thu Aug 21 09:30:04 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Eygene Ryabinkin >Release: FreeBSD 7.0-STABLE i386 >Organization: Code Labs >Environment: System: FreeBSD XXX 7.0-STABLE FreeBSD 7.0-STABLE #18: Wed Aug 13 11:50:11 MSD 2008 root@XXX:/usr/obj/usr/src/sys/XXX i386 >Description: Nagios plugin to monitor status of geom(8) devices. >How-To-Repeat: $ cut -f 1 -d '|' /usr/ports/INDEX-7 | grep geom tclgeomap-2.11.4 tkgeomap-2.11.4 geomorph-0.40_1 geomview-1.8.1_3 geomgui-0.12_1 >Fix: --- nagios-geom.shar begins here --- # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # nagios-geom # nagios-geom/Makefile # nagios-geom/distinfo # nagios-geom/pkg-plist # nagios-geom/pkg-descr # nagios-geom/files # nagios-geom/files/patch-check_geom # echo c - nagios-geom mkdir -p nagios-geom > /dev/null 2>&1 echo x - nagios-geom/Makefile sed 's/^X//' >nagios-geom/Makefile << 'fe5de4edbd13fef03a104e6dffd94f5d' X# New ports collection makefile for: nagios-geom X# Date created: 20 August 2008 X# Whom: rea-fbsd@codelabs.ru X# X# $FreeBSD$ X# X XPORTNAME= geom XPORTVERSION= 1.0 XCATEGORIES= net-mgmt XMASTER_SITES= http://www.geocities.com/ntb4real/proj/ XPKGNAMEPREFIX= nagios- XDISTNAME= check_geom X XMAINTAINER= rea-fbsd@codelabs.ru XCOMMENT= Nagios plug-in to get geom(8) components status X XUSE_PERL5= yes XNO_WRKSUBDIR= yes XNO_BUILD= yes X Xdo-install: X @${TEST} -d ${PREFIX}/libexec/nagios || \ X ${INSTALL} -d ${PREFIX}/libexec/nagios X ${INSTALL_SCRIPT} ${WRKSRC}/check_geom ${PREFIX}/libexec/nagios X X.include fe5de4edbd13fef03a104e6dffd94f5d echo x - nagios-geom/distinfo sed 's/^X//' >nagios-geom/distinfo << '260a672e0dd622a204d230df706116ed' XSIZE (check_geom.tar.gz) = 1545 XMD5 (check_geom.tar.gz) = ec6aa5d69b0693a71cf0129016507d0f XSHA256 (check_geom.tar.gz) = ba787de1ac1df400151f8bde5b3db15af4ca2f3a3e8ec4f48c30052091f30444 260a672e0dd622a204d230df706116ed echo x - nagios-geom/pkg-plist sed 's/^X//' >nagios-geom/pkg-plist << 'f5a4e272d0c02ace6261041c2c6ce97a' Xlibexec/nagios/check_geom X@dirrmtry libexec/nagios f5a4e272d0c02ace6261041c2c6ce97a echo x - nagios-geom/pkg-descr sed 's/^X//' >nagios-geom/pkg-descr << '43f9ae7db6cf54cc4fc0ca7a8e12d455' XThis is a small Nagios plugin written in PERL and designed to monitor Xthe state of FreeBSD GEOM devices (specifically mirrors and striped Xvolumes) from Nagios. X XWWW: http://www.geocities.com/ntb4real/proj/geom.htm 43f9ae7db6cf54cc4fc0ca7a8e12d455 echo c - nagios-geom/files mkdir -p nagios-geom/files > /dev/null 2>&1 echo x - nagios-geom/files/patch-check_geom sed 's/^X//' >nagios-geom/files/patch-check_geom << 'f1610e79461a0715d9aaea5fe749a93c' X--- check_geom.orig 2007-07-03 15:55:27.000000000 +0400 X+++ check_geom 2008-08-20 15:30:57.000000000 +0400 X@@ -33,6 +33,7 @@ X my %ERRORS=('DEPENDENT'=>4,'UNKNOWN'=>3,'OK'=>0,'WARNING'=>1,'CRITICAL'=>2); X my $state="UNKNOWN"; X my $msg="FAILURE"; X+my $perfdata=""; X X if ($#ARGV < 1) { X print "Not enough arguments!\nUsage: $0 \n"; X@@ -63,7 +64,7 @@ X X chomp; X if ($found) { X- if (/^$class\//) { X+ if (/^\s*$class\//) { X last; X } else { X my ($vgh) = /\s+(.*)/; X@@ -72,7 +73,7 @@ X } X } X X- if (/$class\/$volume/) { X+ if (/^\s*$class\/$volume/) { X ($name, $status, $compo) = /(\S+)\s+(\S+)\s+(.*)$/; X $found=1; X } X@@ -127,6 +128,7 @@ X } X X #goats away! X-$msg = sprintf "%s/%s %s { %s }\n", $class, $volume, $status, $compo; X-print $state, " ", $msg; X+$msg = sprintf "%s/%s %s { %s }", $class, $volume, $status, $compo; X+$perfdata = sprintf "%s=%d;;;0;", "geom_" . $class, $found; X+print $state, " ", $msg, "|", $perfdata, "\n"; X exit ($ERRORS{$state}); f1610e79461a0715d9aaea5fe749a93c exit --- nagios-geom.shar ends here --- >Release-Note: >Audit-Trail: >Unformatted: