Ad Widget

Collapse

TELNET check for host returning last char "." instead of ":"

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gomesnz
    Junior Member
    • May 2021
    • 1

    #1

    TELNET check for host returning last char "." instead of ":"

    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
Working...