From c10c95033f508d9e134109d16ff09c7ef3e220dc Mon Sep 17 00:00:00 2001 From: Andy Witter Date: Thu, 9 May 2013 10:51:08 -0400 Subject: [PATCH] Add extinfo_icinga.cfg --- GenaSYS.sh | 1 + templates/setup.sh | 11 +++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/GenaSYS.sh b/GenaSYS.sh index 89262a9..7b49693 100755 --- a/GenaSYS.sh +++ b/GenaSYS.sh @@ -2516,6 +2516,7 @@ then cp -f "$TEMPLATEDIR/monitor/check_hpacucli" "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" 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/setup.sh b/templates/setup.sh index 04152a4..ef0a53b 100755 --- a/templates/setup.sh +++ b/templates/setup.sh @@ -460,17 +460,20 @@ then echo;echo -e $COL_BR_GREEN "Installing latest Icinga for Monitoring"$COL_RESET;echo apt-get update && apt-get -y install icinga nagios-nrpe-plugin nagios-nrpe-server ### Configure Icinga/Nagios - [ -e "/etc/icinga/commands.cfg" ] && cp /etc/icinga/commands.cfg /etc/icinga/commands.cfg-orig - [ -e "/etc/icinga/objects/services.cfg" ] && cp /etc/icinga/objects/services.cfg /etc/icinga/objects/services.cfg-orig - [ -e "/etc/icinga/objects/hostgroups-icinga.cfg" ] && cp /etc/icinga/objects/hostgroups-icinga.cfg /etc/icinga/objects/hostgroups-icinga.cfg-orig - [ -e "/etc/icinga/objects/hostgroups.cfg" ] && cp /etc/icinga/objects/hostgroups.cfg /etc/icinga/objects/hostgroups.cfg-orig + [ -e "/etc/icinga/commands.cfg" ] && mv /etc/icinga/commands.cfg /etc/icinga/commands.cfg-orig + [ -e "/etc/icinga/objects/services.cfg" ] && mv /etc/icinga/objects/services.cfg /etc/icinga/objects/services.cfg-orig + [ -e "/etc/icinga/objects/services_icinga.cfg" ] mv /etc/icinga/objects/services_icinga.cfg /etc/icinga/objects/services_icinga.cfg-orig + [ -e "/etc/icinga/objects/hostgroups-icinga.cfg" ] && mv /etc/icinga/objects/hostgroups_icinga.cfg /etc/icinga/objects/hostgroups_icinga.cfg-orig + [ -e "/etc/icinga/objects/hostgroups.cfg" ] && mv /etc/icinga/objects/hostgroups.cfg /etc/icinga/objects/hostgroups.cfg-orig [ -e "/etc/icinga/objects/hosts.cfg" ] && cp /etc/icinga/objects/hosts.cfg /etc/icinga/objects/hosts.cfg-orig + [ -e "/etc/icinga/objects/extinfo_icinga.cfg" ] && mv /etc/icinga/objects/extinfo_icinga.cfg /etc/icinga/objects/extinfo_icinga.cfg-orig cp -f "$MONITOR_DIR/commands.cfg" "/etc/icinga" cp -f "$MONITOR_DIR/services.cfg" "/etc/icinga/objects" cp -f "$MONITOR_DIR/hostgroups.cfg" "/etc/icinga/objects" cp -f "$MONITOR_DIR/hosts.cfg" "/etc/icinga/objects" cp -f "$MONITOR_DIR/check_hpacucli" "/usr/lib/nagios/plugins" cp -f "$MONITOR_DIR/check_hpasm" "/usr/lib/nagios/plugins" + cp -f "$MONITOR_DIR/extinfo_icinga.cfg" "/etc/icinga/objects" ### Restart Icinga. /etc/init.d/icinga restart else -- 2.11.0