X-Original-To: alpine-devel@lists.alpinelinux.org Delivered-To: alpine-devel@mail.alpinelinux.org Received: from mail-yx0-f182.google.com (mail-yx0-f182.google.com [209.85.213.182]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by mail.alpinelinux.org (Postfix) with ESMTPS id C2AFFDC007B for ; Wed, 16 Nov 2011 09:21:55 +0000 (UTC) Received: by yenl11 with SMTP id l11so4861382yen.13 for ; Wed, 16 Nov 2011 01:21:55 -0800 (PST) Received: by 10.101.171.34 with SMTP id y34mr9622357ano.8.1321435314877; Wed, 16 Nov 2011 01:21:54 -0800 (PST) Received: from petrie.dereferenced.org (ip68-0-124-123.tu.ok.cox.net. [68.0.124.123]) by mx.google.com with ESMTPS id 4sm84270828ano.9.2011.11.16.01.21.53 (version=SSLv3 cipher=OTHER); Wed, 16 Nov 2011 01:21:54 -0800 (PST) Date: Wed, 16 Nov 2011 03:28:04 -0600 From: William Pitcock To: Peter de Zoeten Cc: ncopa@alpinelinux.org, alpine-devel@lists.alpinelinux.org Subject: Re: [alpine-devel] [PATCH] PNP4Nagios Nagios Graphing Utility Message-ID: <20111116032804.3e6746e6@petrie.dereferenced.org> In-Reply-To: <1321436955-2432-1-git-send-email-peter@dezoeten.mine.nu> References: <20111116082619.67ccd54b@ncopa-desktop.nor.wtbts.net> <1321436955-2432-1-git-send-email-peter@dezoeten.mine.nu> X-Mailer: Claws Mail 3.7.10 (GTK+ 2.24.6; x86_64-unknown-linux-gnu) X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Hi Peter! On Wed, 16 Nov 2011 10:49:15 +0100 Peter de Zoeten wrote: > more info: http://www.pnp4nagios.org > Remember to look at /etc/pnp4nagios/npcd.cfg to set the correct paths > And look at /etc/lighttpd/pnp4nagios.conf.sample npcd.cfg should maybe not be installed in /etc/pnp4nagios if it is not usable as default configuration. Renaming it to npcd.cfg.sample would be a good strategy or perhaps modifying the config file as part of the post-install script if it is dependent on already known information. > --- > testing/pnp4nagios/APKBUILD | 76 +++++++++++++++++ > testing/pnp4nagios/npcd | 21 +++++ > testing/pnp4nagios/npcd.cfg | 195 > +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 292 > insertions(+), 0 deletions(-) create mode 100644 > testing/pnp4nagios/APKBUILD create mode 100644 testing/pnp4nagios/npcd > create mode 100644 testing/pnp4nagios/npcd.cfg > > diff --git a/testing/pnp4nagios/APKBUILD b/testing/pnp4nagios/APKBUILD > new file mode 100644 > index 0000000..49be7f7 > --- /dev/null > +++ b/testing/pnp4nagios/APKBUILD > @@ -0,0 +1,76 @@ > +# Contributor: Peter de Zoeten > +# Maintainer: Peter de Zoeten > +pkgname=pnp4nagios > +pkgver=0.6.15 > +pkgrel=0 > +pkgdesc="PNP4Nagios" > +url="http://www.pnp4nagios.org" > +arch="all" > +license="GPL" > +depends="nagios rrdtool perl-time-hires perl-rrd php-zlib libgcc" Are you certain these depends are correct? perl-rrd should pull in rrdtool on it's own, for example. > +depends_dev="" > +makedepends="$depends_dev" > +install="" > +subpackages="$pkgname-doc" > +source="http://sourceforge.net/projects/pnp4nagios/files/PNP-0.6/pnp4nagios-$pkgver.tar.gz" > + > +_builddir="$srcdir"/$pkgname-$pkgver > +prepare() { > + local i > + cd "$_builddir" > + for i in $source; do > + case $i in > + *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return > 1;; > + esac > + done > +} > + > +build() { > + cd "$_builddir" > + ./configure --prefix=/usr/share/webapps/pnp4nagios \ > + --exec-prefix=/usr \ > + --libexecdir=/usr/lib/pnp4nagios \ > + --sysconfdir=/etc/pnp4nagios \ > + --mandir=/usr/share/man \ > + --infodir=/usr/share/info \ > + --localstatedir=/var/run \ > + --datarootdir=/usr/share/webapps/pnp4nagios \ > + > --with-perfdata-logfile=/var/pnp4nagios/perfdata/process_perfdata.pl > \ > + --with-perfdata-dir=/var/pnp4nagios/perfdata \ > + > --with-perfdata-spool-dir=/var/pnp4nagios/perfdata/spool > \ > + || return 1 > + make all || return 1 > +} > +doc() { > + arch="noarch" > + # Man pages > + mkdir -p "$subpkgdir"/usr/share/man || return 1 > + mv "$pkgdir"/usr/share/webapps/pnp4nagios/man/man* > "$subpkgdir"/usr/share/man/ \ > + || return 1 > + > + # Doc files > + _docs="INSTALL README" > + for _doc in $_docs; do > + install -Dm644 "$srcdir"/$pkgname-$pkgver/$_doc \ > + "$subpkgdir"/usr/share/doc/$pkgname/$_doc || return 1 > + done > + rmdir "$pkgdir"/usr/share/webapps/pnp4nagios/man > +} > + > +package() { > + cd "$_builddir" > + make fullinstall DESTDIR="$pkgdir" || return 1 > + mkdir -p "$pkgdir"/usr/share/nagios/htdocs/ssi > + rm -f "$pkgdir"/usr/lib/*.la > + cp "$_builddir"/contrib/ssi/status-header.ssi > "$pkgdir"/usr/share/nagios/htdocs/ssi/status-header.ssi +# rm > -rf "$pkgdir"/etc/httpd > + mkdir -p "$pkgdir"/etc/lighttpd > + cp "$_builddir"/sample-config/lighttpd.pnp4nagios.conf > "$pkgdir"/etc/lighttpd/pnp4nagios.conf.sample > + install -D -m644 ../../npcd.cfg > "$pkgdir"/etc/pnp4nagios/npcd.cfg > + rm -f "$pkgdir"/etc/init.d/npcd > + install -D -m755 ../../npcd "$pkgdir"/etc/init.d/npcd > + chown nagios.nagios "$pkgdir"/var/pnp4nagios > +} > + > + > +md5sums="27cdab96510e15cfa0f4b7c2bf15dd2b pnp4nagios-0.6.15.tar.gz" > diff --git a/testing/pnp4nagios/npcd b/testing/pnp4nagios/npcd > new file mode 100644 > index 0000000..2b17bea > --- /dev/null > +++ b/testing/pnp4nagios/npcd > @@ -0,0 +1,21 @@ > +#!/sbin/runscript > + > +depend() { > + use net > + need dbus > + before nfs > + after logger > + } > + > +start() { > + ebegin "Starting npcd" > + start-stop-daemon --start --quiet --exec /usr/bin/npcd -- -d > -f /etc/pnp4nagios/npcd.cfg > + eend $? > + } > + > +stop() { > + ebegin "Stopping npcd" > + start-stop-daemon --stop --quiet --exec /usr/bin/npcd > + eend $? > + } > + > diff --git a/testing/pnp4nagios/npcd.cfg b/testing/pnp4nagios/npcd.cfg > new file mode 100644 > index 0000000..43bf144 > --- /dev/null > +++ b/testing/pnp4nagios/npcd.cfg > @@ -0,0 +1,195 @@ > +# NPCD.cfg - sample configuration file for PNPs NPCD > +# > +# This program is free software; you can redistribute it and/or > modify +# it under the terms of the GNU General Public License as > published by +# the Free Software Foundation; either version 2 of the > License, or +# (at your option) any later version. > +# > +# This program is free software; you can redistribute it and/or > modify +# it under the terms of the GNU General Public License > version 2 as +# published by the Free Software Foundation; > +# > +# You should have received a copy of the GNU General Public License > +# along with this program; if not, write to the Free Software > +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA > 02110-1301 USA + > +# Privilege Options > + > +user = nagios > +group = nagios > + > +######################### > +# # > +# Logging Options # > +# # > +######################### > + > +# log_type - define if you want your logs to > +# 'syslog' or to a 'file' > +# > +# log_type = > +# > + > +log_type = file > +#log_type = syslog > + > + > +# log_file - define a path to your logfile > +# needed if 'log_type'='file' > +# > +# log_file = > +# > + > +log_file = /var/pnp4nagios/npcd.log > + > + > +# max_logfile_size - defines the maximum filesize (bytes) > +# before the logfile will rotated. > +# > +# max_logfile_size = (default 10Mbyte) > +# > + > +max_logfile_size = 10485760 > + > + > +# log_level - how much should we log? > +# > +# log_level = > +# > +# 0 = No logging - except errors > +# 1 = Small logging - some few more output > +# 2 = More Logging (actual ALL logs) > +# -1 = DEBUG Mode - ALL Logging and slower processing > +# > + > +log_level = 0 > + > +######################### > +# # > +# NEEDED OPTIONS # > +# # > +######################### > + > +# perfdata_spool_dir - where we can find the > +# performance data files > +# > +# perfdata_spool_dir = > +# > + > +perfdata_spool_dir = /var/pnp4nagios/perfdata/spool/ > + > + > +# Execute following command for each found file > +# in 'perfdata_spool_dir' > +# > +# perfdata_file_run_cmd = > +# > +# Must be executable by user/group from above > +# > +# perfdata_file_run_cmd = > +# > + > +perfdata_file_run_cmd = /usr/lib/pnp4nagios/process_perfdata.pl > + > + > +# perfdata_file_run_cmd_args (optional) > +# > +# If you wish, you can apply more arguments to the > +# perfdata_file_run_cmd > +# > +# Hint: > +# NPCD will create a command line like this: > +# ' > ' +# > + > +perfdata_file_run_cmd_args = -b > + > + > +# identify_npcd (optional) > +# > +# If set to one (by default) npcd will append > +# '-n' to the perfdata_file_run_cmd > +# > +# identify_npcd = 0|1 (default: 1) > + > +identify_npcd = 1 > + > + > +# npcd_max_threads - define how many parallel threads we > +# should start > + > +npcd_max_threads = 5 > + > +# sleep_time - how many seconds npcd should wait between dirscans > +# > +# sleep_time = 15 (default) > + > +sleep_time = 15 > + > + > +# EXPERIMENTAL > +# > +# load_threshold - npcd won't start new threads > +# if your system load is above this threshold > +# > +# load_threshold = (default: 0.0) > +# > +# Hint: Do not use "," as decimal delimiter > +# > +# 07/15/2008: Every value above 0.0 will > +# enable this feature > + > +load_threshold = 0.0 > + > + > +# location of your pid file > + > +pid_file=/var/run/npcd.pid > + > + > +######################### > +# # > +# NPCDMOD OPTIONS # > +# # > +######################### > + > + > +# perfdata_file - where should the npcdmod.o > +# write the performance data > +# > +# must not be within the same directory as > +# perfdata_spool_dir > +# > +# perfdata_file = > +# > + > +perfdata_file = /var/pnp4nagios/perfdata.dump > + > + > +# perfdata_spool_filename - declare the destination > +# filename for the spooled files > +# > +# This option allows you a customized filename. > +# Usefull if you own different nagios servers > +# which write their data to a shared storage. > +# > +# perfdata_spool_filename = > +# > +# Hint: > +# The final files will be moved to > +# 'perfdata_spool_dir/perfdata_spool_filename-TIMESTAMP' > +# > +# Example: > +# > +# perfdata_spool_filename = perfdata-NY > +# perfdata_spool_filename = perfdata-LA > + > +perfdata_spool_filename = perfdata > + > +# > +# perfdata_file_processing_interval > +# > +perfdata_file_processing_interval = 15 > + > +# We have to end with a newline > + William --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---