--- ./include/views/monitoring.dashconf.php.orig	2015-03-12 10:25:15.000000000 +0100
+++ ./include/views/monitoring.dashconf.php	2015-05-19 18:35:50.000000000 +0200
@@ -79,6 +79,13 @@
 	)));
 }
 
+// append hide OK groups checkbox to form list
+$hideOkCheckBox = new CCheckBox('hideOk', $this->data['hideOk'], null, '1');
+if (!$this->data['isFilterEnable']) {
+	$hideOkCheckBox->setAttribute('disabled', 'disabled');
+}
+$dashconfFormList->addRow(null, array($hideOkCheckBox, _('Hide groups/rules without issues')));
+
 // append host in maintenance checkbox to form list
 $maintenanceCheckBox = new CCheckBox('maintenance', $this->data['maintenance'], null, '1');
 if (!$this->data['isFilterEnable']) {
--- ./include/blocks.inc.php.orig	2015-03-12 10:25:15.000000000 +0100
+++ ./include/blocks.inc.php	2015-05-19 18:28:00.000000000 +0200
@@ -344,6 +344,19 @@
 		$name = new CLink($group['name'], 'tr_status.php?groupid='.$group['groupid'].'&hostid=0&show_triggers='.TRIGGERS_OPTION_ONLYTRUE);
 		$groupRow->addItem($name);
 
+		if ($filter['hideOk']) {
+			($filter['extAck'] == EXTACK_OPTION_UNACK) ? $countIndex = 'count_unack' : $countIndex = 'count';
+		
+			if ($group['tab_priority'][TRIGGER_SEVERITY_DISASTER][$countIndex] == 0
+				&& $group['tab_priority'][TRIGGER_SEVERITY_HIGH][$countIndex] == 0
+				&& $group['tab_priority'][TRIGGER_SEVERITY_AVERAGE][$countIndex] == 0
+				&& $group['tab_priority'][TRIGGER_SEVERITY_WARNING][$countIndex] == 0
+				&& $group['tab_priority'][TRIGGER_SEVERITY_INFORMATION][$countIndex] == 0
+				&& $group['tab_priority'][TRIGGER_SEVERITY_NOT_CLASSIFIED][$countIndex] == 0) {
+				continue;
+			}
+		}
+
 		foreach ($group['tab_priority'] as $severity => $data) {
 			if (!is_null($filter['severity']) && !isset($filter['severity'][$severity])) {
 				continue;
@@ -701,6 +714,9 @@
 
 		switch ($filter['extAck']) {
 			case EXTACK_OPTION_ALL:
+				if ($filter['hideOk'] && !$problematic_count) {
+					continue 2;
+				}
 				$group_row->addItem(new CCol(
 					$problematic_count,
 					getSeverityStyle($highest_severity[$group['groupid']], $hosts_data[$group['groupid']]['problematic']))
@@ -708,6 +724,9 @@
 				$group_row->addItem($hosts_data[$group['groupid']]['problematic'] + $hosts_data[$group['groupid']]['ok']);
 				break;
 			case EXTACK_OPTION_UNACK:
+				if ($filter['hideOk'] && !$lastUnack_count) {
+					continue 2;
+				}
 				$group_row->addItem(new CCol(
 					$lastUnack_count,
 					getSeverityStyle((isset($highest_severity2[$group['groupid']]) ? $highest_severity2[$group['groupid']] : 0),
@@ -716,6 +735,9 @@
 				$group_row->addItem($hosts_data[$group['groupid']]['lastUnack'] + $hosts_data[$group['groupid']]['ok']);
 				break;
 			case EXTACK_OPTION_BOTH:
+				if ($filter['hideOk'] && !$lastUnack_count) {
+					continue 2;
+				}
 				$unackspan = $lastUnack_count ? new CSpan(array($lastUnack_count, SPACE._('of').SPACE)) : null;
 				$group_row->addItem(new CCol(array(
 					$unackspan, $problematic_count),
@@ -1146,6 +1168,9 @@
 
 	foreach ($groups as $group) {
 		if (!empty($data[$group['groupid']])) {
+			if ($filter['hideOk'] && empty($data[$group['groupid']]['failed'])) {
+				continue;
+			}
 			$table->addRow(array(
 				is_show_all_nodes() ? $group['nodename'] : null,
 				$group['name'],
@@ -1164,7 +1189,7 @@
 	return new CDiv(array($table, $script));
 }
 
-function make_discovery_status() {
+function make_discovery_status($filter) {
 	$options = array(
 		'filter' => array('status' => DHOST_STATUS_ACTIVE),
 		'selectDHosts' => array('druleid', 'dhostid', 'status'),
@@ -1210,6 +1235,9 @@
 	$table->setHeader($header,'header');
 
 	foreach ($drules as $drule) {
+		if ($filter['hideOk'] && $drule['down'] == 0) {
+			continue;
+		}
 		$table->addRow(array(
 			$drule['nodename'],
 			new CLink($drule['nodename'].($drule['nodename'] ? NAME_DELIMITER : '').$drule['name'], 'discovery.php?druleid='.$drule['druleid']),
--- ./dashboard.php.orig	2015-03-12 10:25:15.000000000 +0100
+++ ./dashboard.php	2015-05-19 18:39:26.000000000 +0200
@@ -54,6 +54,7 @@
  */
 $dashconf = array();
 $dashconf['groupids'] = null;
+$dashconf['hideOk'] = 0;
 $dashconf['maintenance'] = null;
 $dashconf['severity'] = null;
 $dashconf['extAck'] = 0;
@@ -102,6 +103,8 @@
 		}
 	}
 
+	$dashconf['hideOk'] = CProfile::get('web.dashconf.groups.hideOk', 0);
+
 	// hosts
 	$maintenance = CProfile::get('web.dashconf.hosts.maintenance', 1);
 	$dashconf['maintenance'] = $maintenance == 0 ? 0 : null;
@@ -159,7 +162,7 @@
 					$webovr->show();
 					break;
 				case 'hat_dscvry':
-					$dscvry = make_discovery_status();
+					$dscvry = make_discovery_status($dashconf);
 					$dscvry->show();
 					break;
 			}
--- ./dashconf.php.orig	2015-03-12 10:25:16.000000000 +0100
+++ ./dashconf.php	2015-05-19 18:38:43.000000000 +0200
@@ -38,6 +38,7 @@
 	'grpswitch' =>		array(T_ZBX_INT, O_OPT, P_SYS,	BETWEEN(0, 1),	null),
 	'groupids' =>		array(T_ZBX_INT, O_OPT, P_SYS,	null,			null),
 	'hidegroupids' =>	array(T_ZBX_INT, O_OPT, P_SYS,	null,			null),
+	'hideOk' =>		array(T_ZBX_INT, O_OPT, P_SYS,	BETWEEN(0, 1),	null),
 	'trgSeverity' =>	array(T_ZBX_INT, O_OPT, P_SYS,	null,			null),
 	'maintenance' =>	array(T_ZBX_INT, O_OPT, P_SYS,	BETWEEN(0, 1),	null),
 	'extAck' =>			array(T_ZBX_INT, O_OPT, P_SYS,	null,			null),
@@ -76,6 +77,9 @@
 			}
 		}
 
+		$_REQUEST['hideOk'] = get_request('hideOk', 0);
+		CProfile::update('web.dashconf.groups.hideOk', $_REQUEST['hideOk'], PROFILE_TYPE_INT);
+
 		// hosts
 		$_REQUEST['maintenance'] = get_request('maintenance', 0);
 		CProfile::update('web.dashconf.hosts.maintenance', $_REQUEST['maintenance'], PROFILE_TYPE_INT);
@@ -100,6 +104,7 @@
 
 if (isset($_REQUEST['form_refresh'])) {
 	$data['isFilterEnable'] = get_request('filterEnable', 0);
+	$data['hideOk'] = get_request('hideOk', 0);
 	$data['maintenance'] = get_request('maintenance', 0);
 	$data['extAck'] = get_request('extAck', 0);
 
@@ -115,6 +120,7 @@
 }
 else {
 	$data['isFilterEnable'] = CProfile::get('web.dashconf.filter.enable', 0);
+	$data['hideOk'] = CProfile::get('web.dashconf.groups.hideOk', 0);
 	$data['maintenance'] = CProfile::get('web.dashconf.hosts.maintenance', 1);
 	$data['extAck'] = CProfile::get('web.dashconf.events.extAck', 0);
 
