Seeking some help on how to monitor a Telnet host that returns the last character as "." instead of ":". As a result Zabbix declares host as down.
In the source code, file src/libs/zbxcomms/telnet.c, there is this code:
int telnet_login(ZBX_SOCKET socket_fd, const char *username, const char *password, AGENT_RESULT *result) { const char *__function_name = "telnet_login"; [...] while (ZBX_TCP_ERROR != (rc == telnet_read(socket_fd, buf, &sz, &offset))) { if (':' == telnet_lastchar(buf, offset)) break; }
Looks like I need to change the ':' to '.' and it might work. Then I assume it needs to be compiled, how?
Has anyone done this. Using Zabbix 5.0 on Ubuntu 20.04.
tks
In the source code, file src/libs/zbxcomms/telnet.c, there is this code:
int telnet_login(ZBX_SOCKET socket_fd, const char *username, const char *password, AGENT_RESULT *result) { const char *__function_name = "telnet_login"; [...] while (ZBX_TCP_ERROR != (rc == telnet_read(socket_fd, buf, &sz, &offset))) { if (':' == telnet_lastchar(buf, offset)) break; }
Looks like I need to change the ':' to '.' and it might work. Then I assume it needs to be compiled, how?
Has anyone done this. Using Zabbix 5.0 on Ubuntu 20.04.
tks