summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Rennings (mren) <mren@mrmx.de>2009-08-11 17:30:41 +0000
committerMarkus Rennings (mren) <mren@mrmx.de>2009-08-11 17:30:41 +0000
commit66782789cd760d3f7e8289a2aaf1776bc7144e2e (patch)
treeace6967f8851f804056fc80e8fe6355947101501 /www-misc/monitorix
parentmedia-gfx/graphicsmagick: Version bump for GM 1.3.6. (diff)
downloadsunrise-66782789cd760d3f7e8289a2aaf1776bc7144e2e.tar.gz
sunrise-66782789cd760d3f7e8289a2aaf1776bc7144e2e.tar.bz2
sunrise-66782789cd760d3f7e8289a2aaf1776bc7144e2e.zip
www-misc/monitorix: new ebuild for monitorix, bug 281087
svn path=/sunrise/; revision=8975
Diffstat (limited to 'www-misc/monitorix')
-rw-r--r--www-misc/monitorix/ChangeLog9
-rw-r--r--www-misc/monitorix/files/1.3.1-evms.patch47
-rw-r--r--www-misc/monitorix/files/monitorix.conf.patch20
-rw-r--r--www-misc/monitorix/metadata.xml9
-rw-r--r--www-misc/monitorix/monitorix-1.3.1.ebuild76
5 files changed, 161 insertions, 0 deletions
diff --git a/www-misc/monitorix/ChangeLog b/www-misc/monitorix/ChangeLog
new file mode 100644
index 000000000..7e4bda414
--- /dev/null
+++ b/www-misc/monitorix/ChangeLog
@@ -0,0 +1,9 @@
+# ChangeLog for www-misc/monitorix
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+ 11 Aug 2009; Markus Rennings (mren) <mren@mrmx.de>
+ +files/1.3.1-evms.patch, +monitorix-1.3.1.ebuild,
+ +files/monitorix.conf.patch, +metadata.xml:
+ new ebuild for monitorix, bug 281087
+
diff --git a/www-misc/monitorix/files/1.3.1-evms.patch b/www-misc/monitorix/files/1.3.1-evms.patch
new file mode 100644
index 000000000..fcaafc9d5
--- /dev/null
+++ b/www-misc/monitorix/files/1.3.1-evms.patch
@@ -0,0 +1,47 @@
+--- monitorix.pl.orig 2009-08-05 14:47:05.000000000 +0200
++++ monitorix.pl 2009-08-11 18:26:42.000000000 +0200
+@@ -81,6 +81,7 @@
+ our @PC_MAIL;
+ our $IPTABLES;
+ our $PVS = "pvs";
++our $EVMS = "evms_query";
+
+ # The current two locations where the configuration file can reside.
+ if(-f "/etc/monitorix.conf") {
+@@ -1069,7 +1070,7 @@
+ my @monthlist = ("Desembre",
+ "Gener",
+ "Febrer",
+- "Març",
++ "Març",
+ "Abril",
+ "Maig",
+ "Juny",
+@@ -3038,6 +3039,7 @@
+ my $lvm_disk;
+ my $is_cciss;
+ my $is_md;
++ my $found = 0;
+
+ $root_disk = `df -P / | grep / | awk -F " " '{ print \$1 }'`;
+ chomp($root_disk);
+@@ -3048,6 +3050,11 @@
+ $root_disk =~ s/.$//;
+ $is_cciss = 1;
+ }
++ if($root_disk =~ m/\/dev\/evms\//) {
++ $root_disk = `$EVMS disks $root_disk`;
++ $found = 1;
++ }
++ if(!$found) {
+ if(stat("/proc/mdstat")) {
+ my $tmp;
+ my $md_root_disk = $root_disk;
+@@ -3100,6 +3107,7 @@
+ }
+
+ }
++ }
+ }
+
+ chomp($ROOT_TOTAL,
diff --git a/www-misc/monitorix/files/monitorix.conf.patch b/www-misc/monitorix/files/monitorix.conf.patch
new file mode 100644
index 000000000..1ffdf81d2
--- /dev/null
+++ b/www-misc/monitorix/files/monitorix.conf.patch
@@ -0,0 +1,20 @@
+--- monitorix.conf.orig 2009-08-11 01:04:55.000000000 +0200
++++ monitorix.conf 2009-08-11 01:05:56.000000000 +0200
+@@ -31,7 +31,7 @@
+ # General
+ our $TITLE = "FIBRANET NSP, SL"; # your company name
+ our $HOSTNAME = ""; # hostname of this server
+-our $OSTYPE = "Linux-RHFC"; # choose your OS type (see below)
++our $OSTYPE = "Linux-Gentoo"; # choose your OS type (see below)
+ our $IDATE = "01 Jan 2000"; # initial statistics date
+ our $SAMBAVER = "3"; # Samba version (2 or 3)
+ our $MULTIHOST = "N"; # Enable multihost feature
+@@ -223,7 +223,7 @@
+
+ our %HTTP_LOG = ("Linux-RHFC" => "/var/log/httpd/access_log",
+ "Linux-Debian" => "/var/log/apache2/access.log",
+- "Linux-Gentoo" => "/var/log/apache2/access.log",
++ "Linux-Gentoo" => "/var/log/apache2/access_log",
+ "Linux-Slack" => "/var/log/httpd/access.log",
+ "Linux-SuSE" => "/var/log/apache2/access_log",
+ "Linux-Generic" => "/var/log/httpd/access_log",
diff --git a/www-misc/monitorix/metadata.xml b/www-misc/monitorix/metadata.xml
new file mode 100644
index 000000000..33468863b
--- /dev/null
+++ b/www-misc/monitorix/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>maintainer-wanted</herd>
+ <use>
+ <flag name='evms'>Add support for (root) filesystems on
+ <pkg>sys-fs/evms</pkg> volumes</flag>
+ </use>
+</pkgmetadata>
diff --git a/www-misc/monitorix/monitorix-1.3.1.ebuild b/www-misc/monitorix/monitorix-1.3.1.ebuild
new file mode 100644
index 000000000..372a9d306
--- /dev/null
+++ b/www-misc/monitorix/monitorix-1.3.1.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="2"
+
+inherit eutils webapp
+
+DESCRIPTION="A lighweight system monitoring tool"
+HOMEPAGE="http://www.monitorix.org/"
+SRC_URI="http://www.monitorix.org/${P}.tar.gz"
+
+LICENSE="GPL-2"
+KEYWORDS="~amd64"
+IUSE="evms hddtemp lm_sensors"
+
+DEPEND="sys-apps/sed"
+RDEPEND="net-analyzer/rrdtool[perl]
+ net-mail/metamail
+ hddtemp? ( app-admin/hddtemp )
+ lm_sensors? ( sys-apps/lm_sensors )
+ || ( sys-process/bcron
+ sys-process/cronie
+ sys-process/dcron
+ sys-process/fcron
+ sys-process/vixie-cron )"
+
+need_httpd_cgi
+
+
+src_prepare() {
+ local IDATE=$(date +'%Y-%m-%d')
+ epatch "${FILESDIR}/${PN}.conf.patch"
+ sed -i -e "s|\(our \$IDATE = \"\)01 Jan 2000|\1${IDATE}|" ${PN}.conf
+
+ use evms && epatch "${FILESDIR}/1.3.1-evms.patch"
+}
+
+src_install() {
+ webapp_src_preinst
+
+ dosbin ${PN}.pl || die "dosbin failed"
+
+ newinitd ports/Linux-Gentoo/${PN}.init ${PN} || die "newinitd failed"
+
+ insinto /etc
+ doins ${PN}.conf || die "doins failed"
+
+ dodoc Changes ${PN}-apache.conf README{,.nginx} TODO || die "dodoc failed"
+ doman man/man5/${PN}.conf.5 || die "doman failed"
+
+ insinto "${MY_HTDOCSDIR}"
+ doins envelope.png logo_bot_black.png logo_bot_white.png logo_top.jpg ||
+ die "doins failed"
+ dodir "${MY_HTDOCSDIR}/imgs" || die "dodir failed"
+ webapp_serverowned "${MY_HTDOCSDIR}/imgs"
+
+ exeinto ${MY_CGIBINDIR}
+ doexe ${PN}.cgi || die "doexe failed"
+
+ dodir /var/lib/${PN}/usage || die "dodir failed"
+ insinto /var/lib/${PN}/reports
+ doins -r reports/* || die "doins failed"
+ webapp_src_install
+}
+
+pkg_postinst() {
+ elog "Before starting the ${PN} init script make sure you edited the "
+ elog "config file"
+ elog
+ elog "This package is run via /etc/cron.d and therefore uses root "
+ elog "privileges. The graphs are created at runtime directly to "
+ elog "the imgs/ directory inside the dir you installed the app to "
+ elog "with webapp-config. These are created with the privileges "
+ elog "of the webserver user account."
+}