Ad Widget

Collapse

Zabbix host loss of DNS entry

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Justin417
    Junior Member
    • Feb 2018
    • 13

    #1

    Zabbix host loss of DNS entry

    Hello!

    I'm chasing down a rather odd problem I'm having with a couple agents in my environment. For context, we have 1000+ hosts so far monitored without issue, but 2-3 nodes have seen this issue multiple times.

    Essentially, this agent's DNS entry disappears, the server no longer monitors the agent, and our slack alerts begin to fail (Error message: "Slack notification failed : Field "host_conn" cannot be empty"). Viewing the host in Configuration > Hosts, the DNS name appears blank, and the IP address reverts to 127.0.0.1:

    Click image for larger version  Name:	Screen Shot 2022-08-05 at 11.38.43 AM.png Views:	0 Size:	36.3 KB ID:	449427
    Click image for larger version  Name:	Screen Shot 2022-08-05 at 10.59.45 AM.png Views:	0 Size:	64.4 KB ID:	449428
    Click image for larger version  Name:	Screen Shot 2022-08-05 at 11.36.44 AM.png Views:	0 Size:	80.4 KB ID:	449429

    The issue can be resolved by manually re-adding the DNS entry and clicking "Update" - However the issue randomly re-occurs (sometimes weeks, sometimes months from when manually corrected).

    We do utilize autoregistration from the agent side, however we use the same template across all our servers and have not seen this issue since. For context, here's a truncated version of our agent configuration file (commented lines removed):
    Code:
    PidFile=/run/zabbix/zabbix_agentd.pid
    LogFile=/var/log/zabbix/zabbix_agentd.log
    LogFileSize=0
    Server=zbxprox1.ams1.ourdomain.com
    ServerActive=zbxprox1.ams1.ourdomain.com
    Hostname=mtlctrl1.ams1.ourdomain.com
    HostnameItem=mtlctrl1.ams1.ourdomain.com
    HostMetadata=AMS1-Linux-Server
    Include=/etc/zabbix/zabbix_agentd.d/*.conf
    Include=/etc/zabbix/zabbix_agentd.conf.d/*.conf
    TLSConnect=psk
    TLSAccept=psk
    TLSPSKIdentity=mtlctrl1.ams1.ourdomain.com
    TLSPSKFile=/etc/zabbix/zabbix_agentd.psk
    Any help would be greatly appreciated to try and figure out what's causing the DNS entry of our hosts to disappear.

    Thanks!
  • LenR
    Senior Member
    • Sep 2009
    • 1005

    #2
    Are these by chance windows hosts?

    Comment

    • Justin417
      Junior Member
      • Feb 2018
      • 13

      #3
      Hello!

      No, these hosts are all Ubuntu 20.04 LTS utilizing the standard zabbix agent, version 5.4.

      Thanks! Have you seen similar on Windows?

      Comment

      • LenR
        Senior Member
        • Sep 2009
        • 1005

        #4
        Yes, windows will sometimes not fill in hostnameitem or hostmetadataitem, I think the agent makes some windows API call that returns garbage. It's very sporadic.... I just excluded the host in the autoregistration action so it doesn't corrupt that host config and it's no longer a problem. It seems to be older, out of date windows servers.

        Do you use HostName or HostNameItem? On Linux, since we use Puppet to deploy the agents, we just set HostName, but Windows wants to use some powershell script to get hostname, which I think causes the problem, but they worship at the grave of PowerShell.....

        Comment

        • Justin417
          Junior Member
          • Feb 2018
          • 13

          #5
          LenR,

          Thank you for the suggestion, I suppose just disabling the autoregistration works, we've done so and so far the issue hasn't re-occurred for this host. Very odd.

          Thanks!

          Comment

          Working...