Ad Widget

Collapse

Hostnames / Discovery and autoregistration

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • matsnlc
    Junior Member
    • Feb 2023
    • 4

    #1

    Hostnames / Discovery and autoregistration

    Hi,

    Working to understand Zabbix as I have been honored with the responsibility to maintain and improve our current setup (6.2.7).

    To learn more I've setup a new installation. Using more or less default settings I'm trying to figure out why some host registers with a short hostname and others with a full fqdn, even when on the exact same network with the same agent.conf?

    Another issue was when I setup two identical HA nodes, one of the nodes was giving me errors like "failed to accept an incoming connection: connection from "10.1.10.44"" which was is the servers own ip. I added the ip after the hostname
    in the Server= section of the agent config and it went away, the other node without this setting is not complaining. The only node difference are the node specific addresses and settings so why am I getting this on one of them only.
    Name resolution and reverse lookup works fine from terminal for both of the server.

    Any suggestion where to start looking?

    Thanks,

    --Mats

  • LenR
    Senior Member
    • Sep 2009
    • 1005

    #2
    What do you have in the agent config for hostname and hostnameitem? Whatever the agent sends is used for auto registration. If you deploy your systems with something like Puppet or Ansible, I suggest setting the agent hostname to the lowercase FQDN of the host.

    Using hostnameitem usually depends on outside host configurations, or some even use scripts. In the past, I had problems with windows changing the case of it's FQDN at reboot, making another host in Zabbix.

    Comment

    • matsnlc
      Junior Member
      • Feb 2023
      • 4

      #3
      We use puppet, in the production installation both hostname and hostnameitem are commented out and HostMetadataItem=system.uname enabled.
      Discovery rule use Check:Zabbix agent "system.uname" and IP address for uniqueness

      On my test install with two nodes I used
      Hostname commented out
      Hostname = mynode001 but I've also tried using the full fqdn to see if that made any difference but I still get
      HostMetadataItem=system.uname
      Same discovery rules as the production install

      Just for the fun of it I modified the puppet deployed config on one host and added my test server nodes to the agents config (Server and ServerActive). The result was that on the production server the host get registered as the short name and on my test nodes the full fqdn, same discovery rules. I guess I'm missing something or maybe it is best to start over completely from scratch with the test nodes


      Comment

      Working...