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 @@ +
Backend = $this->backendName; ?> is += $ps->is_currently_running === '1' ? sprintf('running with pid %d', $ps->process_id) : 'not running'; ?> + since = $this->timeSince($ps->program_start_time); ?>. + +
Last status update | += $this->timeSince($ps->status_update_time) ?> ago | +
---|---|
Last check command | += $this->timeSince($ps->last_command_check) ?> ago | +
Global host event handler | += $ps->global_host_event_handler ? $ps->global_host_event_handler : 'Not set' ?> | +
Global service event handler | += $ps->global_service_event_handler ? $ps->global_service_event_handler : 'Not set' ?> | +
Notifications enabled | += $cf->toggleSubmitForm( + '', + $ps->notifications_enabled, + 'enablenotifications', + 'disablenotifications', + false, + array('global' => '1') + ) ?> +notifications_enabled === '1'): ?> + Temporarily disable +disable_notif_expire_time): ?> +Will be re-enabled in = $this->timeUnless($ps->disable_notif_expire_time) ?> + + + | +
Execute active service checks | += $cf->toggleSubmitForm( + '', + $ps->active_service_checks_enabled, + 'enableactivechecks', + 'disableactivechecks', + false, + array('global' => 'service') + ) ?> | +
Accept passive service checks | += $cf->toggleSubmitForm( + '', + $ps->passive_service_checks_enabled, + 'startacceptingpassivechecks', + 'stopacceptingpassivechecks', + false, + array('global' => 'service') + ) ?> | +
Execute active host checks | += $cf->toggleSubmitForm( + '', + $ps->active_host_checks_enabled, + 'enableactivechecks', + 'disableactivechecks', + false, + array('global' => 'host') + ) ?> | +
Accept passive host checks | += $cf->toggleSubmitForm( + '', + $ps->passive_host_checks_enabled, + 'startacceptingpassivechecks', + 'stopacceptingpassivechecks', + false, + array('global' => 'host') + ) ?> | +
Eventhandlers enabled | += $cf->toggleSubmitForm( + '', + $ps->event_handlers_enabled, + 'enableeventhandler', + 'disableeventhandler', + false, + array('global' => '1') + ) ?> | +
Obsessing over host checks | += $cf->toggleSubmitForm( + '', + $ps->obsess_over_hosts, + 'startobsessing', + 'stopobsessing', + false, + array('global' => 'host') + ) ?> | +
Obsessing over service checks | += $cf->toggleSubmitForm( + '', + $ps->obsess_over_services, + 'startobsessing', + 'stopobsessing', + false, + array('global' => 'service') + ) ?> | +
Flap detection enabled | += $cf->toggleSubmitForm( + '', + $ps->flap_detection_enabled, + 'enableflapdetection', + 'disableflapdetection', + false, + array('global' => '1') + ) ?> | +
Process performance data | += $cf->toggleSubmitForm( + '', + $ps->process_performance_data, + 'enableperformancedata', + 'disableperformancedata', + false, + array('global' => '1') + ) ?> | +
Monitoring Process | += $cf->labelSubmitForm( + 'Restart', + 'Restart the monitoring process', + '', + 'restartprocess' + ) ?> + + | +
+ | # overall / scheduled | +
+ Hosts + | ++ = $rv->total_hosts; ?> + / = $rv->total_scheduled_hosts; ?> + | +
+ Services + | ++ = $rv->total_services; ?> + / = $rv->total_scheduled_services; ?> + | +
+ Average services per host + | ++ = sprintf('%.2f', $rv->average_services_per_host); ?> + / = sprintf('%.2f', $rv->average_scheduled_services_per_host); ?> + | +
+ | # | +Latency | +Execution time | +
+ Host Checks + | += $cp->host_active_count; ?> | += sprintf('%.3f', $cp->host_active_latency_avg); ?>s | += sprintf('%.3f', $cp->host_active_execution_avg); ?>s | +
+ Service Checks + | += $cp->service_active_count; ?> | += sprintf('%.3f', $cp->service_active_latency_avg); ?>s | += sprintf('%.3f', $cp->service_active_execution_avg); ?>s | +
+ | # | +
+ Host Checks + | += $cp->host_passive_count; ?> | +
+ Service Checks + | += $cp->service_passive_count; ?> | +
- Notifications automatically turned on again on the - = $this->dateFormat()->formatDateTime($ps->disable_notif_expire_time); ?> -
-- | # overall / scheduled | -
- Hosts - | -- = $rv->total_hosts; ?> - / = $rv->total_scheduled_hosts; ?> - | -
- Services - | -- = $rv->total_services; ?> - / = $rv->total_scheduled_services; ?> - | -
- Average services per host - | -- = sprintf('%.2f', $rv->average_services_per_host); ?> - / = sprintf('%.2f', $rv->average_scheduled_services_per_host); ?> - | -
- | # | -Latency | -Execution time | -
- Host Checks - | -= $cp->host_active_count; ?> | -= sprintf('%.3f', $cp->host_active_latency_avg); ?>s | -= sprintf('%.3f', $cp->host_active_execution_avg); ?>s | -
- Service Checks - | -= $cp->service_active_count; ?> | -= sprintf('%.3f', $cp->service_active_latency_avg); ?>s | -= sprintf('%.3f', $cp->service_active_execution_avg); ?>s | -
- | # | -
- Host Checks - | -= $cp->host_passive_count; ?> | -
- Service Checks - | -= $cp->service_passive_count; ?> | -
- Last status update - | -- = $this->dateFormat()->formatDateTime($ps->status_update_time); ?> - (since = $this->timeSince($ps->status_update_time); ?> ago) - | -
- Last check command - | -- = $this->dateFormat()->formatDateTime($ps->last_command_check); ?> - (since = $this->timeSince($ps->last_command_check); ?> ago) - | -
- Global host event handler - | -- global_host_event_handler): ?> - = $ps->global_host_event_handler; ?> - - Not set - - | -
- Global service event handler - | -- global_service_event_handler): ?> - = $ps->global_service_event_handler; ?> - - Not set - - | -
- = - $ch->toggleSubmitForm( - 'Notifications enabled', - $ps->notifications_enabled, - 'enablenotifications', - 'disablenotifications', - false, - array( - 'global' => '1' - ) - ); - ?> - | -
- = - $ch->toggleSubmitForm( - 'Execute active service checks', - $ps->active_service_checks_enabled, - 'enableactivechecks', - 'disableactivechecks', - false, - array( - 'global' => 'service' - ) - ); - ?> - | -
- = - $ch->toggleSubmitForm( - 'Accept passive service checks', - $ps->passive_service_checks_enabled, - 'startacceptingpassivechecks', - 'stopacceptingpassivechecks', - false, - array( - 'global' => 'service' - ) - ); - ?> - | -
- = - $ch->toggleSubmitForm( - 'Execute active host checks', - $ps->active_host_checks_enabled, - 'enableactivechecks', - 'disableactivechecks', - false, - array( - 'global' => 'host' - ) - ); - ?> - | -
- = - $ch->toggleSubmitForm( - 'Accept passive host checks', - $ps->passive_host_checks_enabled, - 'startacceptingpassivechecks', - 'stopacceptingpassivechecks', - false, - array( - 'global' => 'host' - ) - ); - ?> - | -
- = - $ch->toggleSubmitForm( - 'Eventhandlers enabled', - $ps->event_handlers_enabled, - 'enableeventhandler', - 'disableeventhandler', - false, - array( - 'global' => '1' - ) - ); - ?> - | -
- = - $ch->toggleSubmitForm( - 'Obsessing over host checks', - $ps->obsess_over_hosts, - 'startobsessing', - 'stopobsessing', - false, - array( - 'global' => 'host' - ) - ); - ?> - | -
- = - $ch->toggleSubmitForm( - 'Obsessing over service checks', - $ps->obsess_over_services, - 'startobsessing', - 'stopobsessing', - false, - array( - 'global' => 'service' - ) - ); - ?> - | -
- = - $ch->toggleSubmitForm( - 'Flap detection enabled', - $ps->flap_detection_enabled, - 'enableflapdetection', - 'disableflapdetection', - false, - array( - 'global' => '1' - ) - ); - ?> - | -
- = - $ch->toggleSubmitForm( - 'Process performance data', - $ps->process_performance_data, - 'enableperformancedata', - 'disableperformancedata', - false, - array( - 'global' => '1' - ) - ); - ?> - | -