--- ./frontends/php/include/forms.inc.php.orig	2010-10-18 11:37:46.000000000 +0400
+++ ./frontends/php/include/forms.inc.php	2010-10-18 11:39:33.000000000 +0400
@@ -1500,7 +1500,7 @@
 		$history		= get_request('history',		90);
 		$status			= get_request('status',			0);
 		$type			= get_request('type',			0);
-		$snmp_community		= get_request('snmp_community',		'public');
+		$snmp_community		= get_request('snmp_community',		'{$COMMUNITY}');
 		$snmp_oid		= get_request('snmp_oid',		'interfaces.ifTable.ifEntry.ifInOctets.1');
 		$snmp_port		= get_request('snmp_port',		161);
 		$value_type		= get_request('value_type',		ITEM_VALUE_TYPE_UINT64);
@@ -2209,7 +2209,7 @@
 		$history	= get_request('history'		,90);
 		$status		= get_request('status'		,0);
 		$type		= get_request('type'		,0);
-		$snmp_community	= get_request('snmp_community'	,'public');
+		$snmp_community	= get_request('snmp_community'	,'{$COMMUNITY}');
 		$snmp_oid	= get_request('snmp_oid'	,'interfaces.ifTable.ifEntry.ifInOctets.1');
 		$snmp_port	= get_request('snmp_port'	,161);
 		$value_type	= get_request('value_type'	,ITEM_VALUE_TYPE_UINT64);
--- ./include/zbxserver.h.orig	2010-10-18 01:00:07.000000000 +0400
+++ ./include/zbxserver.h	2010-10-18 11:35:25.000000000 +0400
@@ -46,6 +46,7 @@
 		DC_ITEM *dc_item, DB_ESCALATION *escalation, char **data, int macro_type,
 		char *error, int maxerrlen);
 void	substitute_macros(DB_EVENT *event, DB_ACTION *action, DB_ESCALATION *escalation, char **data);
+void    item_description(char **data, const char *key, zbx_uint64_t hostid);
 
 int	evaluate_expression(int *result, char **expression, time_t now,
 		zbx_uint64_t trigggerid, int trigger_value, char *error, int maxerrlen);
--- ./src/zabbix_server/poller/checks_snmp.c.orig	2010-10-18 01:00:07.000000000 +0400
+++ ./src/zabbix_server/poller/checks_snmp.c	2010-10-18 11:35:25.000000000 +0400
@@ -176,6 +176,7 @@
 	const char		*__function_name = "snmp_open_session";
 	struct snmp_session	session, *ss = NULL;
 	char			addr[128], *conn;
+	char			*p = NULL;
 #ifdef HAVE_IPV6
 	int			family;
 #endif	/* HAVE_IPV6 */
@@ -210,7 +211,9 @@
 
 	if (session.version == SNMP_VERSION_1 || session.version == SNMP_VERSION_2c)
 	{
-		session.community = (u_char *)item->snmp_community;
+		p = zbx_dsprintf(p, "%s", item->snmp_community);
+		item_description(&p, item->key, item->host.hostid); // HACK: global macros and key parameters in community string
+		session.community = (u_char *)p;
 		session.community_len = strlen((void *)session.community);
 		zabbix_log(LOG_LEVEL_DEBUG, "SNMP [%s@%s]", session.community, session.peername);
 	}
@@ -689,6 +692,7 @@
 	int	idx;
 	char	*pl;
 	int	num;
+	char	*p = NULL;
 
 	zabbix_log(LOG_LEVEL_DEBUG, "In %s() key:'%s' oid:'%s'",
 			__function_name, item->key_orig, item->snmp_oid);
@@ -716,6 +720,12 @@
 	case 0:
 		zabbix_log(LOG_LEVEL_DEBUG, "Standard processing");
 		snmp_normalize(oid_normalized, item->snmp_oid, sizeof(oid_normalized));
+
+		p = zbx_dsprintf(p, "%s", oid_normalized);
+		item_description(&p, item->key, item->host.hostid); // HACK: global macros and key parameters in SNMP_INDEX_VALUE
+		zbx_snprintf(oid_normalized, sizeof(oid_normalized), "%s", p);
+		zbx_free(p);
+
 		ret = get_snmp(ss, item, oid_normalized, value);
 		break;
 	case 3:
@@ -748,6 +758,16 @@
 
 			snmp_normalize(oid_normalized, oid_index, sizeof(oid_normalized));
 
+			p = zbx_dsprintf(p, "%s", oid_normalized);
+			item_description(&p, item->key, item->host.hostid); // HACK: global macros and key parameters in SNMP_INDEX_OID
+			zbx_snprintf(oid_normalized, sizeof(oid_normalized), "%s", p);
+
+			p = zbx_dsprintf(p, "%s", index_value);
+			item_description(&p, item->key, item->host.hostid); // HACK: global macros and key parameters in SNMP_INDEX_VALUE
+			zbx_snprintf(index_value, sizeof(index_value), "%s", p);
+
+			zbx_free(p);
+
 			if (SUCCEED == (ret = cache_get_snmp_index(oid_normalized, index_value, &idx)))
 			{
 				zbx_snprintf(oid_full, sizeof(oid_full), "%s.%d", oid_normalized, idx);
@@ -783,7 +803,11 @@
 			snmp_normalize(oid_normalized, item->snmp_oid, sizeof(oid_normalized));
 			pl[0] = '[';
 
-			zbx_snprintf(oid_full, sizeof(oid_full), "%s.%d", oid_normalized, idx);
+			p = zbx_dsprintf(p, "%s", oid_normalized);
+			item_description(&p, item->key, item->host.hostid); // HACK: global macros and key parameters in SNMP_OID
+			zbx_snprintf(oid_full, sizeof(oid_full), "%s.%d", p, idx);
+			zbx_free(p);
+
 			zabbix_log(LOG_LEVEL_DEBUG, "Full OID:%s", oid_full);
 
 			ret = get_snmp(ss, item, oid_full, value);
--- ./src/libs/zbxserver/expression.c.orig	2010-10-18 01:00:07.000000000 +0400
+++ ./src/libs/zbxserver/expression.c	2010-10-18 11:35:25.000000000 +0400
@@ -817,7 +817,7 @@
  * Comments:                                                                  *
  *                                                                            *
  ******************************************************************************/
-static void	item_description(char **data, const char *key, zbx_uint64_t hostid)
+void	item_description(char **data, const char *key, zbx_uint64_t hostid)
 {
 	char	c, *p, *m, *n, *str_out = NULL, *replace_to = NULL, params[MAX_STRING_LEN], param[MAX_STRING_LEN];
 
