Module: nagvis Branch: master Commit: 471b656a11f275a588d31e847bed75f16e58d153 URL: http://nagvis.git.sourceforge.net/git/gitweb.cgi?p=nagvis/nagvis;a=commit;h=471b656a11f275a588d31e847bed75f16e58d153
Author: Lars Michelsen <[email protected]> Date: Mon Dec 13 19:21:25 2010 +0100 Backends do fetch the check_command parameter from sources now --- ChangeLog | 2 ++ .../core/classes/GlobalBackendmklivestatus.php | 9 ++++++--- share/server/core/classes/GlobalBackendndomy.php | 6 ++++-- share/server/core/classes/objects/NagiosHost.php | 1 + .../server/core/classes/objects/NagiosService.php | 1 + 5 files changed, 14 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9760055..eee7721 100644 --- a/ChangeLog +++ b/ChangeLog @@ -13,6 +13,8 @@ Core no whole screen errors anymore * Refactored map configuration parsing code * Reimplemented maintenance mode: in_maintenance=1 is working again + * The check_command parameter is available in NagVis now. NDO and + MKLivestatus backends fetch this info from the datasources now * Bugfix: SQLite Update problem while updating from 1.5b1-1.5b3 to 1.5.4/1.5.5 * Bugfix: Fixed configuration file cache when using multiple main config files diff --git a/share/server/core/classes/GlobalBackendmklivestatus.php b/share/server/core/classes/GlobalBackendmklivestatus.php index 16fb6ff..5ab33a6 100644 --- a/share/server/core/classes/GlobalBackendmklivestatus.php +++ b/share/server/core/classes/GlobalBackendmklivestatus.php @@ -471,7 +471,8 @@ class GlobalBackendmklivestatus implements GlobalBackendInterface { "address notes last_check next_check state_type ". "current_attempt max_check_attempts last_state_change ". "last_hard_state_change statusmap_image perf_data ". - "acknowledged scheduled_downtime_depth has_been_checked name\n". + "acknowledged scheduled_downtime_depth has_been_checked name ". + "check_command\n". $objFilter; $l = $this->queryLivestatus($q); @@ -515,7 +516,8 @@ class GlobalBackendmklivestatus implements GlobalBackendInterface { 'last_state_change' => $e[11], 'last_hard_state_change' => $e[12], 'statusmap_image' => $e[13], - 'perfdata' => $e[14] + 'perfdata' => $e[14], + 'check_command' => $e[19] ); /** @@ -583,7 +585,7 @@ class GlobalBackendmklivestatus implements GlobalBackendInterface { "state_type current_attempt max_check_attempts last_state_change ". "last_hard_state_change perf_data scheduled_downtime_depth ". "acknowledged host_acknowledged host_scheduled_downtime_depth ". - "has_been_checked host_name\n"); + "has_been_checked host_name check_command\n"); $arrReturn = Array(); if(is_array($l) && count($l) > 0) { @@ -676,6 +678,7 @@ class GlobalBackendmklivestatus implements GlobalBackendInterface { $arrTmpReturn['last_state_change'] = $e[12]; $arrTmpReturn['last_hard_state_change'] = $e[13]; $arrTmpReturn['perfdata'] = $e[14]; + $arrTmpReturn['check_command'] = $e[21]; } if($specific) { diff --git a/share/server/core/classes/GlobalBackendndomy.php b/share/server/core/classes/GlobalBackendndomy.php index 21ebf16..a3dd192 100644 --- a/share/server/core/classes/GlobalBackendndomy.php +++ b/share/server/core/classes/GlobalBackendndomy.php @@ -519,7 +519,7 @@ class GlobalBackendndomy implements GlobalBackendInterface { problem_has_been_acknowledged, statusmap_image, UNIX_TIMESTAMP(last_check) AS last_check, UNIX_TIMESTAMP(next_check) AS next_check, - hs.state_type, hs.current_check_attempt, hs.max_check_attempts, + hs.state_type, hs.current_check_attempt, hs.max_check_attempts, hs.check_command UNIX_TIMESTAMP(dh.scheduled_start_time) AS downtime_start, UNIX_TIMESTAMP(dh.scheduled_end_time) AS downtime_end, dh.author_name AS downtime_author, dh.comment_data AS downtime_data FROM @@ -543,6 +543,7 @@ class GlobalBackendndomy implements GlobalBackendInterface { $arrTmpReturn['address'] = $data['address']; $arrTmpReturn['statusmap_image'] = $data['statusmap_image']; $arrTmpReturn['notes'] = $data['notes']; + $arrTmpReturn['check_command'] = $data['check_command']; // Add Additional information to array $arrTmpReturn['perfdata'] = $data['perfdata']; @@ -639,7 +640,7 @@ class GlobalBackendndomy implements GlobalBackendInterface { UNIX_TIMESTAMP(ss.last_state_change) AS last_state_change, ss.output, ss.perfdata, ss.problem_has_been_acknowledged, UNIX_TIMESTAMP(ss.last_check) AS last_check, UNIX_TIMESTAMP(ss.next_check) AS next_check, - ss.state_type, ss.current_check_attempt, ss.max_check_attempts, + ss.state_type, ss.current_check_attempt, ss.max_check_attempts, ss.check_command, UNIX_TIMESTAMP(dh.scheduled_start_time) AS downtime_start, UNIX_TIMESTAMP(dh.scheduled_end_time) AS downtime_end, dh.author_name AS downtime_author, dh.comment_data AS downtime_data FROM @@ -674,6 +675,7 @@ class GlobalBackendndomy implements GlobalBackendInterface { $arrTmpReturn['alias'] = $data['display_name']; $arrTmpReturn['address'] = $data['address']; $arrTmpReturn['notes'] = $data['notes']; + $arrTmpReturn['check_command'] = $data['check_command']; // Add additional information to array $arrTmpReturn['perfdata'] = $data['perfdata']; diff --git a/share/server/core/classes/objects/NagiosHost.php b/share/server/core/classes/objects/NagiosHost.php index 76056e5..449594e 100644 --- a/share/server/core/classes/objects/NagiosHost.php +++ b/share/server/core/classes/objects/NagiosHost.php @@ -32,6 +32,7 @@ class NagiosHost extends NagVisStatefulObject { protected $address; protected $statusmap_image; protected $notes; + protected $check_command; protected $perfdata; protected $last_check; diff --git a/share/server/core/classes/objects/NagiosService.php b/share/server/core/classes/objects/NagiosService.php index 6c73367..ab4cdc4 100644 --- a/share/server/core/classes/objects/NagiosService.php +++ b/share/server/core/classes/objects/NagiosService.php @@ -33,6 +33,7 @@ class NagiosService extends NagVisStatefulObject { protected $display_name; protected $address; protected $notes; + protected $check_command; protected $perfdata; protected $last_check; ------------------------------------------------------------------------------ Lotusphere 2011 Register now for Lotusphere 2011 and learn how to connect the dots, take your collaborative environment to the next level, and enter the era of Social Business. http://p.sf.net/sfu/lotusphere-d2d _______________________________________________ Nagvis-checkins mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nagvis-checkins
