aboutsummaryrefslogtreecommitdiff
path: root/net-mgmt/nagios-geom
diff options
context:
space:
mode:
authorPhilip M. Gollucci <pgollucci@FreeBSD.org>2008-08-22 16:41:13 +0000
committerPhilip M. Gollucci <pgollucci@FreeBSD.org>2008-08-22 16:41:13 +0000
commit1a24ed133681ff26a7e4bce681864beaaf28f931 (patch)
tree893aa101cd79a9ffb2cb4c4ecf520457f49ecd23 /net-mgmt/nagios-geom
parent09ece96a0f65b5df2bbbb0c577248bc0581464bc (diff)
downloadports-1a24ed133681ff26a7e4bce681864beaaf28f931.tar.gz
ports-1a24ed133681ff26a7e4bce681864beaaf28f931.zip
Notes
Diffstat (limited to 'net-mgmt/nagios-geom')
-rw-r--r--net-mgmt/nagios-geom/Makefile26
-rw-r--r--net-mgmt/nagios-geom/distinfo3
-rw-r--r--net-mgmt/nagios-geom/files/patch-check_geom38
-rw-r--r--net-mgmt/nagios-geom/pkg-descr5
-rw-r--r--net-mgmt/nagios-geom/pkg-plist2
5 files changed, 74 insertions, 0 deletions
diff --git a/net-mgmt/nagios-geom/Makefile b/net-mgmt/nagios-geom/Makefile
new file mode 100644
index 000000000000..92e6795790a7
--- /dev/null
+++ b/net-mgmt/nagios-geom/Makefile
@@ -0,0 +1,26 @@
+# New ports collection makefile for: nagios-geom
+# Date created: 20 August 2008
+# Whom: rea-fbsd@codelabs.ru
+#
+# $FreeBSD$
+#
+
+PORTNAME= geom
+PORTVERSION= 1.0
+CATEGORIES= net-mgmt
+MASTER_SITES= http://www.geocities.com/ntb4real/proj/
+PKGNAMEPREFIX= nagios-
+DISTNAME= check_geom
+
+MAINTAINER= rea-fbsd@codelabs.ru
+COMMENT= Nagios plug-in to get geom(8) components status
+
+USE_PERL5= yes
+NO_WRKSUBDIR= yes
+NO_BUILD= yes
+
+do-install:
+ @${MKDIR} ${PREFIX}/libexec/nagios
+ ${INSTALL_SCRIPT} ${WRKSRC}/check_geom ${PREFIX}/libexec/nagios
+
+.include <bsd.port.mk>
diff --git a/net-mgmt/nagios-geom/distinfo b/net-mgmt/nagios-geom/distinfo
new file mode 100644
index 000000000000..e78bca18c650
--- /dev/null
+++ b/net-mgmt/nagios-geom/distinfo
@@ -0,0 +1,3 @@
+SIZE (check_geom.tar.gz) = 1545
+MD5 (check_geom.tar.gz) = ec6aa5d69b0693a71cf0129016507d0f
+SHA256 (check_geom.tar.gz) = ba787de1ac1df400151f8bde5b3db15af4ca2f3a3e8ec4f48c30052091f30444
diff --git a/net-mgmt/nagios-geom/files/patch-check_geom b/net-mgmt/nagios-geom/files/patch-check_geom
new file mode 100644
index 000000000000..39d54aaa129b
--- /dev/null
+++ b/net-mgmt/nagios-geom/files/patch-check_geom
@@ -0,0 +1,38 @@
+--- 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/pkg-descr b/net-mgmt/nagios-geom/pkg-descr
new file mode 100644
index 000000000000..359b9cb3508f
--- /dev/null
+++ b/net-mgmt/nagios-geom/pkg-descr
@@ -0,0 +1,5 @@
+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
diff --git a/net-mgmt/nagios-geom/pkg-plist b/net-mgmt/nagios-geom/pkg-plist
new file mode 100644
index 000000000000..674fbba4de2c
--- /dev/null
+++ b/net-mgmt/nagios-geom/pkg-plist
@@ -0,0 +1,2 @@
+libexec/nagios/check_geom
+@dirrmtry libexec/nagios