-
New Feature Request
-
Resolution: Unresolved
-
Minor
-
None
-
None
-
None
-
None
-
Server node:
OS: CentOS Linux release 7.6.1810 (Core)
Zabbix server: version 5.2.6 (revision 798506596c 29 March 2021)
Proxy node:
OS: CentOS Linux release 7.6.1810 (Core)
Database: Percona MySQL 5.7.32
Zabbix agent2: version 5.2.6 (revision 798506596c 29 March 2021)
Zabbix proxy: version 5.2.6 (revision 798506596c 29 March 2021)Server node: OS: CentOS Linux release 7.6.1810 (Core) Zabbix server: version 5.2.6 (revision 798506596c 29 March 2021) Proxy node: OS: CentOS Linux release 7.6.1810 (Core) Database: Percona MySQL 5.7.32 Zabbix agent2: version 5.2.6 (revision 798506596c 29 March 2021) Zabbix proxy: version 5.2.6 (revision 798506596c 29 March 2021)
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)
- /etc/zabbix/zabbix_agent2.conf of ZBX-PROXY:
ServerActive=ZBX-PROXY Server=ZBX-PROXY Hostname=OS-LINUX,DB-MYSQL HostMetadataItem=system.uname
- 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