[ZBX-6682] Value mapping is not expanded if item is used in map labels and map links Created: 2013 Jun 10 Updated: 2022 Oct 08 Resolved: 2013 Jul 31 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Frontend (F) |
Affects Version/s: | 2.0.7rc1, 2.1.0 |
Fix Version/s: | 2.0.7rc1, 2.2.0 |
Type: | Incident report | Priority: | Major |
Reporter: | Alexey Pustovalov | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | maps, valuemapping | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Attachments: | 2.0branch r36336.png 2.0branch r36337.png 2.0branch r36545.png dev branch.png latest data.png map element.png | ||||
Issue Links: |
|
Description |
Value mapping returns raw lastvalue, need "human representation" style. it is not work. -> 255, but should be No such service(255) |
Comments |
Comment by Oleg Egorov (Inactive) [ 2013 Jun 12 ] |
FIXED IN svn://svn.zabbix.com/branches/dev/ZBX-6682 r36328 |
Comment by Toms (Inactive) [ 2013 Jun 13 ] |
(1) applyValueMap() should be rewritten so it wont duplicate code with getMappedValue(); oleg.egorov RESOLVED IN r35335 tomtom CLOSED |
Comment by Toms (Inactive) [ 2013 Jun 13 ] |
TESTED |
Comment by Oleg Egorov (Inactive) [ 2013 Jun 13 ] |
FIXED IN 2.0.7rc1 r36337 |
Comment by richlv [ 2013 Jun 13 ] |
(2) *DRUMROLL* whatsnew ! martins-v Added to: https://www.zabbix.com/documentation/2.0/manual/introduction/whatsnew207#value_mapping_in_map_labels oleg.egorov CLOSED |
Comment by Andrei Gushchin (Inactive) [ 2013 Jun 24 ] |
(3) Item's value as text with space are reason of appearance html tags. oleg.egorov RESOLVED IN r36540 tomtom CLOSED |
Comment by Toms (Inactive) [ 2013 Jun 27 ] |
TESTED |
Comment by Oleg Egorov (Inactive) [ 2013 Jun 27 ] |
FIXED IN r36557 |
Comment by Alf Solli [ 2013 Jul 26 ] |
I believe this introduced a bug; How to reproduce: Add trigger to this host, that references another different host' items. Like on my host "Puma" : =1) & ( {Puma:log[/var/log/messages,alarm state,,,].str(Gone into alarm)}=1) This worked just fine with 2.0.6 Quick diff 2.0.7 maps.inc.php -> 2.0.6 : — |
Comment by Alf Solli [ 2013 Jul 26 ] |
Sorry, forgot. Undefined index: 10111 [include/maps.inc.php:1145] "10111" is the hosts.hostid of "LGN-SiteSense01" |
Comment by Alf Solli [ 2013 Jul 26 ] |
Nevermind the maps.inc.php diff. The change seems to be somewhere in api/classes/CTrigger.php . Just don't know where yet, but I'll keep looking later tonight. |
Comment by richlv [ 2013 Jul 27 ] |
reopening as per alf's comment |
Comment by Alf Solli [ 2013 Jul 29 ] |
Seems like the map works fine, as long as ALL hosts in the trigger are present in the map. So for the example, both LGN-SiteSense01 Could this be a biproduct of optimization ? Since I'm viewing the maps as a super-admin, I don't think it's permission related.. |
Comment by Volker Fröhlich [ 2013 Jul 31 ] |
This should have postponed the 2.0.7 release! 2.0.6: array(33) { } ["triggerid"]=> string(5) "16685" ["status"]=> string(1) "0" ["value"]=> string(1) "0" ["priority"]=> string(1) "1" ["lastchange"]=> string(1) "0" ["description"]=> string(53) "Host name of zabbix_agentd was changed on {HOST.NAME}" ["expression"]=> string(9) "{22632}>0" } ... 2.0.7: array(33) { [0]=> array(9) { ["triggerid"]=> string(5) "16685" ["status"]=> string(1) "0" ["value"]=> string(1) "0" ["priority"]=> string(1) "1" ["lastchange"]=> string(1) "0" ["description"]=> string(53) "Host name of zabbix_agentd was changed on {HOST.NAME}" ["expression"]=> string(9) "{22632}>0" ["hostid"]=> string(5) "10156" ["hosts"]=> array(1) { [0]=> &array(1) { ["hostid"]=> string(5) "10156" } } Notice the ampersand when it comes to the hosts! The foreach loop is tripping over that. |
Comment by Alf Solli [ 2013 Jul 31 ] |
In an attempt to debug this, I've added var_dump($triggers) on line 1142(2.0.7) and 1131(2.0.6) in maps.inc.php, right before the foreach loop. This can be compared at and unmodified at Login: demo, pass: demo This map contains a host (hostid 10156, or "Puma" ) with this trigger: =1) & ( {Puma:log[/var/log/messages,alarm state,,,].str(Gone into alarm)}=1) The host "LGN-SiteSense01" (or hostid 10111) does not exist at ALL on this map. In 2.0.7, this hostid is mentioned in the array returned from CTriggers.php, and causes the Undefined index php errors on line 1145. |
Comment by Alexander Vladishev [ 2013 Jul 31 ] |
The regression will be fixed under I'm closing the current issue. |