-
Incident report
-
Resolution: Unresolved
-
Trivial
-
None
-
1.9.2 (alpha)
User macros and {HOSTNAME}, {IPADDRESS}, {HOST.DNS}, {HOST.CONN} macros are supported in interface IP and DNS fields. However, there are some discrepancies or inconsistencies depending on where they are used.
(1) For connection purposes and for the purposes of item keys, macros in the IP and DNS fields on the main agent interface are not expanded.
(2) For connection purposes and for the purposes of item keys, macros {IPADDRESS}, {HOST.DNS}, {HOST.CONN} in other interfaces resolve to the corresponding fields of the main agent interface.
(3) For notifications purposes and for the purposes of resolving {TRIGGER.NAME} in GUI, macros {IPADDRESS}, {HOST.DNS}, {HOST.CONN} resolve to the corresponding fields of the main agent interface. If that does not exist, they resolve to the corresponding fields of the main SNMP interface. Then the main JMX and main IPMI interfaces.
There are the following design problems with it:
(4) The idea behind making the main agent interface special (not resolving macros for it) was that {IPADDRESS}, {HOST.DNS}, {HOST.CONN} resolve to the main agent interface for monitoring purposes. However, the ability to use user macros for the main agent interface is lost.
(5) Macros {IPADDRESS}, {HOST.DNS}, {HOST.CONN} on an SNMP-only host would fail to resolve in item keys, but would resolve in trigger names.
(6) Suppose a host has a main SNMP interface and a main IPMI interface. Macro {IPADDRESS} in IPMI interface would fail to resolve for monitoring purposes, but would resolve to SNMP's IP address for notification and GUI purposes. So monitoring IPMI on this host would not be possible, however the frontend would say (in trigger names) that it is possible. This might be confusing for users.
Unless the design issues are addressed in a way that makes the following fixes irrelevant, the following has to be done in both server and GUI:
(7) If macro {TRIGGER.NAME} contains {IPADDRESS}, {HOST.DNS}, {HOST.CONN}, and they resolve to something that contains a macro, that macro has to be expanded as well. However, if the initial {IPADDRESS}, {HOST.DNS}, {HOST.CONN} gave the main agent interface, then it should be left as is. Also, if the initial {IPADDRESS}, {HOST.DNS}, {HOST.CONN} resolve to something that also contains {IPADDRESS}, {HOST.DNS}, {HOST.CONN}, those second macros should expand to *UNKNOWN*.
- is duplicated by
-
ZBXNEXT-3072 host macro for JMX item expanded to agent's interface value
- Closed
-
ZBX-9308 User macro is not resolved in host interfaces
- Closed