[Pkg-nagios-changes] [SCM] UNNAMED PROJECT branch, debian/master, updated. 810edbdd3feedbfe37f4a65bee50b57b2f60fa2a

David GUENAULT dguenault at monitoring-fr.org
Tue Feb 28 22:10:55 UTC 2012


The following commit has been merged in the debian/master branch:
commit 992c4c97ff0111c4e83a17e6e70d94d396163337
Author: David GUENAULT <dguenault at monitoring-fr.org>
Date:   Sat Dec 31 09:20:21 2011 +0100

    Added support for check_mysql_health plugin (only for debian like distro at the moment)

diff --git a/contrib/alternative-installation/shinken-install/shinken.conf b/contrib/alternative-installation/shinken-install/shinken.conf
index 89e21fa..700aa87 100644
--- a/contrib/alternative-installation/shinken-install/shinken.conf
+++ b/contrib/alternative-installation/shinken-install/shinken.conf
@@ -82,6 +82,8 @@ export CHECKORACLEHEALTHAPTPKG="libdbi-perl libaio1"
 export CHECKORACLEHEALTHCPAN="http://search.cpan.org/CPAN/authors/id/P/PY/PYTHIAN/DBD-Oracle-1.36.tar.gz"
 export CHECKORACLEHEALTH="http://labs.consol.de/wp-content/uploads/2011/09/check_oracle_health-1.7.3.tar.gz"
 
+export CHECKMYSQLHEALTH="http://labs.consol.de/wp-content/uploads/2011/08/check_mysql_health-2.1.7.tar.gz"
+
 export PNPBRANCH="0.6"
 export PNPRELEASE="16"
 export PNPPREFIX="/usr/local/pnp4nagios"
diff --git a/contrib/alternative-installation/shinken-install/shinken.sh b/contrib/alternative-installation/shinken-install/shinken.sh
index bb49039..970391b 100755
--- a/contrib/alternative-installation/shinken-install/shinken.sh
+++ b/contrib/alternative-installation/shinken-install/shinken.sh
@@ -1013,7 +1013,7 @@ echo "Usage : shinken -k | -i | -w | -d | -u | -b | -r | -l | -c | -h | -a | -z
 	-c	Compress rotated logs
     -e  which daemons to keep enabled at boot time
 	-z 	This is a really special usecase that allow to install shinken on Centreon Enterprise Server in place of nagios
-	-p  Install plugins or addons (args should be one of the following : check_esx3|nagios-plugins|check_oracle_health|capture_plugin|pnp4nagios|multisite)
+	-p  Install plugins or addons (args should be one of the following : check_esx3|nagios-plugins|check_oracle_health|check_mysql_health|capture_plugin|pnp4nagios|multisite)
 	-h	Show help"
 }
 
@@ -1318,6 +1318,46 @@ function install_check_oracle_health(){
 	fi
 }
 
+# check_mysql_health
+
+function install_check_mysql_health(){
+	cadre "Install check_mysql_health" green
+
+	if [ "$CODE" == "REDHAT" ]
+	then
+		cecho " > Unsuported" red
+	else
+		cd /tmp
+		cecho " > Downloading check_mysql_health" green
+		wget $CHECKMYSQLHEALTH > /dev/null 2>&1
+		if [ $? -ne 0 ]
+		then
+			cecho " > Error while downloading $filename" red
+			exit 2
+		fi
+		cecho " > Extracting archive " green
+		filename=$(echo $CHECKMYSQLHEALTH | awk -F"/" '{print $NF}')
+		tar zxvf $filename > /dev/null 2>&1
+		cd $(echo $filename | sed -e "s/\.tar\.gz//g")
+		./configure --prefix=$TARGET --with-nagios-user=$SKUSER --with-nagios-group=$SKGROUP --with-mymodules-dir=$TARGET/libexec --with-mymodules-dyn-dir=$TARGET/libexec --with-statefiles-dir=$TARGET/var/tmp > /dev/null 2>&1
+		cecho " > Building plugin" green
+		make > /dev/null 2>&1
+		if [ $? -ne 0 ] 
+		then
+			cecho " > Error while building check_mysql_health module" red
+			exit 2
+		fi
+		make check > /dev/null 2>&1	
+		if [ $? -ne 0 ]
+		then
+			cecho " > Error while building check_mysql_health module" red
+			exit 2
+		fi
+		cecho " > Installing plugin" green
+		make install > /dev/null 2>&1
+	fi
+}
+
 # Check if we launch the script with root privileges (aka sudo)
 if [ "$UID" != "0" ]
 then
@@ -1347,6 +1387,10 @@ while getopts "kidubcr:lz:hsvp:we:" opt; do
 			then
 				install_check_oracle_health
 				exit 0
+			elif [ "$OPTARG" == "check_mysql_health" ]
+			then
+				install_check_mysql_health
+				exit 0
 			elif [ "$OPTARG" == "capture_plugin" ]
 			then
 				install_capture_plugin

-- 
UNNAMED PROJECT



More information about the Pkg-nagios-changes mailing list