diff --git a/frontends/php/hostgroups.php b/frontends/php/hostgroups.php
index c649d14..72f4d41 100644
--- a/frontends/php/hostgroups.php
+++ b/frontends/php/hostgroups.php
@@ -46,7 +46,14 @@ $fields = array(
 	'cancel' =>			array(T_ZBX_STR, O_OPT, P_SYS,	null,		null),
 	// other
 	'form' =>			array(T_ZBX_STR, O_OPT, P_SYS,	null,		null),
-	'form_refresh' =>	array(T_ZBX_STR, O_OPT, null,	null,		null)
+	'form_refresh' =>	array(T_ZBX_STR, O_OPT, null,	null,		null),
+	'filter_set' =>			array(T_ZBX_STR, O_OPT, P_ACT,  null, null),
+ 	'filter_name' =>		array(T_ZBX_STR, O_OPT, null,   null, null),
+ 	'filter_member' =>		array(T_ZBX_STR, O_OPT, null,   null, null),
+ 	// ajax
+ 	'favobj' =>			array(T_ZBX_STR, O_OPT, P_ACT,  null,		null),
+ 	'favref' =>			array(T_ZBX_STR, O_OPT, P_ACT,  NOT_EMPTY,	'isset({favobj})'),
+ 	'favstate' =>			array(T_ZBX_INT, O_OPT, P_ACT,  NOT_EMPTY,	'isset({favobj})&&("filter"=={favobj})')
 );
 check_fields($fields);
 validate_sort_and_sortorder('name', ZBX_SORT_UP);
@@ -61,6 +68,31 @@ if (get_request('groupid') && !API::HostGroup()->isWritable(array($_REQUEST['gro
 }
 
 /*
+ * Ajax
+ */
+if (isset($_REQUEST['favobj'])) {
+	if ($_REQUEST['favobj'] == 'filter') {
+ 		CProfile::update('web.hostgroups.filter.state', $_REQUEST['favstate'], PROFILE_TYPE_INT);
+ 	}
+}
+ 
+/*
+ * Filter
+ */
+if (isset($_REQUEST['filter_set'])) {
+	$_REQUEST['filter_name'] = get_request('filter_name');
+	$_REQUEST['filter_member'] = get_request('filter_member');
+
+	CProfile::update('web.hostgroups.filter_name', $_REQUEST['filter_name'], PROFILE_TYPE_STR);
+	CProfile::update('web.hostgroups.filter_member', $_REQUEST['filter_member'], PROFILE_TYPE_STR);
+} 
+else {
+	$_REQUEST['filter_name'] = CProfile::get('web.hostgroups.filter_name');
+	$_REQUEST['filter_member'] = CProfile::get('web.hostgroups.filter_member');
+}
+
+
+/*
  * Actions
  */
 if (isset($_REQUEST['clone']) && isset($_REQUEST['groupid'])) {
@@ -318,17 +350,39 @@ if (isset($_REQUEST['form'])) {
 else {
 	$data = array(
 		'config' => $config,
+		'filter_name' => get_request('filter_name'),
+		'filter_member' => get_request('filter_member'),
 		'displayNodes' => is_array(get_current_nodeid())
 	);
 
 	$sortfield = getPageSortField('name');
 	$sortorder =  getPageSortOrder();
+ 
+ 	if (!zbx_empty($data['filter_member'])) {
+ 		$options = array(
+ 			'editable' => 1,
+ 			'templated_hosts' => 1,
+ 			'search' => array(
+				'host' => $data['filter_member'],
+				'name' => $data['filter_member']),
+ 			'searchByAny' => 1,
+ 			'output' => array('hostid'),
+ 			'limit' => $config['search_limit'] + 1
+ 		);
+ 		$hosts = API::Host()->get($options);
+ 	}
+	else {
+ 		$hosts = null;
+ 	}
+ 
 
 	$groups = API::HostGroup()->get(array(
+		'hostids' => zbx_objectValues($hosts, 'hostid'),
 		'editable' => true,
 		'output' => array('groupid'),
 		'sortfield' => $sortfield,
-		'limit' => $config['search_limit'] + 1
+		'limit' => $config['search_limit'] + 1,
+		'search' => (!zbx_empty($data['filter_name'])) ? array('name' => $data['filter_name']): array()
 	));
 
 	$data['paging'] = getPagingLine($groups, array('groupid'));
diff --git a/frontends/php/include/views/configuration.hostgroups.list.php b/frontends/php/include/views/configuration.hostgroups.list.php
index 70c41e9..1ebb8e1 100644
--- a/frontends/php/include/views/configuration.hostgroups.list.php
+++ b/frontends/php/include/views/configuration.hostgroups.list.php
@@ -19,7 +19,7 @@
 **/
 
 
-$hostGroupWidget = new CWidget();
+$hostGroupWidget = new CWidget(null, 'item-list');
 
 // create new hostgroup button
 $createForm = new CForm('get');
@@ -39,6 +39,36 @@ $hostGroupWidget->addPageHeader(_('CONFIGURATION OF HOST GROUPS'), $createForm);
 $hostGroupWidget->addHeader(_('Host groups'));
 $hostGroupWidget->addHeaderRowNumber();
 
+// filter
+$filter_table = new CTable('', 'filter');
+$filter_table->setAttribute('name', 'zbx_filter');
+$filter_table->setAttribute('id', 'zbx_filter');
+
+$filter_table->addRow(array(
+	new CCol(array(bold(_('Name')), SPACE._('like').': '), 'label col1'),
+	new CCol(new CTextBox('filter_name', $data['filter_name'], ZBX_TEXTBOX_FILTER_SIZE)),
+	new CCol(array(bold(_('Member')), SPACE._('like').': '), 'label col2'),
+	new CCol(new CTextBox('filter_member', $data['filter_member'], ZBX_TEXTBOX_FILTER_SIZE))
+));
+
+$filter = new CButton('filter', _('Filter'), "javascript: create_var('zbx_filter', 'filter_set', '1', true);");
+$filter->useJQueryStyle('main');
+
+$reset = new CButton('reset', _('Reset'), "javascript: clearAllForm('zbx_filter');");
+$reset->useJQueryStyle();
+
+$div_buttons = new CDiv(array($filter, SPACE, $reset));
+$div_buttons->setAttribute('style', 'padding: 4px 0;');
+
+$filter_table->addRow(new CCol($div_buttons, 'center', 4));
+
+$filter_form = new CForm('get');
+$filter_form->setAttribute('name', 'zbx_filter');
+$filter_form->setAttribute('id', 'zbx_filter');
+$filter_form->addItem($filter_table);
+
+$hostGroupWidget->addFlicker($filter_form, CProfile::get('web.hostgroups.filter.state', 0));
+
 // create form
 $hostGroupForm = new CForm();
 $hostGroupForm->setName('hostgroupForm');
