Uploaded image for project: 'ZABBIX FEATURE REQUESTS'
  1. ZABBIX FEATURE REQUESTS
  2. ZBXNEXT-6739

Passing HostMetadata and HostMetadataItem info on hostname basis for active agent auto-registration

XMLWordPrintable

    • Icon: New Feature Request New Feature Request
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • None
    • None
    • None

      Unable to benefit from Zabbix auto-registration process with hosts having multiple hostnames. Hosts using multiple comma-separated Hostname values (ie. Hostname=OS-LINUX,DB-MYSQL) have to share single HostMetadata parameter. Therefore it is impossible to use separate conditions and evaluate separate operations for host auto-registration. 

      Steps to reproduce:

      Say we have a single Linux based host named ZBX-PROXY that acts as Zabbix proxy with MySQL database and we want it to be monitored as two separate hosts:

      Host 1: OS-LINUX (OS level monitoring)
      Host 2: DB-MYSQL (DB level monitoring)

      1. /etc/zabbix/zabbix_agent2.conf of ZBX-PROXY:
      ServerActive=ZBX-PROXY
      Server=ZBX-PROXY
      Hostname=OS-LINUX,DB-MYSQL
      HostMetadataItem=system.uname
      1. Auto-registration actions configured (see the screenshot):

      Result:

      Both OS-LINUX and DB-MYSQL get auto-registered, added to the host group "OS - Linux" and linked to template "Template OS Linux" (see the screenshot):

      Expected:
      1) a way to pass HostMetadata and HostMetadataItem info on a hostname basis not as a single shared parameter or 2) to find a workaround for raised problem. Using hostname as an auto-registration action condition is out of the question because in most cases we use GUID-s instead of simple hostnames. 

      Expectation is that both hosts get added to separate host groups and get linked with different templates.  

      Suggested config: 

      ServerActive=ZBX-PROXY
      Server=ZBX-PROXY
      Hostname=OS-LINUX,DB-MYSQL
      HostMetadataItem.OS-LINUX=system.uname    # Metadata passed only to OS-LINUX
      HostMetadata.DB-MYSQL=mysql               # Metadata passed only to DB-MYSQL
      #HostMetadataItem=system.uname            # Metadata passed to all hosts. Takes precedence over HostMetadata.* and HostMetadataItem.* parameters
      

       

            Unassigned Unassigned
            alarischu Alari Schu
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: