[Pkg-nagios-changes] [SCM] UNNAMED PROJECT branch, debian/master, updated. 810edbdd3feedbfe37f4a65bee50b57b2f60fa2a
David GUENAULT
dguenault at monitoring-fr.org
Tue Feb 28 22:10:08 UTC 2012
The following commit has been merged in the debian/master branch:
commit b18cfd10739d657c8037c89a0130b779b716343c
Author: David GUENAULT <dguenault at monitoring-fr.org>
Date: Wed Dec 28 09:11:54 2011 +0100
FIX pnp4nagios was not fully integrated with shinken. This is now fixed
diff --git a/contrib/alternative-installation/shinken-install/shinken.sh b/contrib/alternative-installation/shinken-install/shinken.sh
index 4366b0a..ebf2f10 100755
--- a/contrib/alternative-installation/shinken-install/shinken.sh
+++ b/contrib/alternative-installation/shinken-install/shinken.sh
@@ -1037,8 +1037,7 @@ function install_pnp4nagios(){
filename=$(echo $PNPURI | awk -F"/" '{print $NF}')
folder=$(echo $filename | sed -e "s/\.tar\.gz//g")
-
- if [ -z "$filename" ]
+ if [ ! -f "$filename" ]
then
cecho " > Getting pnp4nagios archive" green
wget $PNPURI > /dev/null 2>&1
@@ -1063,7 +1062,9 @@ function install_pnp4nagios(){
rm -f $PNPPREFIX/share/install.php
/etc/init.d/apache2 restart > /dev/null 2>&1
cecho " > Enable npcdmod" green
- do_skmacro enable_npcd.macro $PNPPREFIX/etc/npcd.cfg
+
+ ip=$(ifconfig | grep "inet adr" | grep -v 127.0.0.1 | awk '{print $2}' | awk -F : '{print $2}' | head -n 1)
+ do_skmacro enable_npcd.macro $PNPPREFIX/etc/npcd.cfg,$ip
}
diff --git a/contrib/alternative-installation/shinken-install/tools/macros/enable_npcd.macro b/contrib/alternative-installation/shinken-install/tools/macros/enable_npcd.macro
index c28d6f0..8db7ace 100644
--- a/contrib/alternative-installation/shinken-install/tools/macros/enable_npcd.macro
+++ b/contrib/alternative-installation/shinken-install/tools/macros/enable_npcd.macro
@@ -1,9 +1,13 @@
# Enable and configure ndo mysql broker module
# Arguments are :
-# ARG1 : npcd.cfg path
+# ARG1 : npcd.cfg path
+# ARG2 : ip address of the pnp4nagios server
setconfigfile __PREFIX__/etc/shinken-specific.cfg
setauthfile __PREFIX__/contrib/alternative-installation/shinken-install/tools/macros/auth
setparam config_file=ARG1 from module where module_type=npcdmod
getdirective modules from broker where broker_name=broker-1
setparam modules=LAST,NPCDMOD from broker where broker_name=broker-1
+setparam uri=http://ARG2/pnp4nagios from module where module_name=PNP_UI
+getdirective modules from module where module_name=WebUI
+setparam modules=LAST,PNP_UI from module where module_name=WebUI
writeconfig
--
UNNAMED PROJECT
More information about the Pkg-nagios-changes
mailing list