[ZBX-6402] Incorrect operation of some interface elements in Zabbix 2.0.X Created: 2013 Mar 16  Updated: 2019 Dec 10

Status: Confirmed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F)
Affects Version/s: 2.0.5, 2.0.6rc1
Fix Version/s: None

Type: Incident report Priority: Trivial
Reporter: Maxim Parkhomenko Assignee: Unassigned
Resolution: Unresolved Votes: 1
Labels: dm, nested, templatelinking
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Centos 6.3, Mysql 5.1, PHP 5.3.3, Apache 2.2.15


Attachments: PNG File Configuration of graphs (Primary node).png     PNG File Configuration of templates (Primary node)(1).png     PNG File Configuration of templates (Primary node).png     JPEG File zbx6402.jpg     Text File zbx6402.txt     PNG File Настройка графиков (Primary node)(1).png     PNG File Настройка графиков (Primary node)(2).png     PNG File Настройка графиков (Primary node).png    

 Description   

Steps for reproduce:

1. Create template ? 1 in this case Template App MySQL define items and graphs, first screenshot.
2. Create template ? 2 link it with template ? 1.
3. Create Host and link to template ? 2.
4. Do some changing in template ? 1. Second screenshot, And save it.
As a result have third screenshot.

If you want to do this changing, remove graph and re-create.
Also need DM, nodeid > 91.



 Comments   
Comment by Maxim Parkhomenko [ 2013 Mar 16 ]

На 3-м скриншоте видно, что хотя никаких элементов данных не менял, но он почему-то подтянул элементы данных с другого шаблона, который для данного шаблона является наследником. Видел похожее и подтягивало элементы данных с хостов.

Comment by Andrei Gushchin (Inactive) [ 2013 Mar 16 ]

Maxim, you must use for describing only english language.
Please read Bug_reporting_guidelines.

Comment by Andrei Gushchin (Inactive) [ 2013 Mar 16 ]

BTW I cannot reproduce this problem on 2.0.5 version.

Comment by Maxim Parkhomenko [ 2013 Mar 16 ]

Sorry my bad english.
I try edit existing graphic in template.

I have 2 templates.
First template named "Template App Mysql" and second template named "Template SilverCloud CDN"

First template linked in second template.

If i tried edit name of existing graphic in first template, i found next exception:

Graph "..." with templated items cannot contain items from other hosts.

I don't edit element items.
Some element item's changed automatic to element's from second template.

Comment by Maxim Parkhomenko [ 2013 Mar 16 ]

Problem reproduce on 2.0.5 and 2.0.6rc1

Comment by Andrei Gushchin (Inactive) [ 2013 Mar 16 ]

What is parent template? which with graph or not?
because in Description one case, in last comment conversely.

Comment by Maxim Parkhomenko [ 2013 Mar 16 ]

Maxim, you must use for describing only english language.
Меня будет сложнее понять на моём английском чем на рисунках которые я дал.

Смотреть последний рисунок. Баг не проявляется, когда создаешь новый график, только когда редактируешь существующий.

Comment by Maxim Parkhomenko [ 2013 Mar 16 ]

Parent template without graph it is second template.

first template link to second template.
second template link to host.

Comment by Andrei Gushchin (Inactive) [ 2013 Mar 16 ]

This case your host not inherits graph.

Comment by Maxim Parkhomenko [ 2013 Mar 16 ]

Why my host not inherits graph?

My host inherits graph from second template.

second template inherits graph from first template.

Comment by richlv [ 2013 Mar 17 ]

i tried to reproduce the scenario in the english comment, but it worked ok.
looking at screenshots, it seems like you are trying to add items from multiple templates, which is not supported. could that be the problem ?

Comment by Andrei Gushchin (Inactive) [ 2013 Mar 17 ]

What item did you add for take this error? please attach screeenshot this item.

Comment by Maxim Parkhomenko [ 2013 Mar 17 ]

I don't add new items. I try edit name of graph and click save.

Graph not saved because some graph items unauthorized automatic changed to another template.

Comment by Maxim Parkhomenko [ 2013 Mar 17 ]

I turn on debug.
I see debug output.

Before I click save button all graphid = 10010000000002093

After I click save button graphid of graph items = 10010000000002092

The whole frontend have similar errors.

Example: only_hostid variable in configuration.graph.edit.js.php

  ? '&only_hostid=<?php echo $this->data['hostid']; ?>' bad work
  ? '&only_hostid=' + '<?php echo $this->data['hostid']; ?>' good work

Before click Save button.

