Add preliminary Munin config and update to 2.5-rc1
authorAndy Witter <awitter@georgialibraries.org>
Thu, 17 Oct 2013 03:05:19 +0000 (23:05 -0400)
committerAndy Witter <awitter@georgialibraries.org>
Thu, 17 Oct 2013 03:05:19 +0000 (23:05 -0400)
GenaSYS.sh
templates/debs/evergreen-ils_2.5-beta1_amd64.deb [deleted file]

index 922252a..4edc6e8 100755 (executable)
@@ -25,8 +25,8 @@
     PURPOSE_="Generate config files needed for Evergreen-ILS Cluster"
    SYNOPSIS_="$NAME_"
    REQUIRES_="standard GNU commands, apt, dpkg"
-    VERSION_="1.14"
-       DATE_="2010-09-23; last update: 2013-08-07"
+    VERSION_="1.15"
+       DATE_="2010-09-23; last update: 2013-10-16"
      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.5b1"
+EG_VERSION="2.5r1"
 UBUNTU_CODENAME="precise"
 LICENSE="$WD/License.txt"
 TEMPLATEDIR="$WD/templates"
@@ -2314,6 +2314,30 @@ echo 'cp "${WD}/monitoring/nrpe_local.cfg" "/etc/nagios"' >>$TMPSETUPMONITOR
 chmod 755 $TMPSETUPMONITOR
 
 
+### Setup Munin.
+## all hosts except bricks
+for MUNINODE in ${MACHINES_NO_BRICKS}
+do
+       MUNIN_HOST=$( echo "${MUNINODE}" | tr  '[:lower:]'  '[:upper:]' )
+       MUNIN_CFG_FILE="${OUTDIR}/${MUNINODE}/etc/munin/munin-node.conf"
+       mkdir -p "${OUTDIR}/${MUNINODE}/etc/munin"
+        echo '### Generated by GenaSYS' >> ${MUNIN_CFG_FILE}
+       echo "host_name ${MUNINODE}.${CLUSTERDOMAINNAME}" >> ${MUNIN_CFG_FILE}
+       printf "allow $MONITOR01_IP   # IP address of the monitor server\n" >> ${MUNIN_CFG_FILE}
+       printf "allow $MONITOR02_IP   # IP address of the monitor server\n" >> ${MUNIN_CFG_FILE}
+       if echo $MUNINODE | grep -q lvs0
+       then
+               eval echo -e "host \$${MUNIN_HOST#*-}_PRIVATE_IP    \# Host IP address" >> ${MUNIN_CFG_FILE}
+       else
+               eval echo -e "host \$${MUNIN_HOST#*-}_IP    \# Host IP address" >> ${MUNIN_CFG_FILE} 
+       fi
+done
+## Munin on monitor servers
+for MUNINODE in ${MACHINES_MONITOR}
+do
+       echo $MMACHINES_MONITOR
+done
+
 
 
 ### Write config info file.
@@ -2599,6 +2623,7 @@ then
        Prep_Postfix ${NODE_FOLDER}
        mv -f $TMPFOLDER/postfix.debconf "setup_${NODE_FOLDER}"
        mkdir "setup_${NODE_FOLDER}/Icinga-Nagios"
+       mkdir "setup_${NODE_FOLDER}/Munin"
        cp -f "$TEMPLATEDIR/monitor/commands.cfg" "setup_${NODE_FOLDER}/Icinga-Nagios"
        cp -f "$TMPFOLDER/hosts.cfg" "setup_${NODE_FOLDER}/Icinga-Nagios"
         cp -f "$TMPFOLDER/hostgroups.cfg" "setup_${NODE_FOLDER}/Icinga-Nagios"
@@ -2607,6 +2632,7 @@ then
        cp -f "$TEMPLATEDIR/monitor/check_hpasm" "setup_${NODE_FOLDER}/Icinga-Nagios"
        cp -f "${TMPFOLDER}/icinga_ppa.list" "setup_${NODE_FOLDER}/Icinga-Nagios"
        cp -f "$TEMPLATEDIR/monitor/extinfo_icinga.cfg" "setup_${NODE_FOLDER}/Icinga-Nagios"
+       cp -f "$TEMPLATEDIR/monitor/munin-cron.crontab" "setup_${NODE_FOLDER}/Munin" 
 fi
 sed -i "s^tar_file^$NODE_FOLDER^g" "setup_${NODE_FOLDER}/setup_$NODE_FOLDER.sh"
 sed -i "s^_EGVER^$EG_VERSION^g" "setup_${NODE_FOLDER}/setup_$NODE_FOLDER.sh"
diff --git a/templates/debs/evergreen-ils_2.5-beta1_amd64.deb b/templates/debs/evergreen-ils_2.5-beta1_amd64.deb
deleted file mode 100644 (file)
index 2e0ddc3..0000000
Binary files a/templates/debs/evergreen-ils_2.5-beta1_amd64.deb and /dev/null differ