Ad Widget

Collapse

Host uniqueness question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ITOMDave
    Member
    • Nov 2018
    • 53

    #1

    Host uniqueness question

    Hi all,
    I'm using the API to create hosts from a CSV file, as many of us do, and trying to figure out a way of handling potentially duplicate host names......

    As I understand it. the HOST definition has 2 fields relating to the name. These are "Host Name" and "Visible Name".

    I believed that the Host Name must be unique. So as my hosts are going to be behind different proxies, I thought I'd simply put a 3-character prefix onto the Host Name and leave the Visible Name unchanged.

    So, for instance I'd have the following :

    Host Name : BWF-Server1
    Visible Name : Server1

    However, it appears that (even though it is not a mandatory attribute) Visible Name must ALSO be unique.

    This means that if I have 2 proxies, BWF and ABC, representing 2 locations. Each location will have a "server1". So I need to prefix BOTH the Host Name and Visible Name with either BWF and ABC.

    Operators know the servers as Server1, Server2 respectively so ideally want the "Visible Name" to be Server1 but the actual Host Name to be BWF-Server1 or ABC-Server1.


    Does anyone;
    1. Understand why both Host Name and Visible Name must both be unique ?
    2. Have a workaround for this ?
    I can't be the only person to encounter this - can I ?

    Dave



  • ITOMDave
    Member
    • Nov 2018
    • 53

    #2
    Hi,
    I don't think I explained myself well enough.

    My scenario is that I would like to have :

    Hostgroup #1 = ITOMDave / Site1
    Servers in this Hostgroup are :
    Hostname : Server1
    Visible Name : Server1

    Hostgroup #2 = ITOMDave / Site2
    Servers in this Hostgroup are :
    Hostname : Server1
    Visible Name : Server1

    This is not possible as "Hostname" needs to be unique, even though they are in different Host groups. I understand this and can see why it's neccessary.

    To attempt a workaround, I thought I would make the Hostname unique *within Zabbix* by prefixing the Hostname value with a 3-character reference as follows :

    Hostgroup #1 = ITOMDave / Site1
    Servers in this Hostgroup are :
    Hostname : S01-Server1
    Visible Name : Server1

    Hostgroup #2 = ITOMDave / Site2
    Servers in this Hostgroup are :
    Hostname : S02-Server1
    Visible Name : Server1

    Even though the Hostname is now unique, this scenario is still not allowed because the Visible Name must also be unique.

    If I put the same prefix on the Visible Name, then that's OK but I lose the ability to easily see the TCP/IP hostname portion of the FQDN - which is important if you outsource your IT Ops to a 3rd party.

    Simply put, I do not understand the need for BOTH fields to be unique within the entire Zabbix platform. The Hostname field I understand, but the Visible name only needs to be unique within a Hostgroup, not across the entire platform.

    When I'm dealing with potentially 500 locations, each configured identically with a Zabbix proxy and upto 10 servers per location then I need to have all 5,000 servers with a unique hostname rather than having hostnames unique within a location.

    So why do BOTH fields have to be unique across the entire Zabbix system? Doesn't it make more sense for the VISIBLE NAME to only be unique within a Hostgroup ??

    I appreciate that the Hostname field needs to be unique within Zabbix because it's referenced in th agent config file, but surely the Visible Name only needs to be unique within a Hostgroup.

    I must be missing something here !!

    All advice and comments are welcome.

    Dave






    Comment

    • ITOMDave
      Member
      • Nov 2018
      • 53

      #3
      In your example, why can't the "view" use the Host name ? As that MUST be unique as well. Having to have BOTH names - the host name and the visible name as unique isn't needed. Either use hostname OR visible name consistently. Are you suggesting that it is needed because some views use "host name" and some views use "visible name" ? As that is the only reason I can see for needing them to both be unique.

      I group my hosts by location. With each location being in a different host group, handled by a different proxy. I also limit access for certain users to certain hostgroups. As an example, each location will have a nominated "IT Person" responsible for the EPOS devices on their site and only their site. They will not have access to any other location (ie hostgroup). The on-site user is not an IT expert by any means, so concepts such as FQDN and DNS are totally unknown to them. Also, your screen shot does not show hostgroup, wihch is a layer of uniqueness that could be applied. A combination of Hostgroup + HostName -or- Hostgroup + VisibleName as uniqueness criteria would make RBAC easier to implement.

      I have no objection to either hostname or visible name being unique but I question the absolute need for BOTH to be unique across the entire system.

      I need to make Zabbix as easy to interact with as possible for non-IT Experts.




      Comment

      • ITOMDave
        Member
        • Nov 2018
        • 53

        #4
        Originally posted by splitek
        Views is only one thing... i can give other questions. How items using visible name distinguish what host to use? How maps with elements based on visible hostname will work? How actions will work? etc.
        Non unique visible host name means that visible name will point to many servers. In such situation there be no way to use short and friendly name in many configuration places (items, triggers, actions, maps, so on...). Macro {HOST.NAME} will be useless.
        Hi, sorry for the long delay in replying.

        I think you are actually making my point for me. Are you saying that some parts of Zabbix use "visible name" as the unique identifier and other parts of the code use "host name" as the unique identifier ? It seems to me to be a little inconsistent.

        I'm trying to make the point (and failing obviously) that having BOTH visible name and host name as unique across the entirety of a Zabbix implementation doesn't make sense.

        Let me ask you a question to confirm we understand each other, a straightforward YES / NO question.....

        Do some components of Zabbix use "visible name" to identify the host and other components use "host name" ?








        Comment

        Working...