7. graphitem->get [graphs.php:447]
Parameters:
Array
(
    [graphids] => 10010000000002093
    [sortfield] => gitemid
    [output] => extend
    [expandData] => 1
)
Result:
Array
(
    [0] => Array
        (
            [graphs] => Array
                (
                    [0] => Array
                        (
                            [graphid] => 10010000000002093
                        )

                )

            [gitemid] => 10010000000023431
            [graphid] => 10010000000002093
            [itemid] => 10010000000010204
            [drawtype] => 0
            [sortorder] => 0
            [color] => C80000
            [yaxisside] => 0
            [calc_fnc] => 2
            [type] => 0
            [key_] => mysql.slowqueries
            [hostid] => 10010000000010003
            [flags] => 0
            [host] => Template_App_MySQL
        )

    [1] => Array
        (
            [graphs] => Array
                (
                    [0] => Array
                        (
                            [graphid] => 10010000000002093
                        )

                )

            [gitemid] => 10010000000023432
            [graphid] => 10010000000002093
            [itemid] => 10010000000010203
            [drawtype] => 0
            [sortorder] => 1
            [color] => 00C800
            [yaxisside] => 0
            [calc_fnc] => 2
            [type] => 0
            [key_] => mysql.qps
            [hostid] => 10010000000010003
            [flags] => 0
            [host] => Template_App_MySQL
        )

    [2] => Array
        (
            [graphs] => Array
                (
                    [0] => Array
                        (
                            [graphid] => 10010000000002093
                        )

                )

            [gitemid] => 10010000000023433
            [graphid] => 10010000000002093
            [itemid] => 10010000000045671
            [drawtype] => 0
            [sortorder] => 2
            [color] => 0000C8
            [yaxisside] => 0
            [calc_fnc] => 2
            [type] => 0
            [key_] => vfs.dev.read[/dev/mapper/vg-mysql,ops]
            [hostid] => 10010000000010003
            [flags] => 0
            [host] => Template_App_MySQL
        )

    [3] => Array
        (
            [graphs] => Array
                (
                    [0] => Array
                        (
                            [graphid] => 10010000000002093
                        )

                )

            [gitemid] => 10010000000023434
            [graphid] => 10010000000002093
            [itemid] => 10010000000045667
            [drawtype] => 0
            [sortorder] => 3
            [color] => C800C8
            [yaxisside] => 1
            [calc_fnc] => 2
            [type] => 0
            [key_] => vfs.dev.read[/dev/mapper/vg-mysql,sps]
            [hostid] => 10010000000010003
            [flags] => 0
            [host] => Template_App_MySQL
        )

    [4] => Array
        (
            [graphs] => Array
                (
                    [0] => Array
                        (
                            [graphid] => 10010000000002093
                        )

                )

            [gitemid] => 10010000000023435
            [graphid] => 10010000000002093
            [itemid] => 10010000000045675
            [drawtype] => 0
            [sortorder] => 4
            [color] => 00C8C8
            [yaxisside] => 0
            [calc_fnc] => 2
            [type] => 0
            [key_] => vfs.dev.write[/dev/mapper/vg-mysql,ops]
            [hostid] => 10010000000010003
            [flags] => 0
            [host] => Template_App_MySQL
        )

    [5] => Array
        (
            [graphs] => Array
                (
                    [0] => Array
                        (
                            [graphid] => 10010000000002093
                        )

                )

            [gitemid] => 10010000000023436
            [graphid] => 10010000000002093
            [itemid] => 10010000000045679
            [drawtype] => 0
            [sortorder] => 5
            [color] => C8C800
            [yaxisside] => 1
            [calc_fnc] => 2
            [type] => 0
            [key_] => vfs.dev.write[/dev/mapper/vg-mysql,sps]
            [hostid] => 10010000000010003
            [flags] => 0
            [host] => Template_App_MySQL
        )

)

After click save button.

