diff --git a/modules/monitoring/application/controllers/ProcessController.php b/modules/monitoring/application/controllers/ProcessController.php index 1152df09d..71d42fe21 100644 --- a/modules/monitoring/application/controllers/ProcessController.php +++ b/modules/monitoring/application/controllers/ProcessController.php @@ -52,26 +52,39 @@ class Monitoring_ProcessController extends MonitoringController public function init() { $this->backend = Backend::createBackend($this->_getParam('backend')); + $this->getTabs()->add('info', array( + 'title' => 'Process Info', + 'url' =>'monitoring/process/info' + ))->add('performance', array( + 'title' => 'Performance Info', + 'url' =>'monitoring/process/performance' + )); } - public function performanceAction() + public function infoAction() { - $this->view->runtimevariables = (object)RuntimevariablesView::fromRequest( - $this->_request, - array('varname', 'varvalue') - )->getQuery()->fetchPairs(); + $this->getTabs()->activate('info'); + $this->setAutorefreshInterval(10); $this->view->programstatus = ProgramstatusView::fromRequest( $this->_request )->getQuery()->fetchRow(); + $this->view->backendName = $this->backend->getDefaultBackendName(); + } + + public function performanceAction() + { + $this->getTabs()->activate('performance'); + $this->setAutorefreshInterval(10); + $this->view->runtimevariables = (object) RuntimevariablesView::fromRequest( + $this->_request, + array('varname', 'varvalue') + )->getQuery()->fetchPairs(); + $this->view->checkperformance = $query = RuntimesummaryView::fromRequest( $this->_request )->getQuery()->fetchAll(); - - - - $this->view->backendName = $this->backend->getDefaultBackendName(); } } diff --git a/modules/monitoring/application/views/scripts/process/info.phtml b/modules/monitoring/application/views/scripts/process/info.phtml new file mode 100644 index 000000000..ada365d02 --- /dev/null +++ b/modules/monitoring/application/views/scripts/process/info.phtml @@ -0,0 +1,172 @@ +
+tabs ?> +
+programstatus; +$cf = $this->getHelper('CommandForm'); + +?> + +
+

Backend backendName; ?> is +is_currently_running === '1' ? sprintf('running with pid %d', $ps->process_id) : 'not running'; ?> + since timeSince($ps->program_start_time); ?>. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Last status updatetimeSince($ps->status_update_time) ?> ago
Last check commandtimeSince($ps->last_command_check) ?> ago
Global host event handlerglobal_host_event_handler ? $ps->global_host_event_handler : 'Not set' ?>
Global service event handlerglobal_service_event_handler ? $ps->global_service_event_handler : 'Not set' ?>
Notifications enabledtoggleSubmitForm( + '', + $ps->notifications_enabled, + 'enablenotifications', + 'disablenotifications', + false, + array('global' => '1') + ) ?> +notifications_enabled === '1'): ?> + Temporarily disable +disable_notif_expire_time): ?> +Will be re-enabled in timeUnless($ps->disable_notif_expire_time) ?> + + +
Execute active service checkstoggleSubmitForm( + '', + $ps->active_service_checks_enabled, + 'enableactivechecks', + 'disableactivechecks', + false, + array('global' => 'service') + ) ?>
Accept passive service checkstoggleSubmitForm( + '', + $ps->passive_service_checks_enabled, + 'startacceptingpassivechecks', + 'stopacceptingpassivechecks', + false, + array('global' => 'service') + ) ?>
Execute active host checkstoggleSubmitForm( + '', + $ps->active_host_checks_enabled, + 'enableactivechecks', + 'disableactivechecks', + false, + array('global' => 'host') + ) ?>
Accept passive host checkstoggleSubmitForm( + '', + $ps->passive_host_checks_enabled, + 'startacceptingpassivechecks', + 'stopacceptingpassivechecks', + false, + array('global' => 'host') + ) ?>
Eventhandlers enabledtoggleSubmitForm( + '', + $ps->event_handlers_enabled, + 'enableeventhandler', + 'disableeventhandler', + false, + array('global' => '1') + ) ?>
Obsessing over host checkstoggleSubmitForm( + '', + $ps->obsess_over_hosts, + 'startobsessing', + 'stopobsessing', + false, + array('global' => 'host') + ) ?>
Obsessing over service checkstoggleSubmitForm( + '', + $ps->obsess_over_services, + 'startobsessing', + 'stopobsessing', + false, + array('global' => 'service') + ) ?>
Flap detection enabledtoggleSubmitForm( + '', + $ps->flap_detection_enabled, + 'enableflapdetection', + 'disableflapdetection', + false, + array('global' => '1') + ) ?>
Process performance datatoggleSubmitForm( + '', + $ps->process_performance_data, + 'enableperformancedata', + 'disableperformancedata', + false, + array('global' => '1') + ) ?>
Monitoring ProcesslabelSubmitForm( + 'Restart', + 'Restart the monitoring process', + '', + 'restartprocess' + ) ?> + +
+ +

