Ad Widget

Collapse

zabbix server make a DNS request to DNS server for each a simple check in v6.0

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • alextls
    Junior Member
    • Feb 2022
    • 4

    #1

    zabbix server make a DNS request to DNS server for each a simple check in v6.0

    Hi Team,

    I try to get the ICMP response time for some servers , then I apply ICMP Ping templates when creating those servers. but in the Interface field , I use DNS name rather than IP address. and I also update the interval to 30s from 1minute for each item, later I found zabbix server will a make a DNS request to dns server for each simple check.

    Why that should happen? it should use cached DNS result to make a simple check rather than make a separate DNS request for each check. it should make a new dns request to dns server when the cached dns result is expired. otherwise it will cause a lot of unnecessary traffic to DNS server , totally no sense , anyone know how to change this behavior ? thanks in advance.

    BR


  • Glencoe
    Zabbix developer
    • Oct 2019
    • 152

    #2
    In this regard, Zabbix is no different than any other program that resolves names to IP addresses. DNS caching, respecting TTLs, validating responses etc is a work of DNS resolver which Zabbix is not. If you worry about additional stress to your DNS servers or big DNS traffic in your network the proper solution is to install a caching DNS resolver locally alongside your Zabbix server.

    Comment

    • alextls
      Junior Member
      • Feb 2022
      • 4

      #3
      thanks Glencoe, however ,I am not quite master DNS , I had setup a bind dns , which is running in Cache + forwarding mode , I have to use our internal DNS to do name resolution, so I have to configure my bind to do "forward only " for dns request , but look like it doesn't cache dns result at all. when each dns request to my bind server from ZABBIX server, my bind will make a quest to my configured forwarders. could you give some references on how to setup caching server. I know this has nothing to do with ZABBIX . Just asking.

      Comment

      • incama
        Member
        • Jan 2015
        • 65

        #4
        I know from the past that not all linux distro's install a local dns caching mechanisme. Does your zabbix server have a local dns cache like nscd?

        Comment

        • alextls
          Junior Member
          • Feb 2022
          • 4

          #5
          I have changed my server to use systemd-resolved, which will cache dns result, but I find zabbix still send dns request to my dns server configured on my network interface ,rather than to systemd-resolved. it's a bug? how to changed that behavior ?

          Comment

          • Glencoe
            Zabbix developer
            • Oct 2019
            • 152

            #6
            Originally posted by alextls
            I have changed my server to use systemd-resolved, which will cache dns result, but I find zabbix still send dns request to my dns server configured on my network interface ,rather than to systemd-resolved. it's a bug? how to changed that behavior ?
            Zabbix uses getaddrinfo() for DNS name resolution. So every name resolution method that is supported by getaddrinfo is understood by Zabbix. I don't know your config and how exactly you enabled systemd-resolved but maybe you missed some steps?

            From the man page:

            The glibc getaddrinfo(3) API as defined by RFC3493 and its related resolver functions, including gethostbyname(3). This API is widely supported, including beyond the Linux platform. In its current form it does not expose DNSSEC validation status information however, and is synchronous only. This API is backed by the glibc Name Service Switch (nss(5)). Usage of the glibc NSS module nss-resolve(8) is required in order to allow glibc's NSS resolver functions to resolve hostnames via systemd-resolved.
            So maybe you want to check if nss-resolve is activated in glibc: https://www.freedesktop.org/software...s-resolve.html

            Comment

            Working...