diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /net-analyzer/pnp4nagios/files |
reinit the tree, so we can have metadata
Diffstat (limited to 'net-analyzer/pnp4nagios/files')
6 files changed, 230 insertions, 0 deletions
diff --git a/net-analyzer/pnp4nagios/files/98_pnp4nagios-2.4.conf b/net-analyzer/pnp4nagios/files/98_pnp4nagios-2.4.conf new file mode 100644 index 000000000000..5944a2e2f70f --- /dev/null +++ b/net-analyzer/pnp4nagios/files/98_pnp4nagios-2.4.conf @@ -0,0 +1,29 @@ +<IfDefine PNP> + + Alias /pnp4nagios /usr/share/pnp/ + + <Directory /usr/share/pnp> + AllowOverride AuthConfig + Require all granted + + <IfModule rewrite_module> + # Turn on URL rewriting + RewriteEngine On + Options +FollowSymLinks + + # Installation directory + RewriteBase /pnp4nagios + + # Protect application and system files from being viewed + RewriteRule ^(application|modules|system) - [F,L] + + # Allow any files or directories that exist to be displayed directly + RewriteCond %{REQUEST_FILENAME} !-f + RewriteCond %{REQUEST_FILENAME} !-d + + # Rewrite all other URLs to index.php/URL + RewriteRule .* index.php/$0 [PT,L] + </IfModule> + </Directory> + +</IfDefine> diff --git a/net-analyzer/pnp4nagios/files/98_pnp4nagios.conf b/net-analyzer/pnp4nagios/files/98_pnp4nagios.conf new file mode 100644 index 000000000000..4879779a8f93 --- /dev/null +++ b/net-analyzer/pnp4nagios/files/98_pnp4nagios.conf @@ -0,0 +1,22 @@ +<IfDefine PNP> + Alias /pnp4nagios /usr/share/pnp/ + <Directory /usr/share/pnp> + AllowOverride AuthConfig + Order allow,deny + Allow from all + <IfModule mod_rewrite.c> + # Turn on URL rewriting + RewriteEngine On + Options FollowSymLinks + # Installation directory + RewriteBase /pnp4nagios + # Protect application and system files from being viewed + RewriteRule ^(application|modules|system) - [F,L] + # Allow any files or directories that exist to be displayed directly + RewriteCond %{REQUEST_FILENAME} !-f + RewriteCond %{REQUEST_FILENAME} !-d + # Rewrite all other URLs to index.php/URL + RewriteRule .* index.php/$0 [PT,L] + </IfModule> + </Directory> +</IfDefine> diff --git a/net-analyzer/pnp4nagios/files/npcd b/net-analyzer/pnp4nagios/files/npcd new file mode 100644 index 000000000000..9ae67362d645 --- /dev/null +++ b/net-analyzer/pnp4nagios/files/npcd @@ -0,0 +1,36 @@ +#!/sbin/openrc-run +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +opts="${opts} reload" + +depend() { + need net +} + +start() { + ebegin "Starting npcd" + start-stop-daemon --start --exec /usr/bin/npcd \ + -- -f /etc/pnp/npcd.cfg \ + -d + eend $? "Failed to Start npcd" +} + +stop() { + ebegin "Stopping npcd" + start-stop-daemon --stop --quiet -n npcd + eend $? "Failed to Stop npcd" +} + +reload() { + ebegin "Reloading npcd" + kill -HUP `pgrep npcd` + eend $? "Failed to reload npcd" +} + +restart() { + ebegin "Restarting npcd" + svc_stop + svc_start + eend $? "Failed to Restart npcd" +} diff --git a/net-analyzer/pnp4nagios/files/npcd.initd b/net-analyzer/pnp4nagios/files/npcd.initd new file mode 100644 index 000000000000..23eb77aa63a4 --- /dev/null +++ b/net-analyzer/pnp4nagios/files/npcd.initd @@ -0,0 +1,18 @@ +#!/sbin/openrc-run +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +extra_started_commands="reload" + +command="/usr/bin/npcd" +command_args="-f /etc/pnp/npcd.cfg -d" + +depend() { + need net +} + +reload() { + ebegin "Reloading npcd" + kill -HUP `pgrep npcd` + eend $? "Failed to reload npcd" +} diff --git a/net-analyzer/pnp4nagios/files/pnp4nagios-0.6.14-makefile.patch b/net-analyzer/pnp4nagios/files/pnp4nagios-0.6.14-makefile.patch new file mode 100644 index 000000000000..469389d3ee31 --- /dev/null +++ b/net-analyzer/pnp4nagios/files/pnp4nagios-0.6.14-makefile.patch @@ -0,0 +1,32 @@ +diff -Naur pnp4nagios-0.6.14.orig/src/Makefile.in pnp4nagios-0.6.14/src/Makefile.in +--- pnp4nagios-0.6.14.orig/src/Makefile.in 2011-08-10 17:18:46.000000000 +0200 ++++ pnp4nagios-0.6.14/src/Makefile.in 2011-08-10 17:19:51.000000000 +0200 +@@ -83,7 +83,7 @@ + # + ############################### + npcd: npcd.c $(NPCDOBJS) $(NPCDHEAD) +- $(CC) $(CFLAGS) -o $@ npcd.c $(NPCDOBJS) -lpthread ++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ npcd.c $(NPCDOBJS) -lpthread + + ############################### + # +@@ -118,7 +118,6 @@ + + install: + $(MAKE) install-basic +- $(MAKE) strip-post-install + + install-unstripped: + $(MAKE) install-basic +diff -Naur pnp4nagios-0.6.14.orig/configure pnp4nagios-0.6.14/configure +--- pnp4nagios-0.6.14.orig/configure 2011-08-12 09:01:12.000000000 +0200 ++++ pnp4nagios-0.6.14/configure 2011-08-12 09:03:32.000000000 +0200 +@@ -5565,7 +5565,7 @@ + PERFDATA_LOG="${localstatedir}/perfdata.log" + PERFDATA_DIR="${localstatedir}/perfdata" + PERFDATA_SPOOL_DIR="${localstatedir}/spool" +- mandir="\${prefix}/man" ++ mandir="/usr/share/man" + ;; + esac + diff --git a/net-analyzer/pnp4nagios/files/pnp4nagios-0.6.25-rrdtool-0.6.0-support.patch b/net-analyzer/pnp4nagios/files/pnp4nagios-0.6.25-rrdtool-0.6.0-support.patch new file mode 100644 index 000000000000..1a16d771c7b3 --- /dev/null +++ b/net-analyzer/pnp4nagios/files/pnp4nagios-0.6.25-rrdtool-0.6.0-support.patch @@ -0,0 +1,93 @@ +From 0a539e1c7ab03ec015c27e4ad0fe16343a98c269 Mon Sep 17 00:00:00 2001 +From: Louis Sautier <sautier.louis@gmail.com> +Date: Mon, 25 Apr 2016 12:31:49 +0200 +Subject: [PATCH] Use complete option arguments for compatibility with rrdtool + 1.6.0 + +Since rrdtool switched to optparse, it seems that complete option +arguments must be used: +https://github.com/oetiker/rrdtool-1.x/commit/83530d3e43cebc32da157733d35c60bf4bb098da +--- + share/pnp/templates.dist/check_dns.php | 2 +- + share/pnp/templates.dist/check_multi.php | 2 +- + share/pnp/templates.dist/check_ping_tick.php | 2 +- + share/pnp/templates.dist/check_users.php | 2 +- + share/pnp/templates.dist/default.php | 6 +++--- + 5 files changed, 7 insertions(+), 7 deletions(-) + +diff --git a/share/pnp/templates.dist/check_dns.php b/share/pnp/templates.dist/check_dns.php +index b8ab048..dad209a 100644 +--- a/share/pnp/templates.dist/check_dns.php ++++ b/share/pnp/templates.dist/check_dns.php +@@ -4,7 +4,7 @@ + # Template for check_dns + # + +-$opt[1] = "--lower=$MIN[1] --vertical-label $UNIT[1] --title \"DNS Response Time\" "; ++$opt[1] = "--lower-limit=$MIN[1] --vertical-label $UNIT[1] --title \"DNS Response Time\" "; + + + $def[1] = "DEF:var1=$RRDFILE[1]:$DS[1]:AVERAGE " ; +diff --git a/share/pnp/templates.dist/check_multi.php b/share/pnp/templates.dist/check_multi.php +index ba6bcd1..cd0794a 100644 +--- a/share/pnp/templates.dist/check_multi.php ++++ b/share/pnp/templates.dist/check_multi.php +@@ -4,7 +4,7 @@ + # Template for check_multi + # + +-$opt[1] = "--lower=$MIN[1] --vertical-label num --title \"Number of Checks\" "; ++$opt[1] = "--lower-limit=$MIN[1] --vertical-label num --title \"Number of Checks\" "; + $ds_name[1] = "Executed Plugins"; + + $def[1] = "DEF:var1=$RRDFILE[1]:$DS[1]:AVERAGE " ; +diff --git a/share/pnp/templates.dist/check_ping_tick.php b/share/pnp/templates.dist/check_ping_tick.php +index 865479f..f191049 100644 +--- a/share/pnp/templates.dist/check_ping_tick.php ++++ b/share/pnp/templates.dist/check_ping_tick.php +@@ -6,7 +6,7 @@ + # RTA + # + $ds_name[1] = "Round Trip Times"; +-$opt[1] = "--lower=0 --vertical-label \"RTA\" --title \"Ping times\" "; ++$opt[1] = "--lower-limit=0 --vertical-label \"RTA\" --title \"Ping times\" "; + $opt[1] .= rrd::darkteint(); + $def[1] = rrd::def("var1", $RRDFILE[1], $DS[1], "AVERAGE") ; + $def[1] .= rrd::ticker("var1", $WARN[1], $CRIT[1]) ; +diff --git a/share/pnp/templates.dist/check_users.php b/share/pnp/templates.dist/check_users.php +index 9fe878d..c66fc01 100644 +--- a/share/pnp/templates.dist/check_users.php ++++ b/share/pnp/templates.dist/check_users.php +@@ -4,7 +4,7 @@ + # Template for check_users + # + +-$opt[1] = "--lower=$MIN[1] --vertical-label \"Users\" --title \"Users\" "; ++$opt[1] = "--lower-limit=$MIN[1] --vertical-label \"Users\" --title \"Users\" "; + + + $def[1] = "DEF:var1=$RRDFILE[1]:$DS[1]:MAX " ; +diff --git a/share/pnp/templates.dist/default.php b/share/pnp/templates.dist/default.php +index 6fdf38c..823ee6a 100644 +--- a/share/pnp/templates.dist/default.php ++++ b/share/pnp/templates.dist/default.php +@@ -47,7 +47,7 @@ + $crit_min = $VAL['CRIT_MIN']; + } + if ( $VAL['MIN'] != "" && is_numeric($VAL['MIN']) ) { +- $lower = " --lower=" . $VAL['MIN']; ++ $lower = " --lower-limit=" . $VAL['MIN']; + $minimum = $VAL['MIN']; + } + if ( $VAL['MAX'] != "" && is_numeric($VAL['MAX']) ) { +@@ -55,8 +55,8 @@ + } + if ($VAL['UNIT'] == "%%") { + $vlabel = "%"; +- $upper = " --upper=101 "; +- $lower = " --lower=0 "; ++ $upper = " --upper-limit=101 "; ++ $lower = " --lower-limit=0 "; + } + else { + $vlabel = $VAL['UNIT']; |