Ad Widget

Collapse

Zabbix won't use secondary DNS Server

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ewan
    Junior Member
    • Apr 2009
    • 6

    #1

    Zabbix won't use secondary DNS Server

    Hi All,

    We are using zabbix 1.6.6 on RHEL 5.3 and have about 200 hosts set up which are a mix of linux, unix, windows and snmp devices. The zabbix server has 2 network interfaces with the second interface configured as the SourceIP and ListenIP in zabbix_server.conf.

    On the most part zabbix is set to connect to the DNS name of each host rather than the IP address as many hosts use dhcp.

    We have 2 windows DNS servers, both listed in resolve.conf on the zabbix server.

    When the primary DNS server is down (say for maintenance) zabbix loses connection to all the hosts it is using DNS to connect to, even though I can still ping each dns name from the server's command line (using the secondary DNS). It seems zabbix itself is unable to use a secondary DNS server for name resolution.

    Am I missing something in a configuration file somewhere?

    Regards,
    Ewan
  • krimson
    Member
    • Sep 2008
    • 49

    #2
    Name resolution is handled by the OS, not by Zabbix.

    Annoyingly when Windows DNS servers are down they sometimes still seem 'up and running' causing the OS not to fail over to the second DNS server.

    Either tell Zabbix to connect to the IP instead of DNS name (which requires you to fill in all the IP's ...) or get rid of the Windows DNS servers

    Comment

    • exkg
      Senior Member
      Zabbix Certified Trainer
      Zabbix Certified Specialist
      • Mar 2007
      • 718

      #3
      A good choice is to use a 'cache DNS' in ZABBIX Server ....


      []s,
      Luciano
      --
      Luciano Alves
      www.zabbix.com
      Brazil | México | Argentina | Colômbia | Chile
      Zabbix Performance Tuning

      Comment

      • nelsonab
        Senior Member
        Zabbix Certified SpecialistZabbix Certified Professional
        • Sep 2006
        • 1233

        #4
        In one environment windows DNS servers proved to be so flakey we added slave bind instance on the zabbix server.
        RHCE, author of zbxapi
        Ansible, the missing piece (Zabconf 2017): https://www.youtube.com/watch?v=R5T9NidjjDE
        Zabbix and SNMP on Linux (Zabconf 2015): https://www.youtube.com/watch?v=98PEHpLFVHM

        Comment

        • ewan
          Junior Member
          • Apr 2009
          • 6

          #5
          Originally posted by krimson
          Name resolution is handled by the OS, not by Zabbix.
          Yeah, thought it was more likely a problem with Windows than Zabbix

          Thanks for the ideas guys. So you reckon installing something like dnsmasq on the zabbix server and pointing it at our windows dns servers should "smooth" out my DNS experience?

          Thanks again

          Ewan

          Comment

          • nelsonab
            Senior Member
            Zabbix Certified SpecialistZabbix Certified Professional
            • Sep 2006
            • 1233

            #6
            I can't speak with regards to DNS Masq very much except to say that some people have had issues with it not caching properly or for too long. My suggestion is to setup a slave DNS server on your Zabbix box and have it resolve from there.

            Originally posted by ewan
            Yeah, thought it was more likely a problem with Windows than Zabbix

            Thanks for the ideas guys. So you reckon installing something like dnsmasq on the zabbix server and pointing it at our windows dns servers should "smooth" out my DNS experience?

            Thanks again

            Ewan
            RHCE, author of zbxapi
            Ansible, the missing piece (Zabconf 2017): https://www.youtube.com/watch?v=R5T9NidjjDE
            Zabbix and SNMP on Linux (Zabconf 2015): https://www.youtube.com/watch?v=98PEHpLFVHM

            Comment

            • danrog
              Senior Member
              • Sep 2009
              • 164

              #7
              This is what we use on our Linux hosts

              Code:
              domain blah.com
              nameserver 10.10.10.5
              nameserver 10.10.10.6
              options timeout:3 attempts:2 rotate

              This last line is what fixed the use of secondary dns servers for us.

              Comment

              • nelsonab
                Senior Member
                Zabbix Certified SpecialistZabbix Certified Professional
                • Sep 2006
                • 1233

                #8
                Originally posted by danrog
                This is what we use on our Linux hosts

                Code:
                domain blah.com
                nameserver 10.10.10.5
                nameserver 10.10.10.6
                options timeout:3 attempts:2 rotate
                This last line is what fixed the use of secondary dns servers for us.

                Cool! Didn't know about those options, learn something new every day!
                RHCE, author of zbxapi
                Ansible, the missing piece (Zabconf 2017): https://www.youtube.com/watch?v=R5T9NidjjDE
                Zabbix and SNMP on Linux (Zabconf 2015): https://www.youtube.com/watch?v=98PEHpLFVHM

                Comment

                • danrog
                  Senior Member
                  • Sep 2009
                  • 164

                  #9
                  There are actually a few different settings available.

                  http://linux.die.net/man/5/resolv.conf

                  On some parts of our global network (especially where we have hot standy servers) we use sortlist and search options (to change default search order) so we can force the DNS responses we want.

                  I should also note, all internal DNS is run on Windows (because of AD and the fact that 90% of our clients are Windows based) and these options helped us overcome DNS query failures during AD server maintenance without problems.

                  Comment

                  • ewan
                    Junior Member
                    • Apr 2009
                    • 6

                    #10
                    danrog,

                    Thanks very much for that - I'll give those settings a shot.

                    Cheers guys,
                    Ewan

                    Comment

                    • vorGroup
                      Junior Member
                      • Apr 2014
                      • 2

                      #11
                      I beg to differ....

                      Perhaps it's SUPPOSED to just use the O/S DNS -- BUT...

                      I commented out the secondary DNS to be sure.

                      With only ONE DNS server, which works perfectly fine, and the console is ALWAYS able to resolve hostnames, every single one of my websites is showing down with the reason of inability to resolve hostname.

                      But a ping, and nslookup from the command-line of zabbix_server host always resolves the hostname perfectly.

                      If there was not a secondary problem related to Zabbix, this behavior could not happen.

                      Comment

                      Working...