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"
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"
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.
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"
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"