aboutsummaryrefslogtreecommitdiff
path: root/net-mgmt
diff options
context:
space:
mode:
authorMartin Wilke <miwi@FreeBSD.org>2007-03-09 10:11:58 +0000
committerMartin Wilke <miwi@FreeBSD.org>2007-03-09 10:11:58 +0000
commit419210ee8c70f426520cb1dd3981508b81e0a315 (patch)
tree422b478edde25a0be3adf1b28ec9b68d97ddd046 /net-mgmt
parent7589c1d5224a71b3df6dfa1ce20cdb3e8f164636 (diff)
downloadports-419210ee8c70f426520cb1dd3981508b81e0a315.tar.gz
ports-419210ee8c70f426520cb1dd3981508b81e0a315.zip
check_pf is a plugin intended for use with the Nagios network
monitoring system. This plugin checks the status of PF, the OpenBSD packet filter, and compares the current state count to given or default thresholds, returning the result. It is written in C. WWW: http://www.zampanosbits.com/check_pf/ PR: ports/110112 Submitted by: Kian Mohageri <kian.mohageri at gmail.com>
Notes
Notes: svn path=/head/; revision=186977
Diffstat (limited to 'net-mgmt')
-rw-r--r--net-mgmt/Makefile1
-rw-r--r--net-mgmt/nagios-pf-plugin/Makefile47
-rw-r--r--net-mgmt/nagios-pf-plugin/distinfo3
-rw-r--r--net-mgmt/nagios-pf-plugin/files/pkg-message.in21
-rw-r--r--net-mgmt/nagios-pf-plugin/pkg-descr6
5 files changed, 78 insertions, 0 deletions
diff --git a/net-mgmt/Makefile b/net-mgmt/Makefile
index 4d525248e366..846f461c5f94 100644
--- a/net-mgmt/Makefile
+++ b/net-mgmt/Makefile
@@ -89,6 +89,7 @@
SUBDIR += mtrace
SUBDIR += nagcon
SUBDIR += nagios
+ SUBDIR += nagios-pf-plugin
SUBDIR += nagios-plugins
SUBDIR += nagios-radauth-plugin
SUBDIR += nagios-silfreed-plugins
diff --git a/net-mgmt/nagios-pf-plugin/Makefile b/net-mgmt/nagios-pf-plugin/Makefile
new file mode 100644
index 000000000000..30c7e705313d
--- /dev/null
+++ b/net-mgmt/nagios-pf-plugin/Makefile
@@ -0,0 +1,47 @@
+# New ports collection makefile for: nagios-pf-plugin
+# Date created: 2007-03-08
+# Whom: Kian Mohageri <kian.mohageri@gmail.com>
+#
+# $FreeBSD$
+#
+
+PORTNAME= nagios-pf-plugin
+PORTVERSION= 0.1
+CATEGORIES= net-mgmt
+MASTER_SITES= http://www.zampanosbits.com/check_pf/
+DISTNAME= check_pf-${PORTVERSION}
+
+MAINTAINER= kian.mohageri@gmail.com
+COMMENT= Nagios plugin for checking PF
+
+NAGIOS_PLUGIN_DIR?= libexec/nagios/
+
+PLIST_FILES= ${NAGIOS_PLUGIN_DIR}/check_pf
+PLIST_DIRS= ${NAGIOS_PLUGIN_DIR}
+SUB_FILES= pkg-message
+SUB_LIST= MASTER_SITES=${MASTER_SITES} \
+ NAGIOS_PLUGIN_DIR=${NAGIOS_PLUGIN_DIR}
+
+pre-everything::
+ @${ECHO_MSG} ""
+ @${ECHO_MSG} "You can redefine the following additional variables:"
+ @${ECHO_MSG} ""
+ @${ECHO_MSG} " NAGIOS_PLUGIN_DIR=${NAGIOS_PLUGIN_DIR}"
+ @${ECHO_MSG} ""
+ @${ECHO_MSG} "The plugin directory is relative to PREFIX:"
+ @${ECHO_MSG} ""
+ @${ECHO_MSG} " PREFIX=${PREFIX}"
+ @${ECHO_MSG} ""
+
+post-patch:
+ ${REINPLACE_CMD} -e \
+ "s,/usr/local/libexec/nagios,${PREFIX}/${NAGIOS_PLUGIN_DIR}," \
+ ${WRKSRC}/Makefile
+
+pre-install:
+ @${MKDIR} ${PREFIX}/${NAGIOS_PLUGIN_DIR}
+
+post-install:
+ @${CAT} ${PKGMESSAGE}
+
+.include <bsd.port.mk>
diff --git a/net-mgmt/nagios-pf-plugin/distinfo b/net-mgmt/nagios-pf-plugin/distinfo
new file mode 100644
index 000000000000..0bb29af779ba
--- /dev/null
+++ b/net-mgmt/nagios-pf-plugin/distinfo
@@ -0,0 +1,3 @@
+MD5 (check_pf-0.1.tar.gz) = ac81f67b7c895134e7c0af87248c54e2
+SHA256 (check_pf-0.1.tar.gz) = 26109ee18f439045c89c24a773877c9bf0b986154d638898aaaef3a9f9e6e92a
+SIZE (check_pf-0.1.tar.gz) = 3195
diff --git a/net-mgmt/nagios-pf-plugin/files/pkg-message.in b/net-mgmt/nagios-pf-plugin/files/pkg-message.in
new file mode 100644
index 000000000000..4c320be3ad01
--- /dev/null
+++ b/net-mgmt/nagios-pf-plugin/files/pkg-message.in
@@ -0,0 +1,21 @@
+
+check_pf has been installed to %%PREFIX%%/%%NAGIOS_PLUGIN_DIR%%.
+
+check_pf needs read permission to the pf(4) pseudo-device, i.e. /dev/pf.
+
+Assuming check_pf will be run by user `nagios', the following will work:
+
+ # chmod 640 /dev/pf
+ # chgrp nagios /dev/pf
+
+To make sure the change persists across reboots, add the following
+to /etc/devfs.conf:
+
+ # nrpe2/nagios needs to be able to read statistics
+ own pf root:nagios
+ perm pf 0640
+
+Please refer to the online documentation for additional information.
+
+%%MASTER_SITES%%
+
diff --git a/net-mgmt/nagios-pf-plugin/pkg-descr b/net-mgmt/nagios-pf-plugin/pkg-descr
new file mode 100644
index 000000000000..83df273d2470
--- /dev/null
+++ b/net-mgmt/nagios-pf-plugin/pkg-descr
@@ -0,0 +1,6 @@
+check_pf is a plugin intended for use with the Nagios network
+monitoring system. This plugin checks the status of PF, the OpenBSD
+packet filter, and compares the current state count to given or default
+thresholds, returning the result. It is written in C.
+
+WWW: http://www.zampanosbits.com/check_pf/