PURPOSE_="Generate config files needed for Evergreen-ILS Cluster"
SYNOPSIS_="$NAME_"
REQUIRES_="standard GNU commands, apt, dpkg"
- VERSION_="1.16"
- DATE_="2010-09-23; last update: 2013-10-23"
+ VERSION_="1.17"
+ DATE_="2010-09-23; last update: 2013-10-24"
AUTHOR_="Andy Witter <awitter@georgialibraries.org>"
URL_="http://evergreen-ils.org"
CATEGORY_="devel"
echo
TitleBar "Monitoring Admin Password."
echo
-read -sp "Enter a password for $MONITOR_ADMIN_USERNAME: " MONITOR_ADMIN_PASSWORD
+echo "In order to configure monitoring for the cluster,"
+echo "we need to configure the admin credentials"
+echo "(icingaadmin, and muninadmin)"
+echo
+read -sp "Enter a password for (icingaadmin and muninadmin): " MONITOR_ADMIN_PASSWORD
echo
-read -sp "Confirm password for $MONITOR_ADMIN_USERNAME: " MONITOR_ADMIN_PASSWORD_CONFIRM
+read -sp "Confirm password for (icingaadmin and muninadmin): " MONITOR_ADMIN_PASSWORD_CONFIRM
while [[ "$MONITOR_ADMIN_PASSWORD_CONFIRM" == "" || "$MONITOR_ADMIN_PASSWORD" == "" ]]
do
echo -e $COL_BR_RED"Cannot be blank you must enter a password"$COL_RESET
fi
Write_Config_File SYNDETICS_USER_ID
-if [ "$MONITOR_ADMIN_USERNAME" = "" ] || [ "$MONITOR_ADMIN_USERNAME" = "0" ]
-then
- Get_Monitor_Admin_Username
-fi
-Write_Config_File MONITOR_ADMIN_USERNAME
+#if [ "$MONITOR_ADMIN_USERNAME" = "" ] || [ "$MONITOR_ADMIN_USERNAME" = "0" ]
+#then
+# Get_Monitor_Admin_Username
+#fi
+#Write_Config_File MONITOR_ADMIN_USERNAME
if [ -z $MONITOR_ADMIN_PASSWORD ] || [ "$MONITOR_ADMIN_PASSWORD" == "0" ]
then
fi
Write_Config_File MONITOR_ADMIN_PASSWORD
-if [ -z $NOTIFY_EMAIL_ADDRESS ] || [ "$NOTIFY_EMAIL_ADDRESS" == "0" ]
-then
- Get_Notification_Email
-fi
-Write_Config_File NOTIFY_EMAIL_ADDRESS
+#if [ -z $NOTIFY_EMAIL_ADDRESS ] || [ "$NOTIFY_EMAIL_ADDRESS" == "0" ]
+#then
+# Get_Notification_Email
+#fi
+#Write_Config_File NOTIFY_EMAIL_ADDRESS
#if [ -z $SYNDETICS_USER_ID ] || [ "$SYNDETICS_USER_ID" == "0" ]
# then
do
MONITOR_SERVER=$( echo "${NAGINODE}" | tr '[:lower:]' '[:upper:]' )
### remove prefix ${MONITOR_SERVER#*-}
- echo ${MACHINES_MONITOR#*-}
+ #echo ${MACHINES_MONITOR#*-}
THIS_MONITOR_SERVER_IP=$(eval echo \$${MONITOR_SERVER#*-}_IP) ## strip prefix
if [ -z "$MONITOR_SERVER_IP_LIST" ]
then
cp -f "$TMPMUNINCONF" "$OUTDIR/$MONITOR/etc/munin"
done
-echo all machines: $ALL_MACHINES_LIST
### Write config info file.
echo >> "$NETCFGFILE"
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"
+ cp -f "$TEMPLATEDIR/icinga.debconf" "setup_${NODE_FOLDER}/.icinga.debconf"
+ sed -i "s^MONITOR_PW^${MONITOR_ADMIN_PASSWORD}^g" "setup_${NODE_FOLDER}/.icinga.debconf"
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"