Ad Widget

Collapse

zabbix server can't get correct hostname

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kelvin0431
    Junior Member
    • Mar 2016
    • 2

    #1

    zabbix server can't get correct hostname

    I'm using zabbix-2.4.6 on server side and zabbix-2.4.7 on agent side,
    and I added below two server names in server's /etc/hosts

    122.XXX.XXX.181 CHN-LN-p-9EB
    122.XXX.XXX.207 CHN-LN-p-9Eb

    but zabbix_server can't get the correct hostname, eg:

    [root@zabbix_server ~]# zabbix_get -s CHN-LN-p-9Eb -k agent.hostname
    CHN-LN-p-9EB
    [root@zabbix_server ~]# zabbix_get -s CHN-LN-p-9Eb -k system.hostname
    CHN-LN-p-9EB

    however the IP works:

    [root@zabbix_server ~]# zabbix_get -s 122.XXX.XXX.207 -k system.hostname
    CHN-LN-p-9Eb
    [root@zabbix_server ~]# zabbix_get -s 122.XXX.XXX.207 -k agent.hostname
    CHN-LN-p-9Eb

    both agents are configured "Connect to IP", any ideas now ??
  • salzkrebs
    Junior Member
    • Nov 2013
    • 14

    #2
    Hallo kelvin,

    I think the problem lies in the Case of the Host entries.

    RFC1035:
    "Note that while upper and lower case letters are allowed in domain
    names, no significance is attached to the case. That is, two names with
    the same spelling but different case are to be treated as if identical."

    You have 2 Hostnames which are identical and so only the first is taken.

    Try to change the host entry of the second one and try it again.

    Br Manuel

    Comment

    • kelvin0431
      Junior Member
      • Mar 2016
      • 2

      #3
      Originally posted by salzkrebs
      Hallo kelvin,

      I think the problem lies in the Case of the Host entries.

      RFC1035:
      "Note that while upper and lower case letters are allowed in domain
      names, no significance is attached to the case. That is, two names with
      the same spelling but different case are to be treated as if identical."

      You have 2 Hostnames which are identical and so only the first is taken.

      Try to change the host entry of the second one and try it again.

      Br Manuel
      Many thanks, Manuel
      This problem really confused me for a while, finally resolved, thanks again.

      Comment

      Working...