Add apache2 vhost for munin. Update bind zonefile to add munin host.
authorAndy Witter <awitter@georgialibraries.org>
Wed, 30 Oct 2013 01:49:32 +0000 (21:49 -0400)
committerAndy Witter <awitter@georgialibraries.org>
Wed, 30 Oct 2013 01:49:32 +0000 (21:49 -0400)
GenaSYS.sh
templates/lvs/bind/zonefile-footer
templates/monitor/munin-vhost.conf [new file with mode: 0644]
templates/setup.sh

index d489502..f255572 100755 (executable)
@@ -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 <awitter@georgialibraries.org>"
         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
 
 
index 59a6d49..7a06829 100644 (file)
@@ -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 (file)
index 0000000..127a496
--- /dev/null
@@ -0,0 +1,13 @@
+<VirtualHost *:80>
+   ServerAdmin webmaster@CLUSTER_DOMAIN_NAME
+   ServerName munin.CLUSTER_DOMAIN_NAME
+   DocumentRoot /var/cache/munin/www
+   <Directory />
+       Options FollowSymLinks
+       AllowOverride None
+   </Directory>
+   LogLevel notice
+   CustomLog /var/log/apache2/access.log combined
+   ErrorLog /var/log/apache2/error.log
+   ServerSignature On
+</VirtualHost>
index 083d6e8..c4ceb68 100755 (executable)
@@ -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