[icinga-checkins] icinga.org: icinga-core/fholzer/core: modified ido2db Mysql Connection Output

git at icinga.org git at icinga.org
Mon Apr 23 10:10:48 CEST 2012


Module: icinga-core
Branch: fholzer/core
Commit: 06e43bbb45ad811f7f52d3aa43613b6a320c02fb
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=06e43bbb45ad811f7f52d3aa43613b6a320c02fb

Author: Franz Holzer <office at frankstar.at>
Date:   Mon Apr 23 10:10:24 2012 +0200

modified ido2db Mysql Connection Output

---

 tools/icinga_verification.pl |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/tools/icinga_verification.pl b/tools/icinga_verification.pl
index a8f0cfa..c5067cf 100644
--- a/tools/icinga_verification.pl
+++ b/tools/icinga_verification.pl
@@ -263,8 +263,10 @@ if ( !$mysqlcheck ) {
 
     if ( !$dbh_cfg_error ) {
         $dbh_cfg->disconnect();
-		$dbh_cfg_error = "Connection OK!"
     }
+	else{
+		$dbh_cfg->disconnect();
+	}
 }
 
 
@@ -300,16 +302,21 @@ Icinga Informations:
  ido2db last Connection Info:
  @result_icingaconninfo
  Testing Mysql Connection with ido2db.cfg:
- $dbh_cfg_error
 EOF
 
-print color("red"), "\n $dbh_cfg_error\n", color("reset");
+if (!$dbh_cfg_error){
+	print color("green"), " Connection OK!\n", color("reset");	
+}
+else{
+	print color("red"), " $dbh_cfg_error\n\n", color("reset");
+}
+
+print "\n";
 print <<EOF;
 #Check Services
 Process Status:
 EOF
 
-
 foreach my $service (keys(%{ $config_ref->{'services'} })) {
     my $binary = which (@{ $config_ref->{'services'}->{$service}->{'binaries'} });
     if (! $binary ) {





More information about the icinga-checkins mailing list