Ad Widget

Collapse

Zabbix names discovered hosts with IP instead of hostname

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fsousa
    Member
    • Aug 2017
    • 99

    #1

    Zabbix names discovered hosts with IP instead of hostname

    I'm installing a fresh zabbix 3.2 on centOS 7.
    I've enabled discovery rule for my network and setting device uniqueness criteria to system.uname. Also, I've activated the built-in action to assign Linux machines to appropriate host group.

    Now the zabbix server discover a second machine configured as zabbix client, but uses the IP instead of hostname for host's Host name attribute.

    How I cant configure zabbix to display hostname instead of IP for discovered hosts?

    Thanks!
  • allexpetrov
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • May 2017
    • 361

    #2
    Originally posted by fsousa
    I'm installing a fresh zabbix 3.2 on centOS 7.
    I've enabled discovery rule for my network and setting device uniqueness criteria to system.uname. Also, I've activated the built-in action to assign Linux machines to appropriate host group.

    Now the zabbix server discover a second machine configured as zabbix client, but uses the IP instead of hostname for host's Host name attribute.

    How I cant configure zabbix to display hostname instead of IP for discovered hosts?

    Thanks!
    You mean that you've enabled Configuration -> Actions -> Discovery ?

    Regards,
    Alexey!

    Comment

    • fsousa
      Member
      • Aug 2017
      • 99

      #3
      Zabbix names discovered hosts with IP instead of hostname

      Originally posted by allexpetrov
      You mean that you've enabled Configuration -> Actions -> Discovery ?

      Regards,
      Alexey!

      Yes and now the zabbix server discover other machines configured as zabbix client, but uses the IP instead of hostname for host's Host name attribute.

      I want to configure zabbix to display hostname instead of IP for discovered hosts...

      Thanks!

      Comment

      • allexpetrov
        Senior Member
        Zabbix Certified Trainer
        Zabbix Certified SpecialistZabbix Certified Professional
        • May 2017
        • 361

        #4
        Originally posted by fsousa
        Yes and now the zabbix server discover other machines configured as zabbix client, but uses the IP instead of hostname for host's Host name attribute.

        I want to configure zabbix to display hostname instead of IP for discovered hosts...

        Thanks!
        Unfortunately you can't do it this way, because your server needs to resolve the ip address to hostname.

        If you want to use zabbix agent.hostname value - use auto-registration feature ( https://www.zabbix.com/documentation...o_registration ) or comment out the Hostname= line and use HostnameItem=system.hostname default item if you want to use your Hosts hostname.

        Regards,
        Alexey!

        Comment

        • fsousa
          Member
          • Aug 2017
          • 99

          #5
          Originally posted by allexpetrov
          Unfortunately you can't do it this way, because your server needs to resolve the ip address to hostname.

          If you want to use zabbix agent.hostname value - use auto-registration feature ( https://www.zabbix.com/documentation...o_registration ) or comment out the Hostname= line and use HostnameItem=system.hostname default item if you want to use your Hosts hostname.

          Regards,
          Alexey!
          Hello Alexey,

          Thank you for your reply.

          Now my client have the line Hostname commented and HostnameItem=system.hostname uncommented. Now I have to disable my discovery rule and create a auto-registration action?

          Thank you.

          Comment

          • allexpetrov
            Senior Member
            Zabbix Certified Trainer
            Zabbix Certified SpecialistZabbix Certified Professional
            • May 2017
            • 361

            #6
            Originally posted by fsousa
            Hello Alexey,

            Thank you for your reply.

            Now my client have the line Hostname commented and HostnameItem=system.hostname uncommented. Now I have to disable my discovery rule and create a auto-registration action?

            Thank you.
            Yes, create just basic auto-registration rule. Skip conditions and just configure the Operations tab with appopriate Host Group, Template and Add Host parameters.

            Regards,
            Alexey!

            Comment

            • fsousa
              Member
              • Aug 2017
              • 99

              #7
              Originally posted by allexpetrov
              Yes, create just basic auto-registration rule. Skip conditions and just configure the Operations tab with appopriate Host Group, Template and Add Host parameters.

              Regards,
              Alexey!
              Hi Alexey,

              Now I have the discovery rule disabled and the action Auto registration configured like you said (image attached). However none host are added to my zabbix server
              Attached Files

              Comment

              • allexpetrov
                Senior Member
                Zabbix Certified Trainer
                Zabbix Certified SpecialistZabbix Certified Professional
                • May 2017
                • 361

                #8
                Originally posted by fsousa
                Hi Alexey,

                Now I have the discovery rule disabled and the action Auto registration configured like you said (image attached). However none host are added to my zabbix server
                Have you configured Zabbix Agent with ServerActive parameter ? Can you connect from host to the server using port 10051 ?

                Regards,
                Alexey!

                Comment

                • fsousa
                  Member
                  • Aug 2017
                  • 99

                  #9
                  Zabbix names discovered hosts with IP instead of hostname

                  Originally posted by allexpetrov
                  Have you configured Zabbix Agent with ServerActive parameter ? Can you connect from host to the server using port 10051 ?

                  Regards,
                  Alexey!
                  That's it, my port 10051 in zabbix server wasn't open. Now its running perfect, and already discovered my two clients I have to test. Perfect.

                  Now when I go to this hosts the agent interface show the IP Address, can I configure to put the DNS name?

                  Thank you.

                  Regards,
                  Fábio Sousa!

                  Comment

                  • allexpetrov
                    Senior Member
                    Zabbix Certified Trainer
                    Zabbix Certified SpecialistZabbix Certified Professional
                    • May 2017
                    • 361

                    #10
                    In this case I can say that you can try nad if what - put the Ip address back, but make sure your host is discoverable via name to server, otherwise there will be no connection

                    Comment

                    • fsousa
                      Member
                      • Aug 2017
                      • 99

                      #11
                      Originally posted by allexpetrov
                      In this case I can say that you can try nad if what - put the Ip address back, but make sure your host is discoverable via name to server, otherwise there will be no connection
                      The hos t is discoverable via name, because in server appears the name of the host like the first image. But when I go to host configuration on Agent interfaces only appears the IP address (second image) and I want field the DNS name automatically if possible.

                      Thanks.
                      Regards,
                      Fábio
                      Attached Files

                      Comment

                      Working...