[ZBX-7590] Macros in graphs name does not work Created: 2013 Dec 26  Updated: 2017 May 30  Resolved: 2014 Jan 08

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F)
Affects Version/s: 2.2.1
Fix Version/s: 2.2.2rc1, 2.3.0

Type: Incident report Priority: Minor
Reporter: Linas Assignee: Ivo Kurzemnieks
Resolution: Fixed Votes: 0
Labels: macros
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File zabbix_bug.png     PNG File zabbix_no_visible_name.png    

 Description   

The problem occurs when the "Visible name" of the host exists and is different from the "Host name".
I figured out that the problem comes from the function resolveGraphsFunctionalItemMacros in the file include/classes/macros/CMacrosResolver.php. SQL query in this function works well only when "Visible name" is missing.
In the case when the "Visible name" is set this value goes to the graph header. The same value is passed to Macro resolver. But the function expects for the "host name".

In the other hand, why macro HOST.HOST in the graph name is resolvable like HOST.NAME?



 Comments   
Comment by Ivo Kurzemnieks [ 2014 Jan 07 ]

Linas, can You please provide more details like what macros You are using and where, what are host names, items etc?
Or simply export host with items and graphs and attach them here?

Comment by Linas [ 2014 Jan 08 ]

Graph name:
Port 4 "{{HOST.HOST}:ifDescr4.last(0)}" in/out traffic
Item:
SNMP OID = IF-MIB::ifAlias.4
Key = ifDescr4
Host:
Host Name = Office_switch
Visible name = Ofisas

I made the screenshot of the graph with this configuration.


Second configuration is the same. Except Visible name is blank.
The screenshot is in the second file.

PS. My items and graphs of the host are created from the template.

Let me know if you need more information.

Comment by Ivo Kurzemnieks [ 2014 Jan 08 ]

RESOLVED in svn://svn.zabbix.com/branches/dev/ZBX-7590

Comment by Oleg Egorov (Inactive) [ 2014 Jan 09 ]

TESTED

Comment by Ivo Kurzemnieks [ 2014 Jan 09 ]

Fixed in pre-2.2.2rc1 r41430 and pre-2.3.0 (trunk) r41431

Generated at Fri Apr 26 23:47:44 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.