1 <?php
defined('SYSPATH') OR die('No direct access allowed.');
3 * Hosts widget for monitoring performance
7 class Monitoring_performance_Widget
extends widget_Base
{
8 protected $duplicatable = true;
9 public function index()
11 # fetch widget view path
12 $view_path = $this->view_path('view');
14 $label_passive_host_svc_check = _('# Passive Host / Service Checks');
16 $current_status = $this->get_current_status();
18 $min_service_execution_time= number_format($current_status->svc_perf
->execution_time_min
, 2);
19 $max_service_execution_time = number_format($current_status->svc_perf
->execution_time_max
, 2);
20 $average_service_execution_time = number_format($current_status->svc_perf
->execution_time_avg
, 3);
21 $min_service_latency = number_format($current_status->svc_perf
->latency_min
, 2);
22 $max_service_latency = number_format($current_status->svc_perf
->latency_max
, 2);
23 $average_service_latency = number_format($current_status->svc_perf
->latency_avg
, 3);
25 $min_host_execution_time = number_format($current_status->hst_perf
->execution_time_min
, 2);
26 $max_host_execution_time = number_format($current_status->hst_perf
->execution_time_max
, 2);
27 $average_host_execution_time = number_format($current_status->hst_perf
->execution_time_avg
, 3);
28 $min_host_latency = number_format($current_status->hst_perf
->latency_min
, 2);
29 $max_host_latency = number_format($current_status->hst_perf
->latency_max
, 2);
30 $average_host_latency = number_format($current_status->hst_perf
->latency_avg
, 3);
32 $total_active_host_checks = $current_status->hst
->total_active
;
33 $total_active_service_checks = $current_status->svc
->total_active
;
34 $total_passive_host_checks = $current_status->hst
->total_passive
;
35 $total_passive_service_checks = $current_status->svc
->total_passive
;