diff --git a/modules/monitoring/application/views/scripts/process/performance.phtml b/modules/monitoring/application/views/scripts/process/performance.phtml index 54cbf5a2b..6276d76d1 100644 --- a/modules/monitoring/application/views/scripts/process/performance.phtml +++ b/modules/monitoring/application/views/scripts/process/performance.phtml @@ -1,385 +1,109 @@ +
+tabs ?> +
runtimeVariables()->create($this->runtimevariables); - $ps = $this->programstatus; - $cp = $this->checkPerformance()->create($this->checkperformance); - /** @var Zend_View_Helper_CommandForm $ch */ - $ch = $this->getHelper('CommandForm'); + +$rv = $this->runtimeVariables()->create($this->runtimevariables); +$cp = $this->checkPerformance()->create($this->checkperformance); + ?> -

Process Information

-
+
+ +

Object summaries

+ + + + + + + + + + + + + + + + + + + + + + + +
 # overall / scheduled
+ Hosts + + total_hosts; ?> + / total_scheduled_hosts; ?> +
+ Services + + total_services; ?> + / total_scheduled_services; ?> +
+ Average services per host + + average_services_per_host); ?> + / average_scheduled_services_per_host); ?> +
+ +

Active checks

+ + + + + + + + + + + + + + + + + + + + + + + +
 #LatencyExecution time
+ Host Checks + host_active_count; ?>host_active_latency_avg); ?>shost_active_execution_avg); ?>s
+ Service Checks + service_active_count; ?>service_active_latency_avg); ?>sservice_active_execution_avg); ?>s
+ +

Passive checks

+ + + + + + + + + + + + + + + + + +
 #
+ Host Checks + host_passive_count; ?>
+ Service Checks + service_passive_count; ?>
+ -
-
- Backend backendName; ?> is - is_currently_running === '1' ? 'running' : 'not running'; ?> - (pid process_id; ?>) - since timeSince($ps->program_start_time); ?> ago - (dateFormat()->formatDateTime($ps->program_start_time); ?>). -
-
- -disable_notif_expire_time): ?> -
-

Notifications disabled with expiration time

-

- Notifications automatically turned on again on the - dateFormat()->formatDateTime($ps->disable_notif_expire_time); ?> -

-
- - -
-
-

Object summaries

- - - - - - - - - - - - - - - - - - - - - - - -
 # overall / scheduled
- Hosts - - total_hosts; ?> - / total_scheduled_hosts; ?> -
- Services - - total_services; ?> - / total_scheduled_services; ?> -
- Average services per host - - average_services_per_host); ?> - / average_scheduled_services_per_host); ?> -
- -

Active checks

- - - - - - - - - - - - - - - - - - - - - - - -
 #LatencyExecution time
- Host Checks - host_active_count; ?>host_active_latency_avg); ?>shost_active_execution_avg); ?>s
- Service Checks - service_active_count; ?>service_active_latency_avg); ?>sservice_active_execution_avg); ?>s
- -

