[icinga-checkins] icinga.org: icinga-core/fholzer/core: fix output "idomod Connections" to " ido2db processes and idomod Connections"

git at icinga.org git at icinga.org
Wed Apr 25 15:24:14 CEST 2012


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

Author: Franz Holzer <office at frankstar.at>
Date:   Wed Apr 25 15:24:21 2012 +0200

fix output "idomod Connections" to "ido2db processes and idomod Connections"

---

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

diff --git a/tools/icinga_verification.pl b/tools/icinga_verification.pl
index 0c5cb28..adbd8e4 100644
--- a/tools/icinga_verification.pl
+++ b/tools/icinga_verification.pl
@@ -226,8 +226,11 @@ my @idolog = get_error_from_log("/var/log/messages", 'ido2db');
 ################################
 
 #check if ido2db is running
-my $idocheck = qx( ps aux | grep [i]do2db | wc -l );
-chomp($idocheck);
+my $ido2dbproc = qx( ps aux | grep [i]do2db | wc -l );
+chomp($ido2dbproc);
+
+#check idomod Connections
+my $idocon = ($ido2dbproc - '1');
 
 #icinga.cfg parsing
 #icinga external commands
@@ -346,7 +349,8 @@ Selinux Status:
 Icinga General Informations:
  icinga version: $icingaversion
  ido2db version: $ido2dbversion
- idomod Connections: $idocheck
+ ido2db Processes: $ido2dbproc
+ idomod Connections: $idocon
  Icinga DB-Version: $result_icingadb[0]
  ido2db last Connection Info:
  @result_icingaconninfo 
@@ -467,7 +471,8 @@ print <<EOF;
  <pre>
  icinga version: $icingaversion
  ido2db version: $ido2dbversion
- idomod Connections: $idocheck
+ ido2db Processes: $ido2dbproc
+ idomod Connections: $idocon
  Icinga DB-Version: $result_icingadb[0]
  ido2db last Connection Info:
  @result_icingaconninfo 





More information about the icinga-checkins mailing list