mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-10 07:04:03 +00:00
Remove expired port:
2014-03-10 net-mgmt/nagios-pf-plugin: No more public distfiles
This commit is contained in:
parent
c9a690d33c
commit
bd2cee9b51
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=347743
1
MOVED
1
MOVED
@ -5698,3 +5698,4 @@ graphics/gsnapshot||2014-03-10|Has expired: No more public distfiles
|
||||
japanese/zangband||2014-03-10|Has expired: No more public distfiles
|
||||
audio/xmms-wma||2014-03-10|Has expired: No more public distfiles
|
||||
misc/projectionlib||2014-03-10|Has expired: No more public distfiles
|
||||
net-mgmt/nagios-pf-plugin||2014-03-10|Has expired: No more public distfiles
|
||||
|
@ -131,7 +131,6 @@
|
||||
SUBDIR += nagios-check_tftp
|
||||
SUBDIR += nagios-geom
|
||||
SUBDIR += nagios-openldap-plugins
|
||||
SUBDIR += nagios-pf-plugin
|
||||
SUBDIR += nagios-plugins
|
||||
SUBDIR += nagios-portaudit
|
||||
SUBDIR += nagios-silfreed-plugins
|
||||
|
@ -1,48 +0,0 @@
|
||||
# Created by: Kian Mohageri <kian.mohageri@gmail.com>
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= nagios-pf-plugin
|
||||
PORTVERSION= 0.1
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= net-mgmt
|
||||
MASTER_SITES= http://www.zampanosbits.com/check_pf/ \
|
||||
http://restek.wwu.edu/~kian/
|
||||
DISTNAME= check_pf-${PORTVERSION}
|
||||
|
||||
MAINTAINER= ports@FreeBSD.org
|
||||
COMMENT= Nagios plugin for checking PF
|
||||
|
||||
DEPRECATED= No more public distfiles
|
||||
EXPIRATION_DATE= 2014-03-10
|
||||
|
||||
NAGIOS_PLUGIN_DIR?= libexec/nagios/
|
||||
|
||||
PLIST_FILES= ${NAGIOS_PLUGIN_DIR}/check_pf
|
||||
PLIST_DIRS= ${NAGIOS_PLUGIN_DIR}
|
||||
SUB_FILES= pkg-message
|
||||
SUB_LIST= NAGIOS_PLUGIN_DIR=${NAGIOS_PLUGIN_DIR}
|
||||
|
||||
NO_STAGE= yes
|
||||
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-su-install:
|
||||
@${MKDIR} ${PREFIX}/${NAGIOS_PLUGIN_DIR}
|
||||
|
||||
post-install:
|
||||
@${CAT} ${PKGMESSAGE}
|
||||
|
||||
.include <bsd.port.mk>
|
@ -1,2 +0,0 @@
|
||||
SHA256 (check_pf-0.1.tar.gz) = 26109ee18f439045c89c24a773877c9bf0b986154d638898aaaef3a9f9e6e92a
|
||||
SIZE (check_pf-0.1.tar.gz) = 3195
|
@ -1,74 +0,0 @@
|
||||
--- ./check_pf.c.orig 2007-03-08 07:19:40.000000000 +0100
|
||||
+++ ./check_pf.c 2010-01-03 00:24:23.000000000 +0100
|
||||
@@ -70,12 +70,13 @@
|
||||
int ch, wflag, cflag, dev;
|
||||
int states_warning;
|
||||
int states_critical;
|
||||
+ int show_perf=0;
|
||||
|
||||
pf_device = "/dev/pf";
|
||||
|
||||
wflag = cflag = 0;
|
||||
|
||||
- while ((ch = getopt(argc, argv, "Vhw:c:")) != -1) {
|
||||
+ while ((ch = getopt(argc, argv, "Vhpw:c:")) != -1) {
|
||||
switch (ch) {
|
||||
case 'V':
|
||||
version();
|
||||
@@ -84,6 +85,9 @@
|
||||
case 'h':
|
||||
help();
|
||||
break;
|
||||
+ case 'p':
|
||||
+ show_perf = 1;
|
||||
+ break;
|
||||
case 'w':
|
||||
wflag = 1;
|
||||
states_warning = strtonum(optarg, 0, ULONG_MAX,
|
||||
@@ -151,19 +155,34 @@
|
||||
}
|
||||
|
||||
if (ps.states >= states_critical) {
|
||||
- (void)printf("PF CRITICAL - states: %u (%.1f%% - limit: %u)\n",
|
||||
+ (void)printf("PF CRITICAL - states: %u (%.1f%% - limit: %u)",
|
||||
ps.states, percent, pl.limit);
|
||||
+ if(!show_perf)
|
||||
+ (void)printf("\n");
|
||||
+ else
|
||||
+ (void)printf("|current=%u;%u;%u; percent=%.1f%%; limit=%u;\n",
|
||||
+ ps.states, states_warning, states_critical, percent, pl.limit);
|
||||
return (STATE_CRITICAL);
|
||||
}
|
||||
|
||||
if (ps.states >= states_warning) {
|
||||
- (void)printf("PF WARNING - states: %u (%.1f%% - limit: %u)\n",
|
||||
+ (void)printf("PF WARNING - states: %u (%.1f%% - limit: %u)",
|
||||
ps.states, percent, pl.limit);
|
||||
+ if(!show_perf)
|
||||
+ (void)printf("\n");
|
||||
+ else
|
||||
+ (void)printf("|current=%u;%u;%u; percent=%.1f%%; limit=%u;\n",
|
||||
+ ps.states, states_warning, states_critical, percent, pl.limit);
|
||||
return (STATE_WARNING);
|
||||
}
|
||||
|
||||
- (void)printf("PF OK - states: %u (%.1f%% - limit: %u)\n",
|
||||
+ (void)printf("PF OK - states: %u (%.1f%% - limit: %u)",
|
||||
ps.states, percent, pl.limit);
|
||||
+ if(!show_perf)
|
||||
+ (void)printf("\n");
|
||||
+ else
|
||||
+ (void)printf("|current=%u;%u;%u; percent=%.1f%%; limit=%u;\n",
|
||||
+ ps.states, states_warning, states_critical, percent, pl.limit);
|
||||
return (STATE_OK);
|
||||
}
|
||||
|
||||
@@ -183,6 +202,8 @@
|
||||
(void)fprintf(stderr, " ");
|
||||
(void)fprintf(stderr, "-h - Print the plugin help\n");
|
||||
(void)fprintf(stderr, " ");
|
||||
+ (void)fprintf(stderr, "-p - Display additional nagios performance data\n");
|
||||
+ (void)fprintf(stderr, " ");
|
||||
(void)fprintf(stderr, "-w number - Warning when <number> states"
|
||||
" (default: %u%% of state limit)\n", DEFAULT_WARN_PERCENT);
|
||||
(void)fprintf(stderr, " ");
|
@ -1,21 +0,0 @@
|
||||
|
||||
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.
|
||||
|
||||
http://www.zampanosbits.com/check_pf/
|
||||
|
@ -1,6 +0,0 @@
|
||||
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/
|
Loading…
Reference in New Issue
Block a user