From: Andy Witter Date: Wed, 30 Oct 2013 01:49:32 +0000 (-0400) Subject: Add apache2 vhost for munin. Update bind zonefile to add munin host. X-Git-Tag: GenaSYS-2.5.0~20 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=c59a1a005fd0f4624debc33b9a882fc469f70d71;p=contrib%2Fpines%2Fgenasys.git Add apache2 vhost for munin. Update bind zonefile to add munin host. --- diff --git a/GenaSYS.sh b/GenaSYS.sh index d489502..f255572 100755 --- a/GenaSYS.sh +++ b/GenaSYS.sh @@ -26,7 +26,7 @@ SYNOPSIS_="$NAME_" REQUIRES_="standard GNU commands, apt, dpkg" VERSION_="1.17" - DATE_="2010-09-23; last update: 2013-10-24" + DATE_="2010-09-23; last update: 2013-10-29" AUTHOR_="Andy Witter " URL_="http://evergreen-ils.org" CATEGORY_="devel" @@ -53,7 +53,7 @@ done WD=$(dirname $(readlink -f $0)) CUSTOMDIR="$WD/custom" -EG_VERSION="2.5-rc1" +EG_VERSION="2.5r1" UBUNTU_CODENAME="precise" LICENSE="$WD/License.txt" TEMPLATEDIR="$WD/templates" @@ -2392,11 +2392,14 @@ do echo >> $TMPMUNINCONF done -## copy munin.conf to monitor servers. +## copy munin.conf and apache2 munin vhost to monitor servers. for MONITOR in ${MACHINES_MONITOR} do mkdir -p "$OUTDIR/$MONITOR/etc/munin" + mkdir -p "$OUTDIR/etc/apache2/sites-available" cp -f "$TMPMUNINCONF" "$OUTDIR/$MONITOR/etc/munin" + cp -f "$TEMPLATEDIR/monitor/munin-vhost.conf" "$OUTDIR/$MONITOR/etc/apache2/sites-available" + sed -i "s^CLUSTER_DOMAIN_NAME^${CLUSTERDOMAINNAME}" "$OUTDIR/$MONITOR/etc/apache2/sites-available" done diff --git a/templates/lvs/bind/zonefile-footer b/templates/lvs/bind/zonefile-footer index 59a6d49..7a06829 100644 --- a/templates/lvs/bind/zonefile-footer +++ b/templates/lvs/bind/zonefile-footer @@ -17,3 +17,6 @@ memcache02 A Priv_NET.152 backup01 A Priv_NET.171 monitor01 A Priv_NET.201 admin01 A Priv_NET.211 +munin CNAME monitor01 +munin01 CNAME monitor01 +munin02 CNAME monitor02 diff --git a/templates/monitor/munin-vhost.conf b/templates/monitor/munin-vhost.conf new file mode 100644 index 0000000..127a496 --- /dev/null +++ b/templates/monitor/munin-vhost.conf @@ -0,0 +1,13 @@ + + ServerAdmin webmaster@CLUSTER_DOMAIN_NAME + ServerName munin.CLUSTER_DOMAIN_NAME + DocumentRoot /var/cache/munin/www + + Options FollowSymLinks + AllowOverride None + + LogLevel notice + CustomLog /var/log/apache2/access.log combined + ErrorLog /var/log/apache2/error.log + ServerSignature On + diff --git a/templates/setup.sh b/templates/setup.sh index 083d6e8..c4ceb68 100755 --- a/templates/setup.sh +++ b/templates/setup.sh @@ -648,6 +648,11 @@ fi ## Monitored hosts SetupMonitoring +## Setup Apache2 for Munin. +if [ -e /etc/apache2/sites-available/munin-vhost.conf ] +then + a2ensite munin-vhost.conf +fi ### Enhance bashrc for root. cat > bashrc-options.txt << EOF