3. graph->update [graphs.php:221]
Parameters:
Array
(
    [name] => MySQL performance on {HOST.NAME}
    [width] => 900
    [height] => 200
    [ymin_type] => 0
    [ymax_type] => 0
    [yaxismin] => 0.0000
    [yaxismax] => 100.0000
    [ymin_itemid] => 0
    [ymax_itemid] => 0
    [show_work_period] => 1
    [show_triggers] => 1
    [graphtype] => 0
    [show_legend] => 1
    [show_3d] => 0
    [percent_left] => 0
    [percent_right] => 0
    [gitems] => Array
        (
            [0] => Array
                (
                    [gitemid] => 10010000000023432
                    [graphid] => 10010000000002092
                    [itemid] => 10010000000010204
                    [sortorder] => 0
                    [flags] => 0
                    [type] => 0
                    [calc_fnc] => 2
                    [drawtype] => 0
                    [yaxisside] => 0
                    [color] => C80000
                )

            [1] => Array
                (
                    [gitemid] => 10010000000023432
                    [graphid] => 10010000000002092
                    [itemid] => 10010000000010204
                    [sortorder] => 1
                    [flags] => 0
                    [type] => 0
                    [calc_fnc] => 2
                    [drawtype] => 0
                    [yaxisside] => 0
                    [color] => 00C800
                )

            [2] => Array
                (
                    [gitemid] => 10010000000023432
                    [graphid] => 10010000000002092
                    [itemid] => 10010000000045672
                    [sortorder] => 2
                    [flags] => 0
                    [type] => 0
                    [calc_fnc] => 2
                    [drawtype] => 0
                    [yaxisside] => 0
                    [color] => 0000C8
                )

            [3] => Array
                (
                    [gitemid] => 10010000000023434
                    [graphid] => 10010000000002092
                    [itemid] => 10010000000045668
                    [sortorder] => 3
                    [flags] => 0
                    [type] => 0
                    [calc_fnc] => 2
                    [drawtype] => 0
                    [yaxisside] => 1
                    [color] => C800C8
                )

            [4] => Array
                (
                    [gitemid] => 10010000000023436
                    [graphid] => 10010000000002092
                    [itemid] => 10010000000045676
                    [sortorder] => 4
                    [flags] => 0
                    [type] => 0
                    [calc_fnc] => 2
                    [drawtype] => 0
                    [yaxisside] => 0
                    [color] => 00C8C8
                )

            [5] => Array
                (
                    [gitemid] => 10010000000023436
                    [graphid] => 10010000000002092
                    [itemid] => 10010000000045680
                    [sortorder] => 5
                    [flags] => 0
                    [type] => 0
                    [calc_fnc] => 2
                    [drawtype] => 0
                    [yaxisside] => 1
                    [color] => C8C800
                )

        )

    [graphid] => 10010000000002093
)
Result:
Comment by Maxim Parkhomenko [ 2013 Mar 17 ]

I think this error correlate with javascript number type.
The JavaScript number format allows you to exactly represent all integers between -9007199254740992 (-2^53) and 9007199254740992 (2^53), inclusive. If you use integer values larger than this, you may lose precision in the trailing digits. Note, however, that certain integer operations in JavaScript are performed on 32-bit integers, which range from -2147483648 (-2^31) to 2147483647 (2^31 -1).

Comment by Maxim Parkhomenko [ 2013 Mar 18 ]

Set nodeid>91 for reproduce errors.

Comment by Andrei Gushchin (Inactive) [ 2013 Mar 18 ]

Yes, I confirm some kind of this problem, I reproduced it, but had another error.
I used NodeId = 99.
Also attach screenshot and full debug log web interface.

Comment by Andrei Gushchin (Inactive) [ 2013 Mar 18 ]

screen of error and debug.

Comment by richlv [ 2013 Mar 20 ]

ZBX-6416 might be related

Comment by Adail Horst [ 2013 Mar 20 ]

Richlv, I think too is related. I test the situation described here and found the error too.

If is necessary I have a node with this situation available on internet for tests, if is needed.

The both erros (maybe with same root cause) can be cheched on this "box". Is a CentoS machine.

Comment by Oleksii Zagorskyi [ 2013 Mar 21 ]

See conditions described in ZBX-6318, try them.

Comment by Adail Horst [ 2013 Mar 21 ]

Oleksiy,

I install the last build of 2.0.6rc1 yesterday and not solve.

For tests I try to install a new zabbix database on a zabbix server (zabbix_test) and configure him with a nodeid 30, import all templates, hosts, maps, etc. Works fine with nodeid 30, but with nodeid 102 not work.

Best Regards,
Adail Horst

Comment by adriano [ 2013 Dec 24 ]

Guess I have the same problem..

Exported template that has discovery items cannot be imported, any ideas when it will be fixed?

Graph "..." with templated items cannot contain items from other hosts.

Experiencing this on Zabbix 2.2.1

Comment by Aleksandrs Saveljevs [ 2016 Jan 25 ]

Our JavaScript handling large IDs incorrectly still seems to be a problem in Zabbix 2.4.

Generated at Fri Apr 26 19:07:11 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.