diff options
author | Wesley Shields <wxs@FreeBSD.org> | 2008-12-23 20:14:48 +0000 |
---|---|---|
committer | Wesley Shields <wxs@FreeBSD.org> | 2008-12-23 20:14:48 +0000 |
commit | 178eb5bf76af87b8a01d221e6d1321c874fe5e11 (patch) | |
tree | 57e3b9933cf9b2750547db5b95489051ca3953a3 /net-mgmt/nagios-geom | |
parent | 0d7150ecbc8adecce11c5b3c27bca3ef940e63e3 (diff) | |
download | ports-178eb5bf76af87b8a01d221e6d1321c874fe5e11.tar.gz ports-178eb5bf76af87b8a01d221e6d1321c874fe5e11.zip |
Notes
Diffstat (limited to 'net-mgmt/nagios-geom')
-rw-r--r-- | net-mgmt/nagios-geom/Makefile | 9 | ||||
-rw-r--r-- | net-mgmt/nagios-geom/distinfo | 6 | ||||
-rw-r--r-- | net-mgmt/nagios-geom/files/patch-add-perfdata | 14 | ||||
-rw-r--r-- | net-mgmt/nagios-geom/files/patch-check_geom | 38 | ||||
-rw-r--r-- | net-mgmt/nagios-geom/files/patch-fix-class-logics | 13 |
5 files changed, 36 insertions, 44 deletions
diff --git a/net-mgmt/nagios-geom/Makefile b/net-mgmt/nagios-geom/Makefile index 92e6795790a7..df2e9ce1f9ae 100644 --- a/net-mgmt/nagios-geom/Makefile +++ b/net-mgmt/nagios-geom/Makefile @@ -6,11 +6,13 @@ # PORTNAME= geom -PORTVERSION= 1.0 +PORTVERSION= 1.3 CATEGORIES= net-mgmt -MASTER_SITES= http://www.geocities.com/ntb4real/proj/ +MASTER_SITES= http://www.geocities.com/ntb4real/proj/ \ + ${MASTER_SITE_LOCAL} +MASTER_SITE_SUBDIR= wxs PKGNAMEPREFIX= nagios- -DISTNAME= check_geom +DISTNAME= check_geom-${PORTVERSION} MAINTAINER= rea-fbsd@codelabs.ru COMMENT= Nagios plug-in to get geom(8) components status @@ -18,6 +20,7 @@ COMMENT= Nagios plug-in to get geom(8) components status USE_PERL5= yes NO_WRKSUBDIR= yes NO_BUILD= yes +PATCH_STRIP= -p1 do-install: @${MKDIR} ${PREFIX}/libexec/nagios diff --git a/net-mgmt/nagios-geom/distinfo b/net-mgmt/nagios-geom/distinfo index e78bca18c650..f06f4f27f83d 100644 --- a/net-mgmt/nagios-geom/distinfo +++ b/net-mgmt/nagios-geom/distinfo @@ -1,3 +1,3 @@ -SIZE (check_geom.tar.gz) = 1545 -MD5 (check_geom.tar.gz) = ec6aa5d69b0693a71cf0129016507d0f -SHA256 (check_geom.tar.gz) = ba787de1ac1df400151f8bde5b3db15af4ca2f3a3e8ec4f48c30052091f30444 +MD5 (check_geom-1.3.tar.gz) = f0744072bb1a7c5c7adf5f6c5c45aad0 +SHA256 (check_geom-1.3.tar.gz) = 363c0a000dc30805e53cb4674b46902997b4db717c5128a04c56528b62da4513 +SIZE (check_geom-1.3.tar.gz) = 1558 diff --git a/net-mgmt/nagios-geom/files/patch-add-perfdata b/net-mgmt/nagios-geom/files/patch-add-perfdata new file mode 100644 index 000000000000..26897a9016a2 --- /dev/null +++ b/net-mgmt/nagios-geom/files/patch-add-perfdata @@ -0,0 +1,14 @@ +diff --git a/check_geom b/check_geom +index e7c776c..d8c1402 100755 +--- a/check_geom ++++ b/check_geom +@@ -127,6 +127,8 @@ if ($state ne "OK") { + } + + #goats away! +-$msg = sprintf "%s/%s %s { %s }\n", $class, $volume, $status, $compo; ++my $perfdata = sprintf "%s=%d;;;0;", "geom_" . $class, $found; ++$msg = sprintf "%s/%s %s { %s }|%s\n", $class, $volume, $status, $compo, ++ $perfdata; + print $state, " ", $msg; + exit ($ERRORS{$state}); diff --git a/net-mgmt/nagios-geom/files/patch-check_geom b/net-mgmt/nagios-geom/files/patch-check_geom deleted file mode 100644 index 39d54aaa129b..000000000000 --- a/net-mgmt/nagios-geom/files/patch-check_geom +++ /dev/null @@ -1,38 +0,0 @@ ---- check_geom.orig 2007-07-03 15:55:27.000000000 +0400 -+++ check_geom 2008-08-20 15:30:57.000000000 +0400 -@@ -33,6 +33,7 @@ - my %ERRORS=('DEPENDENT'=>4,'UNKNOWN'=>3,'OK'=>0,'WARNING'=>1,'CRITICAL'=>2); - my $state="UNKNOWN"; - my $msg="FAILURE"; -+my $perfdata=""; - - if ($#ARGV < 1) { - print "Not enough arguments!\nUsage: $0 <class> <device>\n"; -@@ -63,7 +64,7 @@ - - chomp; - if ($found) { -- if (/^$class\//) { -+ if (/^\s*$class\//) { - last; - } else { - my ($vgh) = /\s+(.*)/; -@@ -72,7 +73,7 @@ - } - } - -- if (/$class\/$volume/) { -+ if (/^\s*$class\/$volume/) { - ($name, $status, $compo) = /(\S+)\s+(\S+)\s+(.*)$/; - $found=1; - } -@@ -127,6 +128,7 @@ - } - - #goats away! --$msg = sprintf "%s/%s %s { %s }\n", $class, $volume, $status, $compo; --print $state, " ", $msg; -+$msg = sprintf "%s/%s %s { %s }", $class, $volume, $status, $compo; -+$perfdata = sprintf "%s=%d;;;0;", "geom_" . $class, $found; -+print $state, " ", $msg, "|", $perfdata, "\n"; - exit ($ERRORS{$state}); diff --git a/net-mgmt/nagios-geom/files/patch-fix-class-logics b/net-mgmt/nagios-geom/files/patch-fix-class-logics new file mode 100644 index 000000000000..37794ccf8eb3 --- /dev/null +++ b/net-mgmt/nagios-geom/files/patch-fix-class-logics @@ -0,0 +1,13 @@ +diff --git a/check_geom b/check_geom +index e35be05..e7c776c 100755 +--- a/check_geom ++++ b/check_geom +@@ -92,7 +92,7 @@ if (($class eq "mirror" || $class eq "raid3") && $status =~ /COMPLETE/ ) { + $state = "OK"; + } + +-if ($class eq "stripe" || $class eq "concat" || $class eq "shsec" && $status =~ /UP/) { ++if (($class eq "stripe" || $class eq "concat" || $class eq "shsec") && $status =~ /UP/) { + $state = "OK"; + } + |