Index: include/common.h
===================================================================
--- include/common.h	(revision 40766)
+++ include/common.h	(working copy)
@@ -675,6 +675,7 @@
 #define DISCOVERER_DELAY	60
 
 #define	GET_SENDER_TIMEOUT	60
+#define	GET_SENDER_TIMEOUT_STR	"60"
 
 #ifndef MAX
 #	define MAX(a, b) ((a) > (b) ? (a) : (b))
Index: man/zabbix_get.man
===================================================================
--- man/zabbix_get.man	(revision 40766)
+++ man/zabbix_get.man	(working copy)
@@ -10,6 +10,8 @@
 .IP "-s, --host \fI<host name or IP>\fR"
 Specify host name or IP address of a host.
 .IP "-p, --port \fI<port number>\fR"
+Specify the connection timeout in seconds. Default is 60.
+.IP "-t, --timeout \fI<seconds>\fR"
 Specify port number of agent running on the host. Default is 10050.
 .IP "-I, --source-address \fI<IP address>\fR"
 Specify source IP address.
Index: src/zabbix_get/zabbix_get.c
===================================================================
--- src/zabbix_get/zabbix_get.c	(revision 40766)
+++ src/zabbix_get/zabbix_get.c	(working copy)
@@ -27,11 +27,13 @@
 
 const char	*progname = NULL;
 const char	title_message[] = "Zabbix get";
-const char	usage_message[] = "[-hV] -s <host name or IP> [-p <port>] [-I <IP address>] -k <key>";
+const char	usage_message[] = "[-hV] -s <host name or IP> [-p <port>] [-t <timeout>] [-I <IP address>] -k <key>";
 
+//TODO: Maximum timeout?
 const char	*help_message[] = {
 	"Options:",
 	"  -s --host <host name or IP>          Specify host name or IP address of a host",
+	"  -t --timeout <seconds>               Specify the connection timeout. Default is " GET_SENDER_TIMEOUT_STR,
 	"  -p --port <port number>              Specify port number of agent running on the host. Default is " ZBX_DEFAULT_AGENT_PORT_STR,
 	"  -I --source-address <IP address>     Specify source IP address",
 	"",
@@ -51,6 +53,7 @@
 {
 	{"host",		1,	NULL,	's'},
 	{"port",		1,	NULL,	'p'},
+	{"timeout",		1,	NULL,	't'},
 	{"key",			1,	NULL,	'k'},
 	{"source-address",	1,	NULL,	'I'},
 	{"help",		0,	NULL,	'h'},
@@ -59,7 +62,7 @@
 };
 
 /* short options */
-static char     shortopts[] = "s:p:k:I:hV";
+static char     shortopts[] = "s:p:t:k:I:hV";
 
 /* end of COMMAND LINE OPTIONS */
 
@@ -108,7 +111,7 @@
  * Comments:                                                                  *
  *                                                                            *
  ******************************************************************************/
-static int	get_value(const char *source_ip, const char *host, unsigned short port, const char *key, char **value)
+static int	get_value(const char *source_ip, const char *host, unsigned short port, unsigned short timeout, const char *key, char **value)
 {
 	zbx_sock_t	s;
 	int		ret;
@@ -118,7 +121,7 @@
 
 	*value = NULL;
 
-	if (SUCCEED == (ret = zbx_tcp_connect(&s, source_ip, host, port, GET_SENDER_TIMEOUT)))
+	if (SUCCEED == (ret = zbx_tcp_connect(&s, source_ip, host, port, timeout)))
 	{
 		zbx_snprintf(request, sizeof(request), "%s\n", key);
 
@@ -158,6 +161,7 @@
 int	main(int argc, char **argv)
 {
 	unsigned short	port = ZBX_DEFAULT_AGENT_PORT;
+	unsigned short	timeout = GET_SENDER_TIMEOUT;
 	int		ret = SUCCEED;
 	char		*value = NULL, *host = NULL, *key = NULL, *source_ip = NULL, ch;
 
@@ -174,6 +178,9 @@
 			case 'p':
 				port = (unsigned short)atoi(zbx_optarg);
 				break;
+			case 't':
+				timeout = (unsigned short)atoi(zbx_optarg);
+				break;
 			case 's':
 				host = strdup(zbx_optarg);
 				break;
@@ -211,7 +218,7 @@
 		signal(SIGALRM, get_signal_handler);
 #endif
 
-		ret = get_value(source_ip, host, port, key, &value);
+		ret = get_value(source_ip, host, port, timeout, key, &value);
 
 		if (SUCCEED == ret)
 			printf("%s\n", value);
