I get Zabbix 1.6.1 and have problems with zabbix_get.
If I use zabbix_agent or zabbix_agentd with options -p or -t, userparam work fine.
If I use zabbix_get, dont work and appear "ZBX_NOTSUPPORTED".
If I connect via TELNET and send key of userparam, work too.
What zabbix_get dont work ?
I change src/libs/zbxcomms/comms.c and change this lines in zbx_tcp_send_ext function (line 501):
if( flags & ZBX_TCP_NEW_PROTOCOL )
{
/* Write header */
/*HERE ADD START COMMENTS
if( ZBX_TCP_ERROR == ZBX_TCP_WRITE(s->socket, ZBX_TCP_HEADER, ZBX_TCP_HEADER_LEN))
{
zbx_set_tcp_strerror("ZBX_TCP_WRITE() failed [%s]", strerror_from_system(zbx_sock_last_error()));
return FAIL;
}
HERE ADD STOP COMMENTS */
len64 = (zbx_uint64_t)strlen(data);
len64 = zbx_htole_uint64(len64);
/* Write data length */
/* HERE ADD START COMMENTS
if( ZBX_TCP_ERROR == ZBX_TCP_WRITE(s->socket, (char *) &len64, sizeof(len64)) )
{
zbx_set_tcp_strerror("ZBX_TCP_WRITE() failed [%s]", strerror_from_system(zbx_sock_last_error()));
return FAIL;
}
HERE ADD STOP COMMENTS*/
}
And now work zabbix_get. What send HEADERS ?
Please help with this code.
If I use zabbix_agent or zabbix_agentd with options -p or -t, userparam work fine.
If I use zabbix_get, dont work and appear "ZBX_NOTSUPPORTED".
If I connect via TELNET and send key of userparam, work too.
What zabbix_get dont work ?
I change src/libs/zbxcomms/comms.c and change this lines in zbx_tcp_send_ext function (line 501):
if( flags & ZBX_TCP_NEW_PROTOCOL )
{
/* Write header */
/*HERE ADD START COMMENTS
if( ZBX_TCP_ERROR == ZBX_TCP_WRITE(s->socket, ZBX_TCP_HEADER, ZBX_TCP_HEADER_LEN))
{
zbx_set_tcp_strerror("ZBX_TCP_WRITE() failed [%s]", strerror_from_system(zbx_sock_last_error()));
return FAIL;
}
HERE ADD STOP COMMENTS */
len64 = (zbx_uint64_t)strlen(data);
len64 = zbx_htole_uint64(len64);
/* Write data length */
/* HERE ADD START COMMENTS
if( ZBX_TCP_ERROR == ZBX_TCP_WRITE(s->socket, (char *) &len64, sizeof(len64)) )
{
zbx_set_tcp_strerror("ZBX_TCP_WRITE() failed [%s]", strerror_from_system(zbx_sock_last_error()));
return FAIL;
}
HERE ADD STOP COMMENTS*/
}
And now work zabbix_get. What send HEADERS ?
Please help with this code.