Passive checks

- - - - - - - - - - - - - - - - - -
 #
- Host Checks - host_passive_count; ?>
- Service Checks - service_passive_count; ?>
- -

Actuality

- - - - - - - - - - - -
- Last status update - - dateFormat()->formatDateTime($ps->status_update_time); ?> - (since timeSince($ps->status_update_time); ?> ago) -
- Last check command - - dateFormat()->formatDateTime($ps->last_command_check); ?> - (since timeSince($ps->last_command_check); ?> ago) -
- -

Configuration

- - - - - - - - - - - -
- Global host event handler - - global_host_event_handler): ?> - global_host_event_handler; ?> - - Not set - -
- Global service event handler - - global_service_event_handler): ?> - global_service_event_handler; ?> - - Not set - -
-
-
-

Commands

- - labelSubmitForm( - 'Shutdown monitoring process', - 'Shutdown the monitoring process', - 'btn-cta', - 'shutdownprocess' - ); - ?> - -
- - labelSubmitForm( - 'Restart monitoring process', - 'Restart the monitoring process', - 'btn-cta', - 'restartprocess' - ); - ?> - - notifications_enabled === '1'): ?> - -
- - - Disable notification with expire - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- toggleSubmitForm( - 'Notifications enabled', - $ps->notifications_enabled, - 'enablenotifications', - 'disablenotifications', - false, - array( - 'global' => '1' - ) - ); - ?> -
- toggleSubmitForm( - 'Execute active service checks', - $ps->active_service_checks_enabled, - 'enableactivechecks', - 'disableactivechecks', - false, - array( - 'global' => 'service' - ) - ); - ?> -
- toggleSubmitForm( - 'Accept passive service checks', - $ps->passive_service_checks_enabled, - 'startacceptingpassivechecks', - 'stopacceptingpassivechecks', - false, - array( - 'global' => 'service' - ) - ); - ?> -
- toggleSubmitForm( - 'Execute active host checks', - $ps->active_host_checks_enabled, - 'enableactivechecks', - 'disableactivechecks', - false, - array( - 'global' => 'host' - ) - ); - ?> -
- toggleSubmitForm( - 'Accept passive host checks', - $ps->passive_host_checks_enabled, - 'startacceptingpassivechecks', - 'stopacceptingpassivechecks', - false, - array( - 'global' => 'host' - ) - ); - ?> -
- toggleSubmitForm( - 'Eventhandlers enabled', - $ps->event_handlers_enabled, - 'enableeventhandler', - 'disableeventhandler', - false, - array( - 'global' => '1' - ) - ); - ?> -
- toggleSubmitForm( - 'Obsessing over host checks', - $ps->obsess_over_hosts, - 'startobsessing', - 'stopobsessing', - false, - array( - 'global' => 'host' - ) - ); - ?> -
- toggleSubmitForm( - 'Obsessing over service checks', - $ps->obsess_over_services, - 'startobsessing', - 'stopobsessing', - false, - array( - 'global' => 'service' - ) - ); - ?> -
- toggleSubmitForm( - 'Flap detection enabled', - $ps->flap_detection_enabled, - 'enableflapdetection', - 'disableflapdetection', - false, - array( - 'global' => '1' - ) - ); - ?> -
- toggleSubmitForm( - 'Process performance data', - $ps->process_performance_data, - 'enableperformancedata', - 'disableperformancedata', - false, - array( - 'global' => '1' - ) - ); - ?> -
-
diff --git a/modules/monitoring/public/css/module.less b/modules/monitoring/public/css/module.less index b353ca40b..1ba6ad5f6 100644 --- a/modules/monitoring/public/css/module.less +++ b/modules/monitoring/public/css/module.less @@ -7,3 +7,6 @@ table.action.comments td a, table.action.downtimes td a { font-weight: bold; } +.content.processinfo table.avp th { + width: 16em; +}