1 <?php
defined('SYSPATH') OR die('No direct access allowed.');
3 * Hosts widget for tactical overview
7 class Tac_problems_Widget
extends gridstat_Widget
{
8 public function __construct($widget_model) {
9 widget_Base
::__construct($widget_model);
12 $this->settings
= array(
14 'title' => _('Network outages'),
15 'icon' => 'shield-outages',
18 'text' => _('%d network outages'),
19 'filter' => '[hosts] state != 0 and has_been_checked = 1 and childs != ""'
24 'title' => _('Hosts down'),
25 'icon' => 'shield-down',
28 // TODO: Passive as active
29 'text' => _('%d unhandled problems'),
30 'filter' => '[hosts] state = 1 and has_been_checked = 1 and scheduled_downtime_depth = 0 and acknowledged = 0 and checks_enabled = 1'
35 'title' => _('Services Critical'),
36 'icon' => 'shield-critical',
39 // TODO: Passive as active
40 'text' => _('%d unhandled problems'),
41 'filter' => '[services] state = 2 and has_been_checked = 1 and scheduled_downtime_depth = 0 and acknowledged = 0 and checks_enabled = 1 and host.state = 0 and host.has_been_checked = 1'
44 // TODO: Passive as active
45 'text' => _('%d on problem hosts'),
46 'filter' => '[services] state = 2 and has_been_checked = 1 and scheduled_downtime_depth = 0 and acknowledged = 0 and checks_enabled = 1 and (host.state != 0 or host.has_been_checked = 0)'
51 'title' => _('Services Warning'),
52 'icon' => 'shield-warning',
55 // TODO: Passive as active
56 'text' => _('%d unhandled problems'),
57 'filter' => '[services] state = 1 and has_been_checked = 1 and scheduled_downtime_depth = 0 and acknowledged = 0 and checks_enabled = 1 and host.state = 0 and host.has_been_checked = 1'
60 // TODO: Passive as active
61 'text' => _('%d on problem hosts'),
62 'filter' => '[services] state = 1 and has_been_checked = 1 and scheduled_downtime_depth = 0 and acknowledged = 0 and checks_enabled = 1 and (host.state != 0 or host.has_been_checked = 0)'
67 'title' => _('Services Unknown'),
68 'icon' => 'shield-unknown',
71 // TODO: Passive as active
72 'text' => _('%d unhandled problems'),
73 'filter' => '[services] state = 3 and has_been_checked = 1 and scheduled_downtime_depth = 0 and acknowledged = 0 and checks_enabled = 1 and host.state = 0 and host.has_been_checked = 1'
76 // TODO: Passive as active
77 'text' => _('%d on problem hosts'),
78 'filter' => '[services] state = 3 and has_been_checked = 1 and scheduled_downtime_depth = 0 and acknowledged = 0 and checks_enabled = 1 and (host.state != 0 or host.has_been_checked = 0)'