summaryrefslogtreecommitdiffstats
path: root/network/nagiosgraph
diff options
context:
space:
mode:
author mario <mario@slackverse.org>2012-02-15 16:25:38 -0200
committer Niels Horn <niels.horn@slackbuilds.org>2012-02-15 16:25:38 -0200
commit0d926ae9322fe82c3d3e2707a12804b9cb9d186c (patch)
tree73b5b30e620bbf20a13cd3bd890c6a83c45d876f /network/nagiosgraph
parentbc1dbb7971161433111349700c7568de5c34446c (diff)
downloadslackbuilds-0d926ae9322fe82c3d3e2707a12804b9cb9d186c.tar.gz
slackbuilds-0d926ae9322fe82c3d3e2707a12804b9cb9d186c.tar.xz
network/nagiosgraph: Added (Nagios Graphing Plugin)
Signed-off-by: Niels Horn <niels.horn@slackbuilds.org>
Diffstat (limited to 'network/nagiosgraph')
-rw-r--r--network/nagiosgraph/README7
-rw-r--r--network/nagiosgraph/doinst.sh35
-rw-r--r--network/nagiosgraph/nagiosgraph.SlackBuild92
-rw-r--r--network/nagiosgraph/nagiosgraph.info10
-rw-r--r--network/nagiosgraph/slack-desc20
5 files changed, 164 insertions, 0 deletions
diff --git a/network/nagiosgraph/README b/network/nagiosgraph/README
new file mode 100644
index 0000000000..a2544ae7a4
--- /dev/null
+++ b/network/nagiosgraph/README
@@ -0,0 +1,7 @@
+nagiosgraph parses output and performance data from Nagios plugins and
+stores the data in RRD files. nagiosgraph creates graphs and generates
+HTML pages with graphic reports from the data.
+
+This package requires Nagios and RRDTool installed, both can be found on
+slackbuilds.org. For final configuration and usage it is advised to read
+INSTALL file that came with this package in /usr/doc/nagiosgraph-1.4.4.
diff --git a/network/nagiosgraph/doinst.sh b/network/nagiosgraph/doinst.sh
new file mode 100644
index 0000000000..6132e6e55b
--- /dev/null
+++ b/network/nagiosgraph/doinst.sh
@@ -0,0 +1,35 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+config etc/nagiosgraph/servdb.conf.new
+config etc/nagiosgraph/rrdopts.conf.new
+config etc/nagiosgraph/ngshared.pm.new
+config etc/nagiosgraph/nagiosgraph_fr.conf.new
+config etc/nagiosgraph/nagiosgraph_es.conf.new
+config etc/nagiosgraph/nagiosgraph_de.conf.new
+config etc/nagiosgraph/nagiosgraph.conf.new
+config etc/nagiosgraph/nagiosgraph-nagios.cfg.new
+config etc/nagiosgraph/nagiosgraph-commands.cfg.new
+config etc/nagiosgraph/nagiosgraph-apache.conf.new
+config etc/nagiosgraph/map.new
+config etc/nagiosgraph/labels.conf.new
+config etc/nagiosgraph/hostdb.conf.new
+config etc/nagiosgraph/groupdb.conf.new
+config etc/nagiosgraph/datasetdb.conf.new
+config etc/nagiosgraph/access.conf.new
+
+# Create rrd directory and add log files
+( cd var/nagios; mkdir -p rrd; chown nagios rrd;
+ touch nagiosgraph-cgi.log nagiosgraph.log;
+ chown apache nagiosgraph-cgi.log nagiosgraph.log )
+
diff --git a/network/nagiosgraph/nagiosgraph.SlackBuild b/network/nagiosgraph/nagiosgraph.SlackBuild
new file mode 100644
index 0000000000..54842dd379
--- /dev/null
+++ b/network/nagiosgraph/nagiosgraph.SlackBuild
@@ -0,0 +1,92 @@
+#!/bin/sh
+
+# Slackware build script for nagiosgraph
+
+# Copyright 2012, mario <mario@slackverse.org>
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PRGNAM=nagiosgraph
+VERSION=${VERSION:-1.4.4}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# nagiosgraph comes with its own style install script
+DESTDIR=$PKG \
+NG_LAYOUT=overlay \
+NG_PREFIX=/usr \
+NG_ETC_DIR=/etc/nagiosgraph \
+NG_BIN_DIR=/usr/libexec/nagios \
+NG_CGI_DIR=/var/www/cgi-bin/nagios \
+NG_DOC_DIR=/usr/doc/nagiosgraph-$VERSION \
+NG_EXAMPLES_DIR=/usr/doc/nagiosgraph-$VERSION/examples \
+NG_WWW_DIR=/var/www/htdocs/nagios/stylesheets \
+NG_UTIL_DIR=/usr/doc/nagiosgraph-$VERSION/util \
+NG_VAR_DIR=/var/nagios \
+NG_RRD_DIR=/var/nagios/rrd \
+NG_LOG_DIR=/var/nagios \
+NG_LOG_FILE=nagiosgraph.log \
+NG_CGILOG_FILE=nagiosgraph-cgi.log \
+NG_URL=/nagios \
+NG_CGI_URL=/cgi-bin/nagios \
+NG_CSS_URL=/nagios/stylesheets \
+NG_JS_URL=/nagios/stylesheets \
+NG_NAGIOS_PERFDATA_FILE=/var/nagios/perfdata.log \
+NG_NAGIOS_CGI_URL=/nagios \
+NG_NAGIOS_USER=nagios \
+NG_WWW_USER=apache \
+NG_MODIFY_NAGIOS_CONFIG=0 \
+NG_MODIFY_APACHE_CONFIG=0 \
+./install.pl
+
+# Lets not overwrite any logs and stuff that user might have already
+# We mkdir and "touch" those from doinst.sh instead
+rm -rf $PKG/var/nagios
+
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+# Append .new to config files
+for i in $PKG/etc/nagiosgraph/* ; do mv $i $i.new ; done
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-noarch-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/network/nagiosgraph/nagiosgraph.info b/network/nagiosgraph/nagiosgraph.info
new file mode 100644
index 0000000000..c7dc94efb6
--- /dev/null
+++ b/network/nagiosgraph/nagiosgraph.info
@@ -0,0 +1,10 @@
+PRGNAM="nagiosgraph"
+VERSION="1.4.4"
+HOMEPAGE="http://nagiosgraph.sourceforge.net/"
+DOWNLOAD="http://downloads.sourceforge.net/nagiosgraph/nagiosgraph-1.4.4.tar.gz"
+MD5SUM="b340aa461a4c4a4621089413af729524"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+MAINTAINER="mario"
+EMAIL="mario@slackverse.org"
+APPROVED="Niels Horn"
diff --git a/network/nagiosgraph/slack-desc b/network/nagiosgraph/slack-desc
new file mode 100644
index 0000000000..6d6070e9d0
--- /dev/null
+++ b/network/nagiosgraph/slack-desc
@@ -0,0 +1,20 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+nagiosgraph: nagiosgraph (Nagios Graphing Plugin)
+nagiosgraph:
+nagiosgraph: nagiosgraph parses output and performance data from Nagios plugins
+nagiosgraph: and stores the data in RRD files. nagiosgraph creates graphs and
+nagiosgraph: generates HTML pages with graphic reports from the data.
+nagiosgraph:
+nagiosgraph: http://nagiosgraph.sourceforge.net/
+nagiosgraph:
+nagiosgraph:
+nagiosgraph:
+nagiosgraph:
+