Ad Widget

Collapse

Auto changing interface from IP to DNS (bug?)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • artsiom82
    Member
    • Nov 2016
    • 33

    #1

    Auto changing interface from IP to DNS (bug?)

    Hello everybody
    Friends, please tell me, for no reason, via some proxies, the zabbix agent interface begins to be monitored via DNS, by itself. No settings were changed. Hostinterface isn`t written in the config ... What can be checked?
    zabbix 5.4.5 and also proxies
    We localized the problem, but we cannot understand what the problem is,
    Configured auto-registration action (pic attached)
    using auto-registration the server is registered (pic attached)
    If auto-registration is not turned off, then after a while another interface is added, "connect via" changes to DNS and becomes the default (pic attached)
    and of course the server stops being monitored.
    At the same time, if you disable auto-registration, then everything is ok, but in this case, new servers, respectively, will not be registered
    friends, please give me options for where to dig, very similar to a bug ...
    Attached Files
  • Hamardaban
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • May 2019
    • 2713

    #2
    покажите конфиг на агенте.

    Comment

    • artsiom82
      Member
      • Nov 2016
      • 33

      #3
      Originally posted by Hamardaban
      покажите конфиг на агенте.
      LogFile=c:\windows\zabbix\zabbix_agentd.log
      LogFileSize=1
      EnableRemoteCommands=1
      Server=192.168.100.249
      ServerActive=192.168.100.249
      UserParameter=product_state,wmic /NAMESPACE:\\root\SecurityCenter2 PATH AntiVirusProduct GET /value | find "productState"
      UserParameter=display_name,wmic /NAMESPACE:\\root\SecurityCenter2 PATH AntiVirusProduct GET /value | find "displayName"
      UserParameter=ZScript[*],powershell c:\windows\zabbix\zabbix_helper\windows.$1.ps1 "$2" "$3"
      Hostname=SRV_M 7A4A594A

      Comment

      • Hamardaban
        Senior Member
        Zabbix Certified SpecialistZabbix Certified Professional
        • May 2019
        • 2713

        #4
        ничего криминального....
        а не включено ли обнаружение устройств в сети ?
        и нет ли в присоединенных шаблонах дискавери интерфейсов?

        Comment

        • artsiom82
          Member
          • Nov 2016
          • 33

          #5
          Originally posted by Hamardaban
          ничего криминального....
          а не включено ли обнаружение устройств в сети ?
          и нет ли в присоединенных шаблонах дискавери интерфейсов?
          1.не включено обнаружение
          2. Не совсем понимаю о каких Вы интерфейсах говорите. Если Вы имеете в виду "Правила обнаружения", то такие есть, например с ключем "vfs.fs.discovery"

          Comment

          • artsiom82
            Member
            • Nov 2016
            • 33

            #6
            Anybody? Any help please...

            Comment

            • aigars.kadikis
              Senior Member
              Zabbix Certified SpecialistZabbix Certified Professional
              • Mar 2018
              • 208

              #7
              Please have a look at how the proxy is sending the auto registration data to the central server. Run this in the proxy database:

              SELECT FROM_UNIXTIME(clock),host,listen_ip,listen_port,li sten_dns,host_metadata,flags,tls_accepted FROM proxy_autoreg_host ORDER BY clock ASC;
              The meaning of columns:
              id id Unique record ID

              Table ids is used as indicator of sent records
              clock time Unix timestamp when host was discovered
              host varchar(64) Retrieved host name from active agent request
              listen_ip varchar(39) Host IP address
              listen_port integer Host port
              listen_dns varchar(255) Resolved host DNS name from IP address
              host_metadata varchar(255) Metadata, as sent by the agent

              It is based on HostMetadata or HostMetadataItem configuration parameters
              tls_accepted integer Type of incoming connection used for autoregistration:
              1, HOST_ENCRYPTION_NONE - Unencrypted (default)
              2, HOST_ENCRYPTION_PSK - TLS with PSK
              The values of this column are a subset of values of 'tls_accept' column in 'hosts' table.
              flags integer Type of connection to the host
              0, ZBX_CONN_DEFAULT - connect using IP address, don't update host interface
              1, ZBX_CONN_IP - connect using IP address, update default host interface
              2, ZBX_CONN_DNS - connect using DNS name, update default host interface
              I suspect the last column 'flags' in your situation will start sending number '2':

              2, ZBX_CONN_DNS - connect using DNS name, update default host interface
              Please confirm.

              If this is the case, we will move to the agent side troubleshooting.

              Comment

              • aquablast.rus
                Junior Member
                • Jul 2019
                • 3

                #8
                This is a zabbix bug.

                In my case, only one host from the entire list of hosts controlled by the proxy caused the entire list of 450 hosts to switch to the dns connection itself. This was the only host where the HostInterface parameter was specified in the agent configuration.

                To fix it, I removed this parameter from the agent configuration and changed the value of the flags field of the proxy_autoreg_hosts table to 0 on proxy database. After that, there were no automatic switching of the interface connection to dns.

                Zabbix version 5.4.11 for server and all of proxies.

                Comment

                Working...