Details

      Description

      Zabbix will support monitoring of hypervisors and virtual machines. Specification at https://www.zabbix.org/wiki/Docs/specs/ZBXNEXT-1633

      1. 1633.JPG
        41 kB
      2. 1633.png
        5 kB
      3. 1633-2.JPG
        177 kB
      4. 1633-3.JPG
        23 kB
      5. 1633-4.JPG
        20 kB
      6. auditlog.png
        51 kB
      7. bar.png
        28 kB
      8. Configuration of proxies - Mozilla Firefox_089.png
        32 kB
      9. templates.png
        18 kB

        Activity

        Hide
        Marc added a comment -

        What about container based virtualization (like OpenVZ, Solaris zones, LXC, AIX workload partitions, etc.)?

        Show
        Marc added a comment - What about container based virtualization (like OpenVZ, Solaris zones, LXC, AIX workload partitions, etc.)?
        Hide
        richlv added a comment -

        it might be possible to implement in the same framework, but we're still waiting for the specification to appear

        Show
        richlv added a comment - it might be possible to implement in the same framework, but we're still waiting for the specification to appear
        Hide
        Toms added a comment - - edited

        (1) Undefined variable: dbHost [hosts.php:643 → CView->render() → include() in C:\zabbix\ZBXNEXT-1633\frontends\php\include\views\configuration.host.edit.php:155]

        When creating new host.

        Pavels Jelisejevs RESOLVED in r34626.

        Toms CLOSED

        Show
        Toms added a comment - - edited (1) Undefined variable: dbHost [hosts.php:643 → CView->render() → include() in C:\zabbix\ZBXNEXT-1633\frontends\php\include\views\configuration.host.edit.php:155] When creating new host. Pavels Jelisejevs RESOLVED in r34626. Toms CLOSED
        Hide
        Toms added a comment - - edited

        (2) According to spec: "The host inventory tab will not be displayed."
        Now it is possible to see host inventory tab when creating host prototype.

        Pavels Jelisejevs It was a last-minute change, I've added it to the spec.

        Toms CLOSED

        Show
        Toms added a comment - - edited (2) According to spec: "The host inventory tab will not be displayed." Now it is possible to see host inventory tab when creating host prototype. Pavels Jelisejevs It was a last-minute change, I've added it to the spec. Toms CLOSED
        Hide
        Toms added a comment - - edited

        (3)
        Created template with discovery rule and host prototype in it.
        Then created host and linked that template.
        Then on host cloned host prototype.
        Then full cloned host.
        Only templated host prototype where copied, cloned missing.
        I believe both host prototypes should be created on new host.

        + Same host prototype missing when exporting and importing host.

        Pavels Jelisejevs This is because currently prototypes that belong to an inherited LLD rules are not exported or cloned. There's a separate issue for that - ZBX-6364. CLOSED.

        Toms CLOSED

        Show
        Toms added a comment - - edited (3) Created template with discovery rule and host prototype in it. Then created host and linked that template. Then on host cloned host prototype. Then full cloned host. Only templated host prototype where copied, cloned missing. I believe both host prototypes should be created on new host. + Same host prototype missing when exporting and importing host. Pavels Jelisejevs This is because currently prototypes that belong to an inherited LLD rules are not exported or cloned. There's a separate issue for that - ZBX-6364 . CLOSED. Toms CLOSED
        Hide
        Toms added a comment - - edited

        (4) gold or equivalent coloring missing for "dark orange" and "black & blue" themes for discovery rule prefix in host list.

        Pavels Jelisejevs Discovered objects are not highlighted in these themes, so we'll leave it as is for now.

        Toms CLOSED

        Show
        Toms added a comment - - edited (4) gold or equivalent coloring missing for "dark orange" and "black & blue" themes for discovery rule prefix in host list. Pavels Jelisejevs Discovered objects are not highlighted in these themes, so we'll leave it as is for now. Toms CLOSED
        Hide
        Toms added a comment - - edited

        (5)
        Undefined index: inventory_mode [hosts.php:431 → CAPIObject->update() → CAPIObject->__call() → czbxrpc::call() → czbxrpc::callAPI() → call_user_func() → CHost->update() → CHost->massUpdate() in C:\zabbix\ZBXNEXT-1633\frontends\php\api\classes\CHost.php:1249]

        When saving inventory fields for discovered host.

        Pavels Jelisejevs RESOLVED in r34640.

        Toms CLOSED

        Show
        Toms added a comment - - edited (5) Undefined index: inventory_mode [hosts.php:431 → CAPIObject->update() → CAPIObject->__call() → czbxrpc::call() → czbxrpc::callAPI() → call_user_func() → CHost->update() → CHost->massUpdate() in C:\zabbix\ZBXNEXT-1633\frontends\php\api\classes\CHost.php:1249] When saving inventory fields for discovered host. Pavels Jelisejevs RESOLVED in r34640. Toms CLOSED
        Hide
        Toms added a comment - - edited

        (6)
        Undefined index: ts_delete [hosts.php:887 → getAvailabilityTable() in C:\zabbix\ZBXNEXT-1633\frontends\php\include\html.inc.php:649]

        in hosts.php

        happened after deleting template which where linked to a host.

        Pavels Jelisejevs RESOLVED in r34647. Now if a host prototype is deleted, all discovered hosts will be deleted too. Added it to the spec.

        Toms CLOSED

        Show
        Toms added a comment - - edited (6) Undefined index: ts_delete [hosts.php:887 → getAvailabilityTable() in C:\zabbix\ZBXNEXT-1633\frontends\php\include\html.inc.php:649] in hosts.php happened after deleting template which where linked to a host. Pavels Jelisejevs RESOLVED in r34647. Now if a host prototype is deleted, all discovered hosts will be deleted too. Added it to the spec. Toms CLOSED
        Hide
        Toms added a comment - - edited

        (7) When creating new proxy, in other hosts field we see discovery hosts and host prototypes. We shouldn't see them here.

        Pavels Jelisejevs RESOLVED in r34641.

        Toms CLOSED

        Show
        Toms added a comment - - edited (7) When creating new proxy, in other hosts field we see discovery hosts and host prototypes. We shouldn't see them here. Pavels Jelisejevs RESOLVED in r34641. Toms CLOSED
        Hide
        Toms added a comment - - edited

        (8) When "selectHostPrototypes": true for discoveryrule.get, count is returned. Shouldn't. I suggest use of strict comparison everywhere where loose not necessary.

        Pavels Jelisejevs This is a global API issue that will be fixed under ZBXNEXT-1485. CLOSED.

        Toms CLOSED

        Show
        Toms added a comment - - edited (8) When "selectHostPrototypes": true for discoveryrule.get, count is returned. Shouldn't. I suggest use of strict comparison everywhere where loose not necessary. Pavels Jelisejevs This is a global API issue that will be fixed under ZBXNEXT-1485 . CLOSED. Toms CLOSED
        Hide
        Kodai Terashima added a comment - - edited

        Cannot get values on following items from vSphere 5.0 and 5.1:

        • virt.vmware.vm.memory.size.ballooned
        • virt.vmware.vm.storage.commited
        • virt.vmware.vm.memory.size.compressed
        • virt.vmware.vm.powerstate
        • virt.vmware.vm.memory.size.swapped
        • virt.vmware.vm.storage.uncommited
        • virt.vmware.vm.storage.unshared
        • virt.vmware.vm.uptime
        • virt.vmware.host.uptime

        Following items are ok:

        • virt.vmware.vm.cpu.usage
        • virt.vmware.vm.memory.size
        • virt.vmware.vm.cpu.num
        • virt.vmware.host.* (except uptime)

        It seems that Zabbix server returns NULL on this part in checks_simple_vmware.c:

        if (xmlXPathNodeSetIsEmpty(xpathObj->nodesetval))
        {
                xmlCleanupParser();
                return NULL;
        }
        

        Kodai Terashima I confirmed these items work on r37381. CLOSED

        Show
        Kodai Terashima added a comment - - edited Cannot get values on following items from vSphere 5.0 and 5.1: virt.vmware.vm.memory.size.ballooned virt.vmware.vm.storage.commited virt.vmware.vm.memory.size.compressed virt.vmware.vm.powerstate virt.vmware.vm.memory.size.swapped virt.vmware.vm.storage.uncommited virt.vmware.vm.storage.unshared virt.vmware.vm.uptime virt.vmware.host.uptime Following items are ok: virt.vmware.vm.cpu.usage virt.vmware.vm.memory.size virt.vmware.vm.cpu.num virt.vmware.host.* (except uptime) It seems that Zabbix server returns NULL on this part in checks_simple_vmware.c: if (xmlXPathNodeSetIsEmpty(xpathObj->nodesetval)) { xmlCleanupParser(); return NULL; } Kodai Terashima I confirmed these items work on r37381. CLOSED
        Hide
        Toms added a comment - - edited

        (9) DB table hosts column flags has values 0,2 and 4, according to spec only 0 and 4 should be present.

        Pavels Jelisejevs This refers to the host API, not the table itself. It means that the hosts returned by the host API can only have values 0 and 4.

        Toms CLOSED

        Show
        Toms added a comment - - edited (9) DB table hosts column flags has values 0,2 and 4, according to spec only 0 and 4 should be present. Pavels Jelisejevs This refers to the host API, not the table itself. It means that the hosts returned by the host API can only have values 0 and 4. Toms CLOSED
        Hide
        Toms added a comment - - edited

        (10) [S] have two hosts with discovery rules with host prototypes.
        Try to make it so that both prototypes creates hosts with the same name.
        For one Visible name will be changed, but no changes to visible name in host prototypes.

        Alexander Vladishev RESOLVED in r34970.

        Toms REOPENED

        If we have already discovered two hosts and then change host prototype of one to make both hosts with same name, then visible name is changed for that host. This should be considered if it is desired behavior.

        Alexander Vladishev RESOLVED in r37576.

        CLOSED

        Show
        Toms added a comment - - edited (10) [S] have two hosts with discovery rules with host prototypes. Try to make it so that both prototypes creates hosts with the same name. For one Visible name will be changed, but no changes to visible name in host prototypes. Alexander Vladishev RESOLVED in r34970. Toms REOPENED If we have already discovered two hosts and then change host prototype of one to make both hosts with same name, then visible name is changed for that host. This should be considered if it is desired behavior. Alexander Vladishev RESOLVED in r37576. CLOSED
        Hide
        Pavels Jelisejevs added a comment - - edited

        (11) [FS] Host prototypes must not be available on discovered hosts.

        Pavels Jelisejevs Frontend side resolved in r34650.

        Pavels Jelisejevs We've decided that host prototypes must also not be inherited when from templates on discovered hosts. REOPENED.

        Pavels Jelisejevs Frontend side resolved in r34980.

        Toms CLOSED

        Show
        Pavels Jelisejevs added a comment - - edited (11) [FS] Host prototypes must not be available on discovered hosts. Pavels Jelisejevs Frontend side resolved in r34650. Pavels Jelisejevs We've decided that host prototypes must also not be inherited when from templates on discovered hosts. REOPENED. Pavels Jelisejevs Frontend side resolved in r34980. Toms CLOSED
        Hide
        Toms added a comment - - edited

        (12) No need for braces in CValidator.php line:34 ... $this->{$key} = $value;

        Pavels Jelisejevs RESOLVED r34753.

        Toms CLOSED

        Show
        Toms added a comment - - edited (12) No need for braces in CValidator.php line:34 ... $this->{$key} = $value; Pavels Jelisejevs RESOLVED r34753. Toms CLOSED
        Hide
        Toms added a comment - - edited

        (13) typo in ... throw new Exception(sprintf('Incorrect option "%1$s" for validator "%1$s".', $name, get_class($this)));
        reference 1 used twice

        Pavels Jelisejevs RESOLVED r34753.

        Toms CLOSED

        Show
        Toms added a comment - - edited (13) typo in ... throw new Exception(sprintf('Incorrect option "%1$s" for validator "%1$s".', $name, get_class($this))); reference 1 used twice Pavels Jelisejevs RESOLVED r34753. Toms CLOSED
        Hide
        Toms added a comment - - edited

        (14) configuration.host.discovery.list.php

        • shortcut "$host = $data['host'];" really unnecessary;
        • line: 93 significantly exceeds maximum length and is quite unreadable.

        Pavels Jelisejevs RESOLVED in r34755.

        Toms REOPENED 1st part not resolved or comment missing why it wont be resolved.

        Pavels Jelisejevs $data['host'] is used multiple times in this view so adding a shortcut is more convenient and IDE-friednly.

        Toms I still think that this shortcut brings unnecessary complexity. Approved by Sasha that this should be removed.

        Pavels Jelisejevs RESOLVED in r34976.

        Toms CLOSED

        Show
        Toms added a comment - - edited (14) configuration.host.discovery.list.php shortcut "$host = $data ['host'] ;" really unnecessary; line: 93 significantly exceeds maximum length and is quite unreadable. Pavels Jelisejevs RESOLVED in r34755. Toms REOPENED 1st part not resolved or comment missing why it wont be resolved. Pavels Jelisejevs $data ['host'] is used multiple times in this view so adding a shortcut is more convenient and IDE-friednly. Toms I still think that this shortcut brings unnecessary complexity. Approved by Sasha that this should be removed. Pavels Jelisejevs RESOLVED in r34976. Toms CLOSED
        Hide
        Toms added a comment - - edited

        (15)
        It is possible to change inventory mode for discovered host through URL:
        http://zbxdev/hosts.php?form=update&hostid=10164&groupid=0&sid=42c02afc75d116b3&inventory_mode=1

        Pavels Jelisejevs RESOLVED in r34756.

        Toms CLOSED

        Show
        Toms added a comment - - edited (15) It is possible to change inventory mode for discovered host through URL: http://zbxdev/hosts.php?form=update&hostid=10164&groupid=0&sid=42c02afc75d116b3&inventory_mode=1 Pavels Jelisejevs RESOLVED in r34756. Toms CLOSED
        Hide
        Toms added a comment - - edited

        (16)
        Fatal error: Uncaught exception 'Exception' with message 'Incorrect option "allow_multiple" for validator "allow_multiple".' in C:\zabbix\ZBXNEXT-1633\frontends\php\include\classes\validators\CValidator.php on line 74

        When adding flexible interval for item prototype.

        Pavels Jelisejevs Same thing happened for LLD rules. RESOLVED in r34761.

        Toms CLOSED

        Show
        Toms added a comment - - edited (16) Fatal error: Uncaught exception 'Exception' with message 'Incorrect option "allow_multiple" for validator "allow_multiple".' in C:\zabbix\ ZBXNEXT-1633 \frontends\php\include\classes\validators\CValidator.php on line 74 When adding flexible interval for item prototype. Pavels Jelisejevs Same thing happened for LLD rules. RESOLVED in r34761. Toms CLOSED
        Hide
        Toms added a comment - - edited

        (17) In Administration > DM
        when creating new proxy, hosts already belonging to some proxies are not disabled in right side of tweenbox.

        Pavels Jelisejevs Cannot reproduce, might have already been fixed.

        Toms CLOSED

        Show
        Toms added a comment - - edited (17) In Administration > DM when creating new proxy, hosts already belonging to some proxies are not disabled in right side of tweenbox. Pavels Jelisejevs Cannot reproduce, might have already been fixed. Toms CLOSED
        Hide
        Toms added a comment - - edited

        (18) [S] I had a discovered host linked to proxy.
        Host having discovery rule was unlinked from proxy.
        I linked template to discovery rules host prototype.

        I was unable to to send data via zabbix sender to update discovered host.

        After unlinking template and updating prototype (now it doesn't belong to proxy) I was able to link template again and update discovered host via zabbix sender.

        command:
        bin/zabbix_sender -z localhost -s "mhost" -k dr -p 20051 -vv -o '{"data":[{"

        {#VMID}

        ":"vm_2","

        {#VMNAME}

        ":"Debian linux i386"}]}

        response:
        zabbix_sender [14951]: DEBUG: answer [

        { "response":"success", "info":"Processed 0 Failed 1 Total 1 Seconds spent 0.000038"}

        ]
        info from server: "Processed 0 Failed 1 Total 1 Seconds spent 0.000038"
        sent: 1; skipped: 0; total: 1

        Pavels Jelisejevs You cannot send data via zabbix_sender to a host linked to a proxy. May be you were unable to send the data after unlinking the proxy because the server configuration cache has not been updated yet.

        Alexander Vladishev Cannot reproduce the issue. Proxy-based installation works fine!

        Toms CLOSED

        Show
        Toms added a comment - - edited (18) [S] I had a discovered host linked to proxy. Host having discovery rule was unlinked from proxy. I linked template to discovery rules host prototype. I was unable to to send data via zabbix sender to update discovered host. After unlinking template and updating prototype (now it doesn't belong to proxy) I was able to link template again and update discovered host via zabbix sender. command: bin/zabbix_sender -z localhost -s "mhost" -k dr -p 20051 -vv -o '{"data":[{" {#VMID} ":"vm_2"," {#VMNAME} ":"Debian linux i386"}]} response: zabbix_sender [14951] : DEBUG: answer [ { "response":"success", "info":"Processed 0 Failed 1 Total 1 Seconds spent 0.000038"} ] info from server: "Processed 0 Failed 1 Total 1 Seconds spent 0.000038" sent: 1; skipped: 0; total: 1 Pavels Jelisejevs You cannot send data via zabbix_sender to a host linked to a proxy. May be you were unable to send the data after unlinking the proxy because the server configuration cache has not been updated yet. Alexander Vladishev Cannot reproduce the issue. Proxy-based installation works fine! Toms CLOSED
        Hide
        dimir added a comment - - edited

        (19) [S] I think there is a typo in "committed"/"uncommitted" (missing double 't') key names:

        virt.vmware.vm.storage.commited
        virt.vmware.vm.storage.uncommited
        

        And same thing with function names:

        check_vmware_vmstoragecommited()
        check_vmware_vmstorageuncommited()
        

        Alexander Vladishev RESOLVED in r34982.

        CLOSED

        Show
        dimir added a comment - - edited (19) [S] I think there is a typo in "committed"/"uncommitted" (missing double 't') key names: virt.vmware.vm.storage.commited virt.vmware.vm.storage.uncommited And same thing with function names: check_vmware_vmstoragecommited() check_vmware_vmstorageuncommited() Alexander Vladishev RESOLVED in r34982. CLOSED
        Hide
        Toms added a comment - - edited

        (20)
        Updated: Host prototype "hp

        {#VMNAME}

        2" on "my temp 2".
        No permissions to referred object or it does not exist!

        When trying to update template which is linked to discovered host.

        Pavels Jelisejevs Cannot reproduce, might have already been fixed.

        Toms CLOSED

        Show
        Toms added a comment - - edited (20) Updated: Host prototype "hp {#VMNAME} 2" on "my temp 2". No permissions to referred object or it does not exist! When trying to update template which is linked to discovered host. Pavels Jelisejevs Cannot reproduce, might have already been fixed. Toms CLOSED
        Hide
        Toms added a comment - - edited

        (21) [FS]
        Undefined index: ts_delete [hosts.php:887 → getAvailabilityTable() in C:\zabbix\ZBXNEXT-1633\frontends\php\include\html.inc.php:649]

        to repeat:
        1. Create template with discovery rule with host prototype, which is linked to template it self.
        2. Create host linked with template.
        3. Discover discovered host.
        4. Unlink template from host prototype in template discovery rule.
        5.- on this step API creates a second host prototype on a discovered host
        6. Discover discovered host again.

        Pavels Jelisejevs API bug fixed in r34980.

        Alexander Vladishev [S] RESOLVED in r35003

        Toms CLOSED

        Show
        Toms added a comment - - edited (21) [FS] Undefined index: ts_delete [hosts.php:887 → getAvailabilityTable() in C:\zabbix\ZBXNEXT-1633\frontends\php\include\html.inc.php:649] to repeat: 1. Create template with discovery rule with host prototype, which is linked to template it self. 2. Create host linked with template. 3. Discover discovered host. 4. Unlink template from host prototype in template discovery rule. 5.- on this step API creates a second host prototype on a discovered host 6. Discover discovered host again. Pavels Jelisejevs API bug fixed in r34980. Alexander Vladishev [S] RESOLVED in r35003 Toms CLOSED
        Hide
        Toms added a comment - - edited

        (22) When deleting discovered host which were created from templated host prototype, host prototype was deleted as well. Shouldn't be deleted.

        Pavels Jelisejevs Cannot reproduce. The prototype could be deleted as a result of (21).

        Toms CLOSED

        Show
        Toms added a comment - - edited (22) When deleting discovered host which were created from templated host prototype, host prototype was deleted as well. Shouldn't be deleted. Pavels Jelisejevs Cannot reproduce. The prototype could be deleted as a result of (21). Toms CLOSED
        Hide
        Toms added a comment - - edited

        (23) If we have host with Disabled "Host inventory" then with Host.update API call:
        {
        "hostid": 10184,
        "inventory":

        { "alias": "asd" }

        }
        we enable it.

        Shouldn't be so.

        Pavels Jelisejevs This bug also exists in the trunk, so I've created a separate ZBX for it - ZBX-6465. CLOSED.

        Toms CLOSED

        Show
        Toms added a comment - - edited (23) If we have host with Disabled "Host inventory" then with Host.update API call: { "hostid": 10184, "inventory": { "alias": "asd" } } we enable it. Shouldn't be so. Pavels Jelisejevs This bug also exists in the trunk, so I've created a separate ZBX for it - ZBX-6465 . CLOSED. Toms CLOSED
        Hide
        Toms added a comment - - edited

        (24) in CHost.php line:933

        // fetch fields required to update host inventory
        if (isset($host['inventory'])) {
        	$host['inventory']['hostid'] = $host['hostid'];
        	$host['inventory'] = $this->extendObject('host_inventory', $host['inventory'], array('inventory_mode'));
        }
        

        In this code part bulk extendObjects before loop should be used, to make one query instead of several.

        Pavels Jelisejevs RESOLVED in r34831.

        Toms CLOSED

        Show
        Toms added a comment - - edited (24) in CHost.php line:933 // fetch fields required to update host inventory if (isset($host['inventory'])) { $host['inventory']['hostid'] = $host['hostid']; $host['inventory'] = $ this ->extendObject('host_inventory', $host['inventory'], array('inventory_mode')); } In this code part bulk extendObjects before loop should be used, to make one query instead of several. Pavels Jelisejevs RESOLVED in r34831. Toms CLOSED
        Hide
        Toms added a comment - - edited

        (25)
        unnecessary comma in CHost.php line: 1725 "'preservekeys' => true,"

        Pavels Jelisejevs RESOLVED in r34813.

        Toms CLOSED

        Show
        Toms added a comment - - edited (25) unnecessary comma in CHost.php line: 1725 "'preservekeys' => true," Pavels Jelisejevs RESOLVED in r34813. Toms CLOSED
        Hide
        Toms added a comment - - edited

        (26) CHost.php line: 1726 "$result = $relationMap->mapOne($result, $discoveryRules, 'discoveryRule');"

        mapOne is inefficient method as it iterates through all $result data even if only one element present in $discoveryRule array;

        Pavels Jelisejevs We need to iterate through all of the $results anyway so we can assign an empty array of no related object exist.

        Toms CLOSED

        Show
        Toms added a comment - - edited (26) CHost.php line: 1726 "$result = $relationMap->mapOne($result, $discoveryRules, 'discoveryRule');" mapOne is inefficient method as it iterates through all $result data even if only one element present in $discoveryRule array; Pavels Jelisejevs We need to iterate through all of the $results anyway so we can assign an empty array of no related object exist. Toms CLOSED
        Hide
        Toms added a comment - - edited

        (27)
        for "selectDiscoveryRule"

        while ($rule = DBfetch($dbRules)) {
        	$relationMap->addRelation($rule['hostid'], $rule['parent_itemid']);
        }
        

        is used, but for "selectHostDiscovery"

        $relationMap = $this->createRelationMap($hostDiscoveries, 'hostid', 'hostid');
        

        is used.

        One approach should be chosen, to make code consistent and easy to read.

        Pavels Jelisejevs The createRelationMap() method is a shortcut we can use if the relation if stored in a single table (for instance, item-host). If the relation is more complex, like discovered hosts - LLD rules, we need to use an explicit SQL query and build the value map manually.

        Toms For first case it is still possible to fetch all data in array and use createRelationMap() with parameters.

        Pavels Jelisejevs RESOLVED in r34975.

        Toms CLOSED

        Show
        Toms added a comment - - edited (27) for "selectDiscoveryRule" while ($rule = DBfetch($dbRules)) { $relationMap->addRelation($rule['hostid'], $rule['parent_itemid']); } is used, but for "selectHostDiscovery" $relationMap = $ this ->createRelationMap($hostDiscoveries, 'hostid', 'hostid'); is used. One approach should be chosen, to make code consistent and easy to read. Pavels Jelisejevs The createRelationMap() method is a shortcut we can use if the relation if stored in a single table (for instance, item-host). If the relation is more complex, like discovered hosts - LLD rules, we need to use an explicit SQL query and build the value map manually. Toms For first case it is still possible to fetch all data in array and use createRelationMap() with parameters. Pavels Jelisejevs RESOLVED in r34975. Toms CLOSED
        Hide
        Toms added a comment - - edited

        (28)

        $hostDiscoveries = API::getApi()->select('host_discovery', array(
        	'output' => $this->outputExtend('host_discovery', array('hostid'), $options['selectHostDiscovery']),
        	'filter' => array('itemid' => array_keys($result)),
        	'preservekeys' => true
        ));
        sdii($hostDiscoveries);
        

        if you print out $hostDiscoveries, you can see that unnecessary data is retrieved.

        + I propose to use SQL approach as used in "selectDiscoveryRule" part.

        Pavels Jelisejevs If by unnecessary data you mean the "hostid" field, it is required to create the relation map. I would refrain from using the simple SQL approach here, because it will be inconsistent with other similar places and might introduce new bugs.

        Toms No, I mean that for more than necessary hosts data is retrieved.

        Pavels Jelisejevs Ah, right. RESOLVED in r34974.

        Toms CLOSED

        Show
        Toms added a comment - - edited (28) $hostDiscoveries = API::getApi()->select('host_discovery', array( 'output' => $ this ->outputExtend('host_discovery', array('hostid'), $options['selectHostDiscovery']), 'filter' => array('itemid' => array_keys($result)), 'preservekeys' => true )); sdii($hostDiscoveries); if you print out $hostDiscoveries, you can see that unnecessary data is retrieved. + I propose to use SQL approach as used in "selectDiscoveryRule" part. Pavels Jelisejevs If by unnecessary data you mean the "hostid" field, it is required to create the relation map. I would refrain from using the simple SQL approach here, because it will be inconsistent with other similar places and might introduce new bugs. Toms No, I mean that for more than necessary hosts data is retrieved. Pavels Jelisejevs Ah, right. RESOLVED in r34974. Toms CLOSED
        Hide
        Toms added a comment - - edited

        (29)
        for 'selectHostDiscovery' use of CRelationMap() and its functionality is an overkill.
        Simple hashmap could be used as data structure.

        Could be that some previous subissues are now not actual.

        Pavels Jelisejevs I used this approach because it's more consistent with other places and has less potential to introduce bugs. Even though it has a slight performance overhead.

        Toms CLOSED, so it be

        Show
        Toms added a comment - - edited (29) for 'selectHostDiscovery' use of CRelationMap() and its functionality is an overkill. Simple hashmap could be used as data structure. Could be that some previous subissues are now not actual. Pavels Jelisejevs I used this approach because it's more consistent with other places and has less potential to introduce bugs. Even though it has a slight performance overhead. Toms CLOSED, so it be
        Hide
        dimir added a comment - - edited

        (31) [F] Seems the changes were not tested with PostgreSQL. It does not support naming fields without "AS" in SELECT query. Adding a host prototype gives error:

        pg_query(): Query failed: ERROR:  syntax error at or near "parent_hostid"
        LINE 1: SELECT hd.hostid,i.hostid parent_hostid FROM host_discovery ...
                                          ^ [host_prototypes.php:137 → CAPIObject->create() → CAPIObject->__call() → czbxrpc::call() → czbxrpc::callAPI() → call_user_func() → CHostPrototype->create() → CHostPrototype->createReal() → CHostPrototype->get() → CHostPrototype->addRelatedObjects() → DBselect() → pg_query() in [...]/ZBXNEXT-1633/frontends/php/include/db.inc.php:441]
        

        The problem is in the API, frontends/php/api/classes/CHostPrototype.php:941

        SELECT hd.hostid,i.hostid parent_hostid <- should be 'SELECT hd.hostid,i.hostid AS parent_hostid'
        

        The error is not properly handled as well as success message is shown while host prototype was not added:

        Host prototype added
        

        Pavels Jelisejevs RESOLVED in r34834.

        dimir CLOSED

        Show
        dimir added a comment - - edited (31) [F] Seems the changes were not tested with PostgreSQL. It does not support naming fields without "AS" in SELECT query. Adding a host prototype gives error: pg_query(): Query failed: ERROR: syntax error at or near "parent_hostid" LINE 1: SELECT hd.hostid,i.hostid parent_hostid FROM host_discovery ... ^ [host_prototypes.php:137 → CAPIObject->create() → CAPIObject->__call() → czbxrpc::call() → czbxrpc::callAPI() → call_user_func() → CHostPrototype->create() → CHostPrototype->createReal() → CHostPrototype->get() → CHostPrototype->addRelatedObjects() → DBselect() → pg_query() in [...]/ZBXNEXT-1633/frontends/php/include/db.inc.php:441] The problem is in the API, frontends/php/api/classes/CHostPrototype.php:941 SELECT hd.hostid,i.hostid parent_hostid <- should be 'SELECT hd.hostid,i.hostid AS parent_hostid' The error is not properly handled as well as success message is shown while host prototype was not added: Host prototype added Pavels Jelisejevs RESOLVED in r34834. dimir CLOSED
        Hide
        Toms added a comment - - edited

        (32) Now there is missing PHPDoc for CHostGeneral link() method.

        Pavels Jelisejevs We don't require PHPDoc for overridden methods.

        Toms CLOSED assuming overriding methods was meant

        Show
        Toms added a comment - - edited (32) Now there is missing PHPDoc for CHostGeneral link() method. Pavels Jelisejevs We don't require PHPDoc for overridden methods. Toms CLOSED assuming overriding methods was meant
        Hide
        Toms added a comment - - edited

        (33) CHostGeneral line:415
        Instead of:

        $query = DBSelect(... sql ...);
        $hostPrototypes = array();
        while ($hostPrototype = DBfetch($query)) {
        	$hostPrototypes[$hostPrototype['hostid']] = array(
        		'host' => $hostPrototype['host'],
        		'parent_host' => $hostPrototype['parent_host']
        	);
        }
        

        use:

        $hostPrototypes = DBfetchArrayAssoc(DBSelect(... sql ...), 'hostid');
        

        Pavels Jelisejevs RESOLVED in r34835.

        Toms CLOSED

        Show
        Toms added a comment - - edited (33) CHostGeneral line:415 Instead of: $query = DBSelect(... sql ...); $hostPrototypes = array(); while ($hostPrototype = DBfetch($query)) { $hostPrototypes[$hostPrototype['hostid']] = array( 'host' => $hostPrototype['host'], 'parent_host' => $hostPrototype['parent_host'] ); } use: $hostPrototypes = DBfetchArrayAssoc(DBSelect(... sql ...), 'hostid'); Pavels Jelisejevs RESOLVED in r34835. Toms CLOSED
        Hide
        Toms added a comment - - edited

        (34)
        zbx_objectValues($data['hosts'], 'hostid') called twice in CTemplate.php line:775, 779

        Pavels Jelisejevs RESOLVED in r34836.

        Toms CLOSED

        Show
        Toms added a comment - - edited (34) zbx_objectValues($data ['hosts'] , 'hostid') called twice in CTemplate.php line:775, 779 Pavels Jelisejevs RESOLVED in r34836. Toms CLOSED
        Hide
        Toms added a comment - - edited

        (35) really minor, but ... spacing broken in defines.inc.php lines:67-70

        Pavels Jelisejevs RESOLVED in r34813.

        Toms REOPENED not fixed for line 70

        Pavels Jelisejevs RESOLVED in r34977.

        Toms CLOSED

        Show
        Toms added a comment - - edited (35) really minor, but ... spacing broken in defines.inc.php lines:67-70 Pavels Jelisejevs RESOLVED in r34813. Toms REOPENED not fixed for line 70 Pavels Jelisejevs RESOLVED in r34977. Toms CLOSED
        Hide
        Toms added a comment - - edited

        (36) configuration.host.prototype.list.php is a view and therefore there shouldn't be any DB access : get_realrule_by_itemid_and_hostid() in line 62;

        Pavels Jelisejevs RESOLVED in r34842.

        Toms CLOSED

        Show
        Toms added a comment - - edited (36) configuration.host.prototype.list.php is a view and therefore there shouldn't be any DB access : get_realrule_by_itemid_and_hostid() in line 62; Pavels Jelisejevs RESOLVED in r34842. Toms CLOSED
        Hide
        Toms added a comment - - edited

        (37) Undefined variable: host [ in C:\zabbix\ZBXNEXT-1633\frontends\php\host_discovery.php:293]

        When updating discovery rule on template.

        Pavels Jelisejevs RESOLVED in r34843.

        Toms CLOSED

        Show
        Toms added a comment - - edited (37) Undefined variable: host [ in C:\zabbix\ ZBXNEXT-1633 \frontends\php\host_discovery.php:293] When updating discovery rule on template. Pavels Jelisejevs RESOLVED in r34843. Toms CLOSED
        Hide
        Toms added a comment - - edited

        (38) In getHostPrototypeSourceParentIds() function
        if we would do mapping the other way round in $result array, then we would not need perform unnecessary array searching (array_search() in line:1184).
        This is important if we have several host prototypes in list.

        Pavels Jelisejevs I've rewritten the function in r34871. I, personally, don't think that the slight performance boost is worth the increased complexity. This functions is only used to display the list of inherited host prototypes in the frontend, it won't have input sets large enough to cause performance problems. RESOLVED.

        Toms REOPENED

        consider using array_flip() function.

        I don't see any increased complexity, but performance improvement is significant if we can make O( n ) algorithm instead of O( n^2 ), for n which can easily be 100.

        Pavels Jelisejevs It's a multi-dimensional array. We cant user array_flip() on it.

        Toms Yep, CLOSED

        Show
        Toms added a comment - - edited (38) In getHostPrototypeSourceParentIds() function if we would do mapping the other way round in $result array, then we would not need perform unnecessary array searching (array_search() in line:1184). This is important if we have several host prototypes in list. Pavels Jelisejevs I've rewritten the function in r34871. I, personally, don't think that the slight performance boost is worth the increased complexity. This functions is only used to display the list of inherited host prototypes in the frontend, it won't have input sets large enough to cause performance problems. RESOLVED. Toms REOPENED consider using array_flip() function. I don't see any increased complexity, but performance improvement is significant if we can make O( n ) algorithm instead of O( n^2 ), for n which can easily be 100. Pavels Jelisejevs It's a multi-dimensional array. We cant user array_flip() on it. Toms Yep, CLOSED
        Hide
        Toms added a comment - - edited

        (39) PHPDoc for checkId() in CZBXAPI.php wrong - Required error messages not implemented

        Pavels Jelisejevs RESOLVED in r34844.

        Toms CLOSED

        Show
        Toms added a comment - - edited (39) PHPDoc for checkId() in CZBXAPI.php wrong - Required error messages not implemented Pavels Jelisejevs RESOLVED in r34844. Toms CLOSED
        Hide
        Toms added a comment - - edited

        (40) unnecessary comma in CConfigurationExportBuilder.php line:288

        Pavels Jelisejevs RESOLVED in r34813.

        Toms CLOSED

        Show
        Toms added a comment - - edited (40) unnecessary comma in CConfigurationExportBuilder.php line:288 Pavels Jelisejevs RESOLVED in r34813. Toms CLOSED
        Hide
        Toms added a comment - - edited

        (41) Regarding CArrayHelper method findDuplicate()

        if $uniqueBy is present then uniqueness will be checked between both keys, so it should be renamed to something like $uniqueField2 to represent that it has no other meaning that $uniqueField. As well PHPDoc for both mentioned parameters are totally different and second one is hard to understand.

        + this method will fail if 0 will be selected for second uniqueness field.

        This method should be implemented that any amount of uniqueness fields could be selected, but at this point I believe it is out of scope for this ZBX.

        Pavels Jelisejevs Indeed. I've also added a usage example to the comment. RESOLVED in r34846-34847.

        Toms REOPENED typo in comment : "var_dump(CArrayHelper::findDuplicate($data, 'name', 'host')); // returns array with index 4" I believe it should be index 3.

        Pavels Jelisejevs RESOLVED in r34973.

        Toms CLOSED

        Show
        Toms added a comment - - edited (41) Regarding CArrayHelper method findDuplicate() if $uniqueBy is present then uniqueness will be checked between both keys, so it should be renamed to something like $uniqueField2 to represent that it has no other meaning that $uniqueField. As well PHPDoc for both mentioned parameters are totally different and second one is hard to understand. + this method will fail if 0 will be selected for second uniqueness field. This method should be implemented that any amount of uniqueness fields could be selected, but at this point I believe it is out of scope for this ZBX. Pavels Jelisejevs Indeed. I've also added a usage example to the comment. RESOLVED in r34846-34847. Toms REOPENED typo in comment : "var_dump(CArrayHelper::findDuplicate($data, 'name', 'host')); // returns array with index 4" I believe it should be index 3. Pavels Jelisejevs RESOLVED in r34973. Toms CLOSED
        Hide
        Toms added a comment - - edited

        (42) pasting fail in C20ImportFormatter.php line:349

        Pavels Jelisejevs RESOLVED in r34848.

        Toms CLOSED

        Show
        Toms added a comment - - edited (42) pasting fail in C20ImportFormatter.php line:349 Pavels Jelisejevs RESOLVED in r34848. Toms CLOSED
        Hide
        Toms added a comment - - edited

        (43) Broken HTML when editing trigger expression, see bar.png

        Pavels Jelisejevs RESOLVED in r34849 and 34877.

        Toms CLOSED

        Show
        Toms added a comment - - edited (43) Broken HTML when editing trigger expression, see bar.png Pavels Jelisejevs RESOLVED in r34849 and 34877. Toms CLOSED
        Hide
        Pavels Jelisejevs added a comment - - edited

        (44) I have template linked to a template. When updating the parent template, it is unlinked from the child template.

        Pavels Jelisejevs RESOLVED in r34875.

        Toms CLOSED

        Show
        Pavels Jelisejevs added a comment - - edited (44) I have template linked to a template. When updating the parent template, it is unlinked from the child template. Pavels Jelisejevs RESOLVED in r34875. Toms CLOSED
        Hide
        richlv added a comment -

        (45) unfinished spec.
        a) "Translation strings" section;
        b) no spec on how it should operate overall;
        c) no spec on how the new items should work;
        d) nothing on supported libxml version[s];
        e) no spec on how it will discover vms;
        f) no spec on lld macros, protocol/item value syntax etc (assuming that's how it operates)

        Show
        richlv added a comment - (45) unfinished spec. a) "Translation strings" section; b) no spec on how it should operate overall; c) no spec on how the new items should work; d) nothing on supported libxml version [s] ; e) no spec on how it will discover vms; f) no spec on lld macros, protocol/item value syntax etc (assuming that's how it operates)
        Hide
        Pavels Jelisejevs added a comment -

        All of the latest changes are implemented in the frontend.

        See the spec diff to see what has changed https://www.zabbix.org/mw/index.php5?title=Docs%2Fspecs%2FZBXNEXT-1633&diff=4212&oldid=4168

        Show
        Pavels Jelisejevs added a comment - All of the latest changes are implemented in the frontend. See the spec diff to see what has changed https://www.zabbix.org/mw/index.php5?title=Docs%2Fspecs%2FZBXNEXT-1633&diff=4212&oldid=4168
        Hide
        Pavels Jelisejevs added a comment - - edited

        (46) When editing host prototype groups and focusing on the "Groups" input, the carriage is in the wrong place.

        Pavels Jelisejevs RESOLVED in r35693.

        Toms CLOSED

        Show
        Pavels Jelisejevs added a comment - - edited (46) When editing host prototype groups and focusing on the "Groups" input, the carriage is in the wrong place. Pavels Jelisejevs RESOLVED in r35693. Toms CLOSED
        Hide
        Kodai Terashima added a comment - - edited

        (47) query error happens when template link to host

        Error in query [SELECT ht.httptestid,ht.name,ht.applicationid,ht.delay,ht.status,ht.macros,ht.agent,ht.authentication,ht.http_user,ht.http_password,ht.hostid,ht.templateid FROM httptest ht WHERE ht.hostid='10001'] [Unknown column 'ht.macros' in 'field list']

        <richlv> i believe that's (5) in ZBXNEXT-1597

        Pavels Jelisejevs It is. CLOSED.

        Show
        Kodai Terashima added a comment - - edited (47) query error happens when template link to host Error in query [SELECT ht.httptestid,ht.name,ht.applicationid,ht.delay,ht.status,ht.macros,ht.agent,ht.authentication,ht.http_user,ht.http_password,ht.hostid,ht.templateid FROM httptest ht WHERE ht.hostid='10001'] [Unknown column 'ht.macros' in 'field list'] <richlv> i believe that's (5) in ZBXNEXT-1597 Pavels Jelisejevs It is. CLOSED.
        Hide
        Toms added a comment - - edited

        (48) 1633.png
        Just try to add one more group, when editing already saved host prototype.

        Pavels Jelisejevs I've already reported it in (46). CLOSED.

        Toms CLOSED

        Show
        Toms added a comment - - edited (48) 1633.png Just try to add one more group, when editing already saved host prototype. Pavels Jelisejevs I've already reported it in (46). CLOSED. Toms CLOSED
        Hide
        Toms added a comment - - edited

        (49) wrong message:
        Host prototype "a1

        {#VMNAME}

        " must have at least one group prototype.

        When saving host prototype without host group nor host group prototype.

        Pavels Jelisejevs RESOLVED in r35704.

        Toms CLOSED

        Show
        Toms added a comment - - edited (49) wrong message: Host prototype "a1 {#VMNAME} " must have at least one group prototype . When saving host prototype without host group nor host group prototype. Pavels Jelisejevs RESOLVED in r35704. Toms CLOSED
        Hide
        Toms added a comment - - edited

        (50)[S] When having 2 host prototypes in one discovery rule with same group prototypes, server discovers 2 groups with same name.

        Alexander Vladishev RESOLVED in r37604.

        Andris Zeila CLOSED

        Show
        Toms added a comment - - edited (50) [S] When having 2 host prototypes in one discovery rule with same group prototypes, server discovers 2 groups with same name. Alexander Vladishev RESOLVED in r37604. Andris Zeila CLOSED
        Hide
        Toms added a comment - - edited

        (51) "Discovered by" link with discovery rule in discovered host edit form links to host prototype list, I expect it should link to discovery rule it self or maybe, host prototype which discovered it.

        Pavels Jelisejevs I've done it similary to the discovery links in the configuration lists. If we decide to change it, we'll need to change them all.

        Toms OK. CLOSED

        Show
        Toms added a comment - - edited (51) "Discovered by" link with discovery rule in discovered host edit form links to host prototype list, I expect it should link to discovery rule it self or maybe, host prototype which discovered it. Pavels Jelisejevs I've done it similary to the discovery links in the configuration lists. If we decide to change it, we'll need to change them all. Toms OK. CLOSED
        Hide
        Toms added a comment - - edited

        (52) [S] If using user macro ({$ABC} for example) as "Keep lost resources period (in days)" value in discovery rule, then it will not take user macro changes into account if hosts will be rediscovered.

        Alexander Vladishev Cannot reproduce. Probably it wasn't updated server configuration a cache.

        Andris Zeila Neither can I. CLOSED

        Show
        Toms added a comment - - edited (52) [S] If using user macro ({$ABC} for example) as "Keep lost resources period (in days)" value in discovery rule, then it will not take user macro changes into account if hosts will be rediscovered. Alexander Vladishev Cannot reproduce. Probably it wasn't updated server configuration a cache. Andris Zeila Neither can I. CLOSED
        Hide
        Toms added a comment - - edited

        (52) [S] If user macro with value 0.001 is used in "Keep lost resources period (in days)" then wrong delete period is shown:
        "The host group is not discovered anymore and will be deleted in 92y 10m 5d (on 03 Aug 1920 at 20:59:06)"

        Alexander Vladishev RESOLVED in r37579.

        Andris Zeila CLOSED

        Show
        Toms added a comment - - edited (52) [S] If user macro with value 0.001 is used in "Keep lost resources period (in days)" then wrong delete period is shown: "The host group is not discovered anymore and will be deleted in 92y 10m 5d (on 03 Aug 1920 at 20:59:06)" Alexander Vladishev RESOLVED in r37579. Andris Zeila CLOSED
        Hide
        Toms added a comment - - edited

        (53) [S] If for an usual host discovered group is linked, then it is possible to remove host group leaving host only with discovered host group.
        After rediscovering, if discovered group is removed, then this initial host is left without host groups.

        Alexander Vladishev RESOLVED in r37627.

        Andris Zeila CLOSED

        Show
        Toms added a comment - - edited (53) [S] If for an usual host discovered group is linked, then it is possible to remove host group leaving host only with discovered host group. After rediscovering, if discovered group is removed, then this initial host is left without host groups. Alexander Vladishev RESOLVED in r37627. Andris Zeila CLOSED
        Hide
        Toms added a comment - - edited

        (54) It is possible to rename discovered host group via API:
        {"jsonrpc":"2.0","method":"hostgroup.update","params":

        {"groupid":16,"name":"asd"}

        ,"id":3,"auth":"xxx"}

        Pavels Jelisejevs It currently possible to update discovered objects via the API. It's a global issue and will be fixed under ZBX-6386. CLOSED.

        Toms CLOSED

        Show
        Toms added a comment - - edited (54) It is possible to rename discovered host group via API: {"jsonrpc":"2.0","method":"hostgroup.update","params": {"groupid":16,"name":"asd"} ,"id":3,"auth":"xxx"} Pavels Jelisejevs It currently possible to update discovered objects via the API. It's a global issue and will be fixed under ZBX-6386 . CLOSED. Toms CLOSED
        Hide
        Toms added a comment - - edited

        (55) With {"jsonrpc":"2.0","method":"hostprototype.get","params":

        {"selectGroupPrototypes":"extend"}

        ,"id":12,"auth":"xxx"}

        I have prototypes like:

        {
         "hostid": "10092",
         "groupPrototypes": [
          {
           "group_prototypeid": "2",
           "hostid": "10092",
           "name": "",
           "groupid": "4",
           "templateid": "0"
          }
         ]
        }
        

        This host prototype has no group prototypes!
        Note the empty name.

        Pavels Jelisejevs We've changed the API so that host prototype groups would be separated from the linked groups. The linked groups are now accessible in the "groupLinks" property. RESOLVED.

        Toms CLOSED

        Show
        Toms added a comment - - edited (55) With {"jsonrpc":"2.0","method":"hostprototype.get","params": {"selectGroupPrototypes":"extend"} ,"id":12,"auth":"xxx"} I have prototypes like: { "hostid" : "10092" , "groupPrototypes" : [ { "group_prototypeid" : "2" , "hostid" : "10092" , "name" : "", "groupid" : "4" , "templateid" : "0" } ] } This host prototype has no group prototypes! Note the empty name. Pavels Jelisejevs We've changed the API so that host prototype groups would be separated from the linked groups. The linked groups are now accessible in the "groupLinks" property. RESOLVED. Toms CLOSED
        Hide
        Toms added a comment - - edited

        (56) hostprototype.update
        with:

        {
            "hostid": 10092,
            "inventory": {
                "alias": "asd"
            },
            "inventory_mode": -1
        }
        

        gives: "Wrong fields for host prototype" error.
        While

        {
            "hostid": 10092,
            "inventory": {
                "alias": "asd"
            }
        }
        

        enables host inventory.

        Pavels Jelisejevs RESOLVED in r35760. The inventory_mode parameter for hosts is deprecated and will be removed ZBX-6033, so it's not implemented in host prototypes.

        Toms CLOSED

        Show
        Toms added a comment - - edited (56) hostprototype.update with: { "hostid" : 10092, "inventory" : { "alias" : "asd" }, "inventory_mode" : -1 } gives: "Wrong fields for host prototype" error. While { "hostid" : 10092, "inventory" : { "alias" : "asd" } } enables host inventory. Pavels Jelisejevs RESOLVED in r35760. The inventory_mode parameter for hosts is deprecated and will be removed ZBX-6033 , so it's not implemented in host prototypes. Toms CLOSED
        Hide
        Toms added a comment - - edited

        (57) regarding naming:
        In host.get API now we have "selectDiscoveryRule" and "selectDiscoveries" which gives us "discoveryRule" and "discoveries" arrays in response. The names doesn't give much information what is what, but in general they are the same objects, so the naming should contain something that gives us a hint on relation between host and discovery rule.

        Pavels Jelisejevs The "selectDiscoveryRule" parameter has been implemented similary to other APIs. We should rename them all to something like "selectParentDiscoveryRule", but in a different ZBX; this one has to many changes already.

        Toms CLOSED

        Show
        Toms added a comment - - edited (57) regarding naming: In host.get API now we have "selectDiscoveryRule" and "selectDiscoveries" which gives us "discoveryRule" and "discoveries" arrays in response. The names doesn't give much information what is what, but in general they are the same objects, so the naming should contain something that gives us a hint on relation between host and discovery rule. Pavels Jelisejevs The "selectDiscoveryRule" parameter has been implemented similary to other APIs. We should rename them all to something like "selectParentDiscoveryRule", but in a different ZBX; this one has to many changes already. Toms CLOSED
        Hide
        Toms added a comment - - edited

        (58) with:
        {"jsonrpc":"2.0","method":"host.get","params":

        {"selectDiscoveryRule":"extend"}

        ,"id":12,"auth":"1ed93ca48a200d8ec94336f278d5e811"}

        we get

        {
           "hostid": "10084",
           "discoveryRule": []
        }
        

        for host which is not discovered. I think that field "discoveryRule" shouldn't appear at all for those hosts.

        Pavels Jelisejevs We always return all of the requested properties in the result even if it's not supported for the current object.

        Toms CLOSED

        Show
        Toms added a comment - - edited (58) with: {"jsonrpc":"2.0","method":"host.get","params": {"selectDiscoveryRule":"extend"} ,"id":12,"auth":"1ed93ca48a200d8ec94336f278d5e811"} we get { "hostid" : "10084" , "discoveryRule" : [] } for host which is not discovered. I think that field "discoveryRule" shouldn't appear at all for those hosts. Pavels Jelisejevs We always return all of the requested properties in the result even if it's not supported for the current object. Toms CLOSED
        Hide
        Toms added a comment - - edited

        (59) same as (58) but for "selectHostDiscovery"

        Pavels Jelisejevs See (58). CLOSED.

        Toms CLOSED

        Show
        Toms added a comment - - edited (59) same as (58) but for "selectHostDiscovery" Pavels Jelisejevs See (58). CLOSED. Toms CLOSED
        Hide
        Toms added a comment - - edited

        (60) [S] Should be considered if it is OK to delete host group if it has discovered hosts in it, but the group it self is removed from host prototype.

        Alexander Vladishev It's a normal behavior. CLOSED

        Show
        Toms added a comment - - edited (60) [S] Should be considered if it is OK to delete host group if it has discovered hosts in it, but the group it self is removed from host prototype. Alexander Vladishev It's a normal behavior. CLOSED
        Hide
        Toms added a comment - - edited

        (61) CHostGroup.php line:579 "'nopermissions' => ($nopermissions) ? true : null"
        as we discussed it is OK with false instead of null.

        Pavels Jelisejevs RESOLVED in r35708.

        Toms CLOSED

        Show
        Toms added a comment - - edited (61) CHostGroup.php line:579 "'nopermissions' => ($nopermissions) ? true : null" as we discussed it is OK with false instead of null. Pavels Jelisejevs RESOLVED in r35708. Toms CLOSED
        Hide
        Toms added a comment - - edited

        (62) CHostGroup.php line:595 "' WHERE '.dbConditionInt('groupid', $groupids),"
        $groupids should be sorted for use in dbConditionInt() function.

        + in addRelatedObjects() method as well.

        Pavels Jelisejevs RESOLVED in r35724.

        Toms CLOSED

        Show
        Toms added a comment - - edited (62) CHostGroup.php line:595 "' WHERE '.dbConditionInt('groupid', $groupids)," $groupids should be sorted for use in dbConditionInt() function. + in addRelatedObjects() method as well. Pavels Jelisejevs RESOLVED in r35724. Toms CLOSED
        Hide
        Kodai Terashima added a comment - - edited

        (63) Zabbix server always crashes when try to get vmware.host.uptime

         29194:20130430:163505.552 In get_vmware_hoststat()
         29194:20130430:163505.552 In authenticate() url:'https://192.168.74.50/sdk' username:'root'
         29194:20130430:163505.752 End of authenticate()
         29194:20130430:163505.752 In get_hostdata()
         29194:20130430:163505.877 End of get_vmware_hoststat()
         29194:20130430:163505.877 End of get_value_simple():unknown
         29194:20130430:163505.877 Item [vSphere 5.1:virt.vmware.host.uptime["{$URL}","{$LOGIN_NAME}","{$LOGIN_PASSWORD}"]] error: ZBX_NOTSUPPORTED
         29194:20130430:163505.877 End of get_value():unknown
        zabbix_server [29194]: unknown response code returned: 1
        zabbix_server: poller.c:703: get_values: Assertion `0' failed.
         29190:20130430:163505.878 One child process died (PID:29194,exitcode/signal:6). Exiting ...
         29190:20130430:163505.878 zbx_on_exit() called
         29191:20130430:163505.878 Got signal [signal:15(SIGTERM),sender_pid:29190,sender_uid:1001,reason:0]. Exiting ...
         29192:20130430:163505.878 Got signal [signal:15(SIGTERM),sender_pid:29190,sender_uid:1001,reason:0]. Exiting ...
         29193:20130430:163505.879 Got signal [signal:15(SIGTERM),sender_pid:29190,sender_uid:1001,reason:0]. Exiting ...
         29195:20130430:163505.879 Got signal [signal:15(SIGTERM),sender_pid:29190,sender_uid:1001,reason:0]. Exiting ...
         29196:20130430:163505.880 Got signal [signal:15(SIGTERM),sender_pid:29190,sender_uid:1001,reason:0]. Exiting ...
        ...
        

        Alexander Vladishev RESOLVED in r36220.

        CLOSED

        Show
        Kodai Terashima added a comment - - edited (63) Zabbix server always crashes when try to get vmware.host.uptime 29194:20130430:163505.552 In get_vmware_hoststat() 29194:20130430:163505.552 In authenticate() url:'https://192.168.74.50/sdk' username:'root' 29194:20130430:163505.752 End of authenticate() 29194:20130430:163505.752 In get_hostdata() 29194:20130430:163505.877 End of get_vmware_hoststat() 29194:20130430:163505.877 End of get_value_simple():unknown 29194:20130430:163505.877 Item [vSphere 5.1:virt.vmware.host.uptime["{$URL}","{$LOGIN_NAME}","{$LOGIN_PASSWORD}"]] error: ZBX_NOTSUPPORTED 29194:20130430:163505.877 End of get_value():unknown zabbix_server [29194]: unknown response code returned: 1 zabbix_server: poller.c:703: get_values: Assertion `0' failed. 29190:20130430:163505.878 One child process died (PID:29194,exitcode/signal:6). Exiting ... 29190:20130430:163505.878 zbx_on_exit() called 29191:20130430:163505.878 Got signal [signal:15(SIGTERM),sender_pid:29190,sender_uid:1001,reason:0]. Exiting ... 29192:20130430:163505.878 Got signal [signal:15(SIGTERM),sender_pid:29190,sender_uid:1001,reason:0]. Exiting ... 29193:20130430:163505.879 Got signal [signal:15(SIGTERM),sender_pid:29190,sender_uid:1001,reason:0]. Exiting ... 29195:20130430:163505.879 Got signal [signal:15(SIGTERM),sender_pid:29190,sender_uid:1001,reason:0]. Exiting ... 29196:20130430:163505.880 Got signal [signal:15(SIGTERM),sender_pid:29190,sender_uid:1001,reason:0]. Exiting ... ... Alexander Vladishev RESOLVED in r36220. CLOSED
        Hide
        Toms added a comment - - edited

        (64) in CHostPrototype.php from line:111 'maxLength' hardcoded as '64' should be used value from DB schema, or if it left hardcoded then only one message should be left in lines: 115 and 116

        'Host name "%1$s" is too long, it must have less then %2$d character.',
        'Host name "%1$s" is too long, it must have less then %2$d characters.'
        

        Pavels Jelisejevs RESOLVED in r35725. I left it hardcoded for now to avoid unnecessary complexity for now.

        Toms CLOSED

        Show
        Toms added a comment - - edited (64) in CHostPrototype.php from line:111 'maxLength' hardcoded as '64' should be used value from DB schema, or if it left hardcoded then only one message should be left in lines: 115 and 116 'Host name "%1$s" is too long , it must have less then %2$d character.', 'Host name "%1$s" is too long , it must have less then %2$d characters.' Pavels Jelisejevs RESOLVED in r35725. I left it hardcoded for now to avoid unnecessary complexity for now. Toms CLOSED
        Hide
        Toms added a comment - - edited

        (65) Duplicate validation code in validateUpdate and validateCreate in CHostPrototype.php

        Pavels Jelisejevs RESOLVED in r35726.

        Toms CLOSED

        Show
        Toms added a comment - - edited (65) Duplicate validation code in validateUpdate and validateCreate in CHostPrototype.php Pavels Jelisejevs RESOLVED in r35726. Toms CLOSED
        Hide
        Toms added a comment - - edited

        (66) [S]
        Server unable to discover host with following command:
        bin/zabbix_sender -z 192.168.3.4 -s "h2" -k dr -p 20051 -vv -o '{"data":[{"

        {#VMID}

        ":"vm_2","

        {#VMNAME}

        ":"

        {ABA}

        "}]}'

        Note curly braces in VMNAME

        Curly braces should be OK in visible name.

        Alexander Vladishev Cannot reproduce.

        Show
        Toms added a comment - - edited (66) [S] Server unable to discover host with following command: bin/zabbix_sender -z 192.168.3.4 -s "h2" -k dr -p 20051 -vv -o '{"data":[{" {#VMID} ":"vm_2"," {#VMNAME} ":" {ABA} "}]}' Note curly braces in VMNAME Curly braces should be OK in visible name. Alexander Vladishev Cannot reproduce.
        Hide
        Toms added a comment - - edited

        (67) Incorrect message for host prototype length validation. It states that less than 64 characters should be present, but it is possible to save 64 characters.

        Pavels Jelisejevs RESOLVED in r35725.

        Toms CLOSED

        Show
        Toms added a comment - - edited (67) Incorrect message for host prototype length validation. It states that less than 64 characters should be present, but it is possible to save 64 characters. Pavels Jelisejevs RESOLVED in r35725. Toms CLOSED
        Hide
        Toms added a comment - - edited

        (68) When creating host prototype via API and setting name as empty string:

        'name' => new CStringValidator(array(
           'messageEmpty' => _('Empty name for host prototype "%1$s".')
        ))
        

        is not raised.

        Pavels Jelisejevs That's because an empty visible name defaults to a host name. I've left the validation check so that an error message is displayed in case something goes wrong and the host name won't be used as default.

        Toms This should be then commented

        Pavels Jelisejevs RESOLVED in r35901.

        Toms CLOSED

        Show
        Toms added a comment - - edited (68) When creating host prototype via API and setting name as empty string: 'name' => new CStringValidator(array( 'messageEmpty' => _('Empty name for host prototype "%1$s" .') )) is not raised. Pavels Jelisejevs That's because an empty visible name defaults to a host name. I've left the validation check so that an error message is displayed in case something goes wrong and the host name won't be used as default. Toms This should be then commented Pavels Jelisejevs RESOLVED in r35901. Toms CLOSED
        Hide
        Toms added a comment - - edited

        (69) When creating host prototype without "ruleid"
        "Wrong fields for host prototype ..." is raised instead of "No discovery rule ID given for host prototype ..."

        Pavels Jelisejevs RESOLVED in r35732.

        Toms CLOSED

        Show
        Toms added a comment - - edited (69) When creating host prototype without "ruleid" "Wrong fields for host prototype ..." is raised instead of "No discovery rule ID given for host prototype ..." Pavels Jelisejevs RESOLVED in r35732. Toms CLOSED
        Hide
        Toms added a comment - - edited

        (70) leading spaces are not removed from host prototype "host" field, when creating it via API

        Pavels Jelisejevs We don't trim values in the API.

        Toms This way we can create several host prototypes which we are unable to edit afterwards in frontend, because after trimming in frontend they have the same 'host'.

        Pavels Jelisejevs Hm, right. But that's a global API issue, it should be fixed under a separate ZBX.

        Toms Would be nice to see ZBX number here

        Pavels Jelisejevs Done - ZBX-6833. CLOSED.

        Show
        Toms added a comment - - edited (70) leading spaces are not removed from host prototype "host" field, when creating it via API Pavels Jelisejevs We don't trim values in the API. Toms This way we can create several host prototypes which we are unable to edit afterwards in frontend, because after trimming in frontend they have the same 'host'. Pavels Jelisejevs Hm, right. But that's a global API issue, it should be fixed under a separate ZBX. Toms Would be nice to see ZBX number here Pavels Jelisejevs Done - ZBX-6833 . CLOSED.
        Hide
        Toms added a comment - - edited

        (71) CHostPrototype line:184

        if (isset($groupPrototype['groupid']) && $groupPrototype['groupid']) {
           $groupPrototypeGroupIds[] = $groupPrototype['groupid'];
        }
        

        This should be done in previous loop structure, to not unnecessary loop through arrays.

        + $groupPrototypeGroupIds array contains duplicates.

        Pavels Jelisejevs RESOLVED in r35733.

        Toms CLOSED

        Show
        Toms added a comment - - edited (71) CHostPrototype line:184 if (isset($groupPrototype['groupid']) && $groupPrototype['groupid']) { $groupPrototypeGroupIds[] = $groupPrototype['groupid']; } This should be done in previous loop structure, to not unnecessary loop through arrays. + $groupPrototypeGroupIds array contains duplicates. Pavels Jelisejevs RESOLVED in r35733. Toms CLOSED
        Hide
        Toms added a comment - - edited

        (72) lot of inserts when mass deleting several host prototypes, see auditlog.png

        Pavels Jelisejevs That's because when we delete a host prototype we also delete all of the discovered hosts and create an audit entry for each item, trigger etc. We won't optimize the audit log in this issue.

        Toms CLOSED. But new ZBX would be nice to have and linked here in those cases when we postpone the problem.

        Show
        Toms added a comment - - edited (72) lot of inserts when mass deleting several host prototypes, see auditlog.png Pavels Jelisejevs That's because when we delete a host prototype we also delete all of the discovered hosts and create an audit entry for each item, trigger etc. We won't optimize the audit log in this issue. Toms CLOSED. But new ZBX would be nice to have and linked here in those cases when we postpone the problem.
        Hide
        Toms added a comment - - edited

        (73) CHostPrototype createReal() method executes queries in a loop:

        $hostPrototypes[$key]['groupPrototypes'] = DB::save('group_prototype', $hostPrototype['groupPrototypes']);
        

        Bulk insert should be used.

        Pavels Jelisejevs RESOLVED in r35739.

        Toms CLOSED

        Show
        Toms added a comment - - edited (73) CHostPrototype createReal() method executes queries in a loop: $hostPrototypes[$key]['groupPrototypes'] = DB::save('group_prototype', $hostPrototype['groupPrototypes']); Bulk insert should be used. Pavels Jelisejevs RESOLVED in r35739. Toms CLOSED
        Hide
        Toms added a comment - - edited

        (74) duplicate $groupIds in CConfigurationExport.php line:573

        Pavels Jelisejevs RESOLVED in r35740.

        Toms CLOSED

        Show
        Toms added a comment - - edited (74) duplicate $groupIds in CConfigurationExport.php line:573 Pavels Jelisejevs RESOLVED in r35740. Toms CLOSED
        Hide
        Toms added a comment - - edited

        (75) 'use strict'; left in configuration.host.prototye.edit.js.php

        Pavels Jelisejevs RESOLVED in r35741.

        Toms CLOSED

        Show
        Toms added a comment - - edited (75) 'use strict'; left in configuration.host.prototye.edit.js.php Pavels Jelisejevs RESOLVED in r35741. Toms CLOSED
        Hide
        Toms added a comment - - edited

        (76) Couldn't find the usage of group caount:
        "e.data('group-prototype-count', e.data('group-prototype-count') + 1);"
        in configuration.host.prototye.edit.js.php

        Pavels Jelisejevs It is used in the group prototype template in the #

        {i}

        placeholder.

        Toms CLOSED. Was refactored not actual anymore.

        Show
        Toms added a comment - - edited (76) Couldn't find the usage of group caount: "e.data('group-prototype-count', e.data('group-prototype-count') + 1);" in configuration.host.prototye.edit.js.php Pavels Jelisejevs It is used in the group prototype template in the # {i} placeholder. Toms CLOSED. Was refactored not actual anymore.
        Hide
        Toms added a comment - - edited

        (77) Duplicated functionality for host prototype group editing:
        both in server side and in client side fields for group prototypes are generated.
        I think only in client side fields should be generated.
        Server should only provide JSON data from DB.

        Pavels Jelisejevs RESOLVED in r35748.

        Toms CLOSED

        Show
        Toms added a comment - - edited (77) Duplicated functionality for host prototype group editing: both in server side and in client side fields for group prototypes are generated. I think only in client side fields should be generated. Server should only provide JSON data from DB. Pavels Jelisejevs RESOLVED in r35748. Toms CLOSED
        Hide
        Toms added a comment - - edited

        Review my changes in 35687

        Pavels Jelisejevs Everything OK, thanks.

        Show
        Toms added a comment - - edited Review my changes in 35687 Pavels Jelisejevs Everything OK, thanks.
        Hide
        Kodai Terashima added a comment - - edited

        (78)

        File name is too long error happens during make dist on debian 6.

        tardir=zabbix-2.1.0 && /bin/bash /root/ZBXNEXT-1633/missing --run tar chof - "$tardir" | GZIP=--best gzip -c >zabbix-2.1.0.tar.gz
        tar: zabbix-2.1.0/frontends/php/include/classes/validators/hostgroup/CHostGroupNotDiscoveredValidator.php: file name is too long (max 99); not dumped
        tar: zabbix-2.1.0/frontends/php/include/classes/validators/hostprototype/CGroupPrototypeCollectionValidator.php: file name is too long (max 99); not dumped
        tar: Exiting with failure status due to previous errors
        { test ! -d "zabbix-2.1.0" || { find "zabbix-2.1.0" -type d ! -perm -200 -exec chmod u+w {} ';' && rm -fr "zabbix-2.1.0"; }; }
        

        Pavels Jelisejevs RESOLVED in r35750.

        Pavels Jelisejevs According to Kodai, the problem has been solved. CLOSED.

        Show
        Kodai Terashima added a comment - - edited (78) File name is too long error happens during make dist on debian 6. tardir=zabbix-2.1.0 && /bin/bash /root/ZBXNEXT-1633/missing --run tar chof - "$tardir" | GZIP=--best gzip -c >zabbix-2.1.0.tar.gz tar: zabbix-2.1.0/frontends/php/include/classes/validators/hostgroup/CHostGroupNotDiscoveredValidator.php: file name is too long (max 99); not dumped tar: zabbix-2.1.0/frontends/php/include/classes/validators/hostprototype/CGroupPrototypeCollectionValidator.php: file name is too long (max 99); not dumped tar: Exiting with failure status due to previous errors { test ! -d "zabbix-2.1.0" || { find "zabbix-2.1.0" -type d ! -perm -200 -exec chmod u+w {} ';' && rm -fr "zabbix-2.1.0"; }; } Pavels Jelisejevs RESOLVED in r35750. Pavels Jelisejevs According to Kodai, the problem has been solved. CLOSED.
        Hide
        Toms added a comment - - edited

        (79) If several groups are added for host prototype, they are not stored.

        looks like it happens on update as well with one group

        Pavels Jelisejevs RESOLVED in r35887.

        Toms CLOSED

        Show
        Toms added a comment - - edited (79) If several groups are added for host prototype, they are not stored. looks like it happens on update as well with one group Pavels Jelisejevs RESOLVED in r35887. Toms CLOSED
        Hide
        Toms added a comment - - edited

        (80) When creating new host prototype, if it fails for some reasons, selected inventory mode is set to disabled.

        Pavels Jelisejevs RESOLVED in r35893.

        Toms CLOSED

        Show
        Toms added a comment - - edited (80) When creating new host prototype, if it fails for some reasons, selected inventory mode is set to disabled. Pavels Jelisejevs RESOLVED in r35893. Toms CLOSED
        Hide
        Toms added a comment - - edited

        (81) CDiscoveryRule.php lines:398-406

        $hostPrototypeIds = array();
        $dbItems = DBselect(
        	'SELECT hd.hostid'.
        	' FROM host_discovery hd'.
        	' WHERE '.dbConditionInt('hd.parent_itemid', $ruleids)
        );
        while ($item = DBfetch($dbItems)) {
        	$hostPrototypeIds[] = $item['hostid'];
        }
        

        DBfetchColumn() should be used.

        Pavels Jelisejevs RESOLVED in r35897.

        Toms CLOSED

        Show
        Toms added a comment - - edited (81) CDiscoveryRule.php lines:398-406 $hostPrototypeIds = array(); $dbItems = DBselect( 'SELECT hd.hostid'. ' FROM host_discovery hd'. ' WHERE '.dbConditionInt('hd.parent_itemid', $ruleids) ); while ($item = DBfetch($dbItems)) { $hostPrototypeIds[] = $item['hostid']; } DBfetchColumn() should be used. Pavels Jelisejevs RESOLVED in r35897. Toms CLOSED
        Hide
        Toms added a comment - - edited

        (82) CDiscoveryRule.php copyHostPrototypes() lines:974-988
        looks like there is no templateid fields in $prototypes so unnecessary to unset them:

        unset($prototype['hostid'], $prototype['templateid'], $prototype['inventory']['hostid']);
        unset($groupLinks['group_prototypeid'], $groupLinks['templateid']);
        unset($groupPrototype['group_prototypeid'], $groupPrototype['templateid']);
        

        Pavels Jelisejevs RESOLVED in r35899.

        Toms CLOSED

        Show
        Toms added a comment - - edited (82) CDiscoveryRule.php copyHostPrototypes() lines:974-988 looks like there is no templateid fields in $prototypes so unnecessary to unset them: unset($prototype['hostid'], $prototype['templateid'], $prototype['inventory']['hostid']); unset($groupLinks['group_prototypeid'], $groupLinks['templateid']); unset($groupPrototype['group_prototypeid'], $groupPrototype['templateid']); Pavels Jelisejevs RESOLVED in r35899. Toms CLOSED
        Hide
        Kodai Terashima added a comment - - edited

        (83) Cannot enable discovery rule if the discovery rule become not supported status.
        When click "Not supported" link on LLD rule list, it become "Disabled". Also mass update "Enabled selected" doesn't affect.

        Pavels Jelisejevs That's how it's supposed to work starting from ZBXNEXT-1575.

        Pavels Jelisejevs CLOSED.

        Show
        Kodai Terashima added a comment - - edited (83) Cannot enable discovery rule if the discovery rule become not supported status. When click "Not supported" link on LLD rule list, it become "Disabled". Also mass update "Enabled selected" doesn't affect. Pavels Jelisejevs That's how it's supposed to work starting from ZBXNEXT-1575 . Pavels Jelisejevs CLOSED.
        Hide
        Toms added a comment - - edited

        (84) For group selection in host prototype form: if we select some group, then remove it, we cannot find it again with type hinting within multiselect input. We don't save host prototype in this process!

        Pavels Jelisejevs RESOLVED in r35944.

        Toms CLOSED

        Show
        Toms added a comment - - edited (84) For group selection in host prototype form: if we select some group, then remove it, we cannot find it again with type hinting within multiselect input. We don't save host prototype in this process! Pavels Jelisejevs RESOLVED in r35944. Toms CLOSED
        Hide
        Pavels Jelisejevs added a comment - - edited

        (85) [S] I've resolved a bunch of C conflicts in dbupgrade.c, db.c and db.h when updating the branch. Please review r35939.

        Alexander Vladishev CLOSED

        Show
        Pavels Jelisejevs added a comment - - edited (85) [S] I've resolved a bunch of C conflicts in dbupgrade.c, db.c and db.h when updating the branch. Please review r35939. Alexander Vladishev CLOSED
        Hide
        Pavels Jelisejevs added a comment - - edited

        (86) [S] This issue has to be taken into account when the server deletes discovered host groups - ZBX-6701

        Alexander Vladishev RESOLVED in r37627.

        Andris Zeila CLOSED

        Show
        Pavels Jelisejevs added a comment - - edited (86) [S] This issue has to be taken into account when the server deletes discovered host groups - ZBX-6701 Alexander Vladishev RESOLVED in r37627. Andris Zeila CLOSED
        Hide
        Pavels Jelisejevs added a comment - - edited

        (87) [F] The hostgroup.get monitored_hosts, real_hosts and with_hosts_and_templates must not take host prototypes into account.

        Pavels Jelisejevs My mistake, these parameters work correctly. CLOSED.

        Show
        Pavels Jelisejevs added a comment - - edited (87) [F] The hostgroup.get monitored_hosts, real_hosts and with_hosts_and_templates must not take host prototypes into account. Pavels Jelisejevs My mistake, these parameters work correctly. CLOSED.
        Hide
        Pavels Jelisejevs added a comment - - edited

        (88) [F] Cannot export host:

        <br />
        <font size='1'><table class='xdebug-error' dir='ltr' border='1' cellspacing='0' cellpadding='1'>
        <tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /opt/lampp/htdocs/zabbix/trunk/frontends/php/include/classes/export/CConfigurationExportBuilder.php on line <i>290</i></th></tr>
        <tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr>
        <tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr>
        <tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0033</td><td bgcolor='#eeeeec' align='right'>703900</td><td bgcolor='#eeeeec'>{main}(  )</td><td title='/opt/lampp/htdocs/zabbix/trunk/frontends/php/hosts.php' bgcolor='#eeeeec'>../hosts.php<b>:</b>0</td></tr>
        <tr><td bgcolor='#eeeeec' align='center'>2</td><td bgcolor='#eeeeec' align='center'>0.0858</td><td bgcolor='#eeeeec' align='right'>8593952</td><td bgcolor='#eeeeec'>CAutoloader->loadClass(  )</td><td title='/opt/lampp/htdocs/zabbix/trunk/frontends/php/hosts.php' bgcolor='#eeeeec'>../hosts.php<b>:</b>0</td></tr>
        </table></font>
        
        

        Pavels Jelisejevs RESOLVED in r37230.

        Oleg Egorov CLOSED

        Show
        Pavels Jelisejevs added a comment - - edited (88) [F] Cannot export host: <br /> <font size='1'><table class='xdebug-error' dir='ltr' border='1' cellspacing='0' cellpadding='1'> <tr><th align='left' bgcolor='#f57900' colspan= "5" ><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /opt/lampp/htdocs/zabbix/trunk/frontends/php/include/classes/export/CConfigurationExportBuilder.php on line <i>290</i></th></tr> <tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr> <tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr> <tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0033</td><td bgcolor='#eeeeec' align='right'>703900</td><td bgcolor='#eeeeec'>{main}( )</td><td title='/opt/lampp/htdocs/zabbix/trunk/frontends/php/hosts.php' bgcolor='#eeeeec'>../hosts.php<b>:</b>0</td></tr> <tr><td bgcolor='#eeeeec' align='center'>2</td><td bgcolor='#eeeeec' align='center'>0.0858</td><td bgcolor='#eeeeec' align='right'>8593952</td><td bgcolor='#eeeeec'>CAutoloader->loadClass( )</td><td title='/opt/lampp/htdocs/zabbix/trunk/frontends/php/hosts.php' bgcolor='#eeeeec'>../hosts.php<b>:</b>0</td></tr> </table></font> Pavels Jelisejevs RESOLVED in r37230. Oleg Egorov CLOSED
        Hide
        Pavels Jelisejevs added a comment - - edited

        (89) [F] Discovered host group list is displayed incorrectly.

        Pavels Jelisejevs RESOLVED in r37232.

        Oleg Egorov CLOSED

        Show
        Pavels Jelisejevs added a comment - - edited (89) [F] Discovered host group list is displayed incorrectly. Pavels Jelisejevs RESOLVED in r37232. Oleg Egorov CLOSED
        Hide
        Pavels Jelisejevs added a comment - - edited

        (90) [F] Error when mass updating a host: "Undefined variable: hostids [ in /opt/lampp/htdocs/zabbix/trunk/frontends/php/hosts.php:240]"

        Pavels Jelisejevs RESOLVED in r37233.

        Oleg Egorov CLOSED

        Show
        Pavels Jelisejevs added a comment - - edited (90) [F] Error when mass updating a host: "Undefined variable: hostids [ in /opt/lampp/htdocs/zabbix/trunk/frontends/php/hosts.php:240]" Pavels Jelisejevs RESOLVED in r37233. Oleg Egorov CLOSED
        Hide
        Pavels Jelisejevs added a comment - - edited

        (91) [F] Error when trying to edit a discovered host with disabled inventory:

            Updated status of host "vm_1"
            Inventory disabled for host "vm_1".
        

        Pavels Jelisejevs RESOLVED in r37235.

        Oleg Egorov CLOSED

        Show
        Pavels Jelisejevs added a comment - - edited (91) [F] Error when trying to edit a discovered host with disabled inventory: Updated status of host "vm_1" Inventory disabled for host "vm_1" . Pavels Jelisejevs RESOLVED in r37235. Oleg Egorov CLOSED
        Hide
        Pavels Jelisejevs added a comment - - edited

        (92) [S] I've created a host prototype linked to template "Template OS Linux" and discovered a bunch of host. Then I've cloned the template and link the prototype to the clone. When I re-discover the hosts, the original template is unlinked from the hosts but the clone is not linked.

        Alexander Vladishev RESOLVED in r37636.

        Pavels Jelisejevs Works fine now.

        Andris Zeila reviewed, CLOSED

        Show
        Pavels Jelisejevs added a comment - - edited (92) [S] I've created a host prototype linked to template "Template OS Linux" and discovered a bunch of host. Then I've cloned the template and link the prototype to the clone. When I re-discover the hosts, the original template is unlinked from the hosts but the clone is not linked. Alexander Vladishev RESOLVED in r37636. Pavels Jelisejevs Works fine now. Andris Zeila reviewed, CLOSED
        Hide
        Oleg Egorov added a comment - - edited

        (93) [F] Monitoring->Dashboard->Web monitoring

        Fatal error: Class 'Manager' not found in /var/www/oleg/ZBXNEXT-1633/frontends/php/include/blocks.inc.php on line 1063

        Pavels Jelisejevs RESOLVED in r37378.

        Oleg Egorov CLOSED

        Show
        Oleg Egorov added a comment - - edited (93) [F] Monitoring->Dashboard->Web monitoring Fatal error: Class 'Manager' not found in /var/www/oleg/ ZBXNEXT-1633 /frontends/php/include/blocks.inc.php on line 1063 Pavels Jelisejevs RESOLVED in r37378. Oleg Egorov CLOSED
        Hide
        Oleg Egorov added a comment - - edited

        (94) [F] Monitoring->Latest data

        Fatal error: Class 'Manager' not found in /var/www/oleg/ZBXNEXT-1633/frontends/php/latest.php on line 273

        Pavels Jelisejevs RESOLVED in r37378.

        Oleg Egorov CLOSED

        Show
        Oleg Egorov added a comment - - edited (94) [F] Monitoring->Latest data Fatal error: Class 'Manager' not found in /var/www/oleg/ ZBXNEXT-1633 /frontends/php/latest.php on line 273 Pavels Jelisejevs RESOLVED in r37378. Oleg Egorov CLOSED
        Hide
        Oleg Egorov added a comment - - edited

        (95) [F] Monitoring->Maps
        Fatal error: Uncaught exception 'Exception' with message 'File provided to a view does not exist. Tried to find "include/views/configuration.sysmap.list.php".' in /var/www/oleg/ZBXNEXT-1633/frontends/php/include/classes/class.cview.php:68 Stack trace: #0 /var/www/oleg/ZBXNEXT-1633/frontends/php/include/classes/class.cview.php(56): CView->assign('configuration.s...') #1 /var/www/oleg/ZBXNEXT-1633/frontends/php/sysmaps.php(297): CView->__construct('configuration.s...', Array) #2

        {main}

        thrown in /var/www/oleg/ZBXNEXT-1633/frontends/php/include/classes/class.cview.php on line 68

        Pavels Jelisejevs RESOLVED in r37387.

        Oleg Egorov CLOSED

        Show
        Oleg Egorov added a comment - - edited (95) [F] Monitoring->Maps Fatal error: Uncaught exception 'Exception' with message 'File provided to a view does not exist. Tried to find "include/views/configuration.sysmap.list.php".' in /var/www/oleg/ ZBXNEXT-1633 /frontends/php/include/classes/class.cview.php:68 Stack trace: #0 /var/www/oleg/ ZBXNEXT-1633 /frontends/php/include/classes/class.cview.php(56): CView->assign('configuration.s...') #1 /var/www/oleg/ ZBXNEXT-1633 /frontends/php/sysmaps.php(297): CView->__construct('configuration.s...', Array) #2 {main} thrown in /var/www/oleg/ ZBXNEXT-1633 /frontends/php/include/classes/class.cview.php on line 68 Pavels Jelisejevs RESOLVED in r37387. Oleg Egorov CLOSED
        Hide
        Pavels Jelisejevs added a comment - - edited

        (96) I've updated the branch to the latest trunk in r37387. There have been a lot of conflicts in data.tmpl, please review.

        Oleg Egorov CLOSED

        Show
        Pavels Jelisejevs added a comment - - edited (96) I've updated the branch to the latest trunk in r37387. There have been a lot of conflicts in data.tmpl, please review. Oleg Egorov CLOSED
        Hide
        Alexander Vladishev added a comment - - edited

        (97) [F] error occurred when updating a discovery rule:

        reset() expects parameter 1 to be array, null given [host_discovery.php:331 → reset() in frontends/php/host_discovery.php:331]
        

        Pavels Jelisejevs Looks like (8) from ZBX-6275. Will be fixed there. CLOSED.

        Show
        Alexander Vladishev added a comment - - edited (97) [F] error occurred when updating a discovery rule: reset() expects parameter 1 to be array, null given [host_discovery.php:331 → reset() in frontends/php/host_discovery.php:331] Pavels Jelisejevs Looks like (8) from ZBX-6275 . Will be fixed there. CLOSED.
        Hide
        Alexander Vladishev added a comment - - edited

        (98) [F] Cannot link a template to the host prototype.

        "ERROR: Zabbix has received an incorrect request." has occurred in popup window.

        Pavels Jelisejevs RESOLVED in r37675.

        Oleg Egorov Link templates

        template-hypervisor
        Template App Agentless
        Template App MySQL

        Then select in "Link new templates" new template "Template App Zabbix Agent" (AND DON'T PRESS ADD)

        -> Save

        Linked templates:
        template-hypervisor
        Template App Agentless
        Template App MySQL
        Template App Zabbix Agent

        It's happening only if exist error after form validation

        In this situation:
        Template "Template App Agentless" with item key "icmppingsec" already linked to host.

        REOPEN

        Pavels Jelisejevs RESOLVED in r38059.

        Oleg Egorov CLOSED

        Show
        Alexander Vladishev added a comment - - edited (98) [F] Cannot link a template to the host prototype. "ERROR: Zabbix has received an incorrect request." has occurred in popup window. Pavels Jelisejevs RESOLVED in r37675. Oleg Egorov Link templates template-hypervisor Template App Agentless Template App MySQL Then select in "Link new templates" new template "Template App Zabbix Agent" (AND DON'T PRESS ADD) -> Save Linked templates: template-hypervisor Template App Agentless Template App MySQL Template App Zabbix Agent It's happening only if exist error after form validation In this situation: Template "Template App Agentless" with item key "icmppingsec" already linked to host. REOPEN Pavels Jelisejevs RESOLVED in r38059. Oleg Egorov CLOSED
        Hide
        Pavels Jelisejevs added a comment - - edited

        (99) [F] No error message is displayed if we pass a non-array value to an array parameter in hostprototype.create and hostprototype.update. For example:

        {
            "jsonrpc": "2.0",
            "method": "hostprototype.update",
            "params": {
                "hostid": 10093,
                "groupLinks": "dd"
            },
            "id": 2,
            "auth": "98edc2fc35a2cdcf664158eaae0afbe1"
        }
        

        Pavels Jelisejevs Fixed this and several other issues in r37684. RESOLVED.

        Oleg Egorov CLOSED

        Show
        Pavels Jelisejevs added a comment - - edited (99) [F] No error message is displayed if we pass a non-array value to an array parameter in hostprototype.create and hostprototype.update. For example: { "jsonrpc" : "2.0" , "method" : "hostprototype.update" , "params" : { "hostid" : 10093, "groupLinks" : "dd" }, "id" : 2, "auth" : "98edc2fc35a2cdcf664158eaae0afbe1" } Pavels Jelisejevs Fixed this and several other issues in r37684. RESOLVED. Oleg Egorov CLOSED
        Hide
        Andris Zeila added a comment - - edited

        (100) Replaced vmkeys and vmchecks arrays with a single array containing keys and checks. Please review r37674

        Alexander Vladishev Great! CLSOED

        Show
        Andris Zeila added a comment - - edited (100) Replaced vmkeys and vmchecks arrays with a single array containing keys and checks. Please review r37674 Alexander Vladishev Great! CLSOED
        Hide
        Pavels Jelisejevs added a comment - - edited

        (101) [F] The fixes from ZBX-6663 must implemented in host prototype lists.

        Pavels Jelisejevs RESOLVED in r37687.

        Oleg Egorov CLOSED

        Show
        Pavels Jelisejevs added a comment - - edited (101) [F] The fixes from ZBX-6663 must implemented in host prototype lists. Pavels Jelisejevs RESOLVED in r37687. Oleg Egorov CLOSED
        Hide
        Pavels Jelisejevs added a comment - - edited

        (102) [F] Implement changes from ZBX-6386 for host prototypes.

        Pavels Jelisejevs RESOLVED in r37896-37919. I've also made changes to the old validation code, please test and review them too.

        Oleg Egorov CLOSED

        Show
        Pavels Jelisejevs added a comment - - edited (102) [F] Implement changes from ZBX-6386 for host prototypes. Pavels Jelisejevs RESOLVED in r37896-37919. I've also made changes to the old validation code, please test and review them too. Oleg Egorov CLOSED
        Hide
        Pavels Jelisejevs added a comment - - edited

        (103) [F] Error when creating a new host prototype:

            Illegal string offset 'groupid' [ in /opt/lampp/htdocs/zabbix/trunk/frontends/php/host_prototypes.php:187]
            Created: Host prototype "{#VMID}" on "hypervisor".
        

        Pavels Jelisejevs RESOLVED in r37879.

        Oleg Egorov CLOSED

        Show
        Pavels Jelisejevs added a comment - - edited (103) [F] Error when creating a new host prototype: Illegal string offset 'groupid' [ in /opt/lampp/htdocs/zabbix/trunk/frontends/php/host_prototypes.php:187] Created: Host prototype "{#VMID}" on "hypervisor" . Pavels Jelisejevs RESOLVED in r37879. Oleg Egorov CLOSED
        Hide
        Pavels Jelisejevs added a comment - - edited

        (104) [F] The following API request deletes all groups from a host prototype:

        {
            "jsonrpc": "2.0",
            "method": "hostprototype.update",
            "params": {
                "hostid": 10093,
                "groupPrototypes": [
                    {
                        "name": "{#VMID3}"
                    }
                ]
            },
            "id": 9,
            "auth": "b15e82038967ab16ec9c121ad1851090"
        }
        

        Pavels Jelisejevs RESOLVED in r37926 and r37928.

        Oleg Egorov CLOSED

        Show
        Pavels Jelisejevs added a comment - - edited (104) [F] The following API request deletes all groups from a host prototype: { "jsonrpc" : "2.0" , "method" : "hostprototype.update" , "params" : { "hostid" : 10093, "groupPrototypes" : [ { "name" : "{#VMID3}" } ] }, "id" : 9, "auth" : "b15e82038967ab16ec9c121ad1851090" } Pavels Jelisejevs RESOLVED in r37926 and r37928. Oleg Egorov CLOSED
        Hide
        Pavels Jelisejevs added a comment - - edited

        (105) [S] Trigger discovery does not work.

        Andris Zeila I think that was fixed in ZBX-6981. It's working now, so CLOSED

        Show
        Pavels Jelisejevs added a comment - - edited (105) [S] Trigger discovery does not work. Andris Zeila I think that was fixed in ZBX-6981 . It's working now, so CLOSED
        Hide
        Pavels Jelisejevs added a comment - - edited

        (106) [F] In the host prototype configuration form the border of SNMP interface section is off.

        Pavels Jelisejevs RESOLVED in r37930.

        Oleg Egorov CLOSED

        Show
        Pavels Jelisejevs added a comment - - edited (106) [F] In the host prototype configuration form the border of SNMP interface section is off. Pavels Jelisejevs RESOLVED in r37930. Oleg Egorov CLOSED
        Hide
        Pavels Jelisejevs added a comment - - edited

        (107) [F] hostprototype.update must not accept the "ruleid" parameter.

        Pavels Jelisejevs RESOVLED in r37929.

        Oleg Egorov CLOSED

        Show
        Pavels Jelisejevs added a comment - - edited (107) [F] hostprototype.update must not accept the "ruleid" parameter. Pavels Jelisejevs RESOVLED in r37929. Oleg Egorov CLOSED
        Hide
        Oleg Egorov added a comment - - edited

        (108) [F] LLD Host edit page is displayed incorrectly

        See 1633.JPG

        Pavels Jelisejevs RESOLVED in r38035.

        Oleg Egorov CLOSED

        Show
        Oleg Egorov added a comment - - edited (108) [F] LLD Host edit page is displayed incorrectly See 1633.JPG Pavels Jelisejevs RESOLVED in r38035. Oleg Egorov CLOSED
        Hide
        Oleg Egorov added a comment - - edited

        (109) [F] LLD Host -> Templates

        Design is not beautiful...

        See 1633-2.JPG

        I think should be used host-> templates design (table)

        Pavels Jelisejevs RESOLVED in r38058.

        Oleg Egorov CLOSED

        Show
        Oleg Egorov added a comment - - edited (109) [F] LLD Host -> Templates Design is not beautiful... See 1633-2.JPG I think should be used host-> templates design (table) Pavels Jelisejevs RESOLVED in r38058. Oleg Egorov CLOSED
        Hide
        Andris Zeila added a comment - - edited

        (110) [S] AGENT_RESULT logs member is defined as pointer array. Defining it as a pointer vector (zbx_vector_ptr_t) would simplify its handling.

        Alexander Vladishev WON'T FIX

        AGENT_RESULT structure is declared in the module.h header file. We can't will include to it zbxalgo.h.

        CLOSED

        Show
        Andris Zeila added a comment - - edited (110) [S] AGENT_RESULT logs member is defined as pointer array. Defining it as a pointer vector (zbx_vector_ptr_t) would simplify its handling. Alexander Vladishev WON'T FIX AGENT_RESULT structure is declared in the module.h header file. We can't will include to it zbxalgo.h. CLOSED
        Hide
        Andris Zeila added a comment - - edited

        (111) [S] Move lastlogsize, mtime fields from ZBX_DC_ITEM to ZBX_DC_LOGITEM

        Alexander Vladishev Seems, it's not a good idea to move lastlogsize and mtime in ZBX_DC_LOGITEM structure. "vcenter.eventlog" item can be with any type.

        WON'T FIX

        Show
        Andris Zeila added a comment - - edited (111) [S] Move lastlogsize, mtime fields from ZBX_DC_ITEM to ZBX_DC_LOGITEM Alexander Vladishev Seems, it's not a good idea to move lastlogsize and mtime in ZBX_DC_LOGITEM structure. "vcenter.eventlog" item can be with any type. WON'T FIX
        Hide
        Andris Zeila added a comment - - edited

        (112) [S] zbx_log_value_t and zbx_log_t structures are very similar. In fact the zbx_log_value_t could be used as a member of zbx_log_t structure.

        Alexander Vladishev WON'T FIX

        Show
        Andris Zeila added a comment - - edited (112) [S] zbx_log_value_t and zbx_log_t structures are very similar. In fact the zbx_log_value_t could be used as a member of zbx_log_t structure. Alexander Vladishev WON'T FIX
        Hide
        Andris Zeila added a comment - - edited

        (113) [S] zbx_log_free() function should be renamed to zbx_log_clean() as it does not frees the log itself, only its members. Also if (112) is implemented then it might be better to pass zbx_log_value_t pointer instead of zbx_log_t pointer (and renaming it to zbx_log_value_clean()).

        Alexander Vladishev RESOLVED in r38065.

        Andris Zeila CLOSED

        Show
        Andris Zeila added a comment - - edited (113) [S] zbx_log_free() function should be renamed to zbx_log_clean() as it does not frees the log itself, only its members. Also if (112) is implemented then it might be better to pass zbx_log_value_t pointer instead of zbx_log_t pointer (and renaming it to zbx_log_value_clean()). Alexander Vladishev RESOLVED in r38065. Andris Zeila CLOSED
        Hide
        Andris Zeila added a comment - - edited

        (114) [SF] There were kstat processing changes in src/zabbix_agent/cpustat.c which seams to be unrelated to virtual machine support. Was it intentional or slipped in through broken merge?

        Alexander Vladishev RESOLVED in r38072.

        Andris Zeila reviewed the server part. There were also some frontend changes, Pavel, could you take look at it?

        Pavels Jelisejevs Everything ok, CLOSED.

        Show
        Andris Zeila added a comment - - edited (114) [SF] There were kstat processing changes in src/zabbix_agent/cpustat.c which seams to be unrelated to virtual machine support. Was it intentional or slipped in through broken merge? Alexander Vladishev RESOLVED in r38072. Andris Zeila reviewed the server part. There were also some frontend changes, Pavel, could you take look at it? Pavels Jelisejevs Everything ok, CLOSED.
        Hide
        Andris Zeila added a comment - - edited

        (115) [S] When syncing items wrong index was used for lastlogsize,mtime fields.

        Please review my changes in r38007, r38010, r38011

        Alexander Vladishev Thanks! REVIEWED

        CLOSED

        Show
        Andris Zeila added a comment - - edited (115) [S] When syncing items wrong index was used for lastlogsize,mtime fields. Please review my changes in r38007, r38010, r38011 Alexander Vladishev Thanks! REVIEWED CLOSED
        Hide
        Oleg Egorov added a comment - - edited

        (116) [F] Incorrect host prototype sorting
        See 1633-3, one host prototype is disabled, and 1633-4 if enabled it

        Fist

        {#VMNAME} element:
        Host name: {#VMNAME}

        Visible name: empty

        Second

        {#VMNAME} element
        Host name: {#VMID}
        Visible name: {#VMNAME}

        Pavels Jelisejevs The problem happened if we two host prototypes with the same name. After (117) this is no longer allowed. WONT FIX.

        Oleg Egorov CLOSED

        Show
        Oleg Egorov added a comment - - edited (116) [F] Incorrect host prototype sorting See 1633-3, one host prototype is disabled, and 1633-4 if enabled it Fist {#VMNAME} element: Host name: {#VMNAME} Visible name: empty Second {#VMNAME} element Host name: {#VMID} Visible name: {#VMNAME} Pavels Jelisejevs The problem happened if we two host prototypes with the same name. After (117) this is no longer allowed. WONT FIX. Oleg Egorov CLOSED
        Hide
        Pavels Jelisejevs added a comment - - edited

        (117) [F] Host prototype visible names should be unique in a discovery rule.

        Pavels Jelisejevs RESOLVED in r38054.

        Oleg Egorov Code duplicates in CHostPrototype.php:159-177 and 454:472

        		// check host name duplicates
        		$collectionValidator = new CCollectionValidator(array(
        			'empty' => true,
        			'uniqueField' => 'host',
        			'uniqueField2' => 'ruleid',
        			'messageDuplicate' => _('Host prototype with host name "%1$s" already exists.')
        		));
        		$this->checkValidator($hostPrototypes, $collectionValidator);
        		$this->checkExistingHostPrototypes($hostPrototypes, 'host',
        			_('Host prototype with host name "%1$s" already exists in discovery rule "%2$s".')
        		);
        
        		// check visible name duplicates
        		$collectionValidator->uniqueField = 'name';
        		$collectionValidator->messageDuplicate = _('Host prototype with visible name "%1$s" already exists.');
        		$this->checkValidator($hostPrototypes, $collectionValidator);
        		$this->checkExistingHostPrototypes($hostPrototypes, 'name',
        			_('Host prototype with visible name "%1$s" already exists in discovery rule "%2$s".')
        		)
        

        Maybe should be used function?

        REOPEN

        Pavels Jelisejevs RESOLVED in r38081.

        Oleg Egorov CLOSED

        Show
        Pavels Jelisejevs added a comment - - edited (117) [F] Host prototype visible names should be unique in a discovery rule. Pavels Jelisejevs RESOLVED in r38054. Oleg Egorov Code duplicates in CHostPrototype.php:159-177 and 454:472 // check host name duplicates $collectionValidator = new CCollectionValidator(array( 'empty' => true , 'uniqueField' => 'host', 'uniqueField2' => 'ruleid', 'messageDuplicate' => _('Host prototype with host name "%1$s" already exists.') )); $ this ->checkValidator($hostPrototypes, $collectionValidator); $ this ->checkExistingHostPrototypes($hostPrototypes, 'host', _('Host prototype with host name "%1$s" already exists in discovery rule "%2$s" .') ); // check visible name duplicates $collectionValidator->uniqueField = 'name'; $collectionValidator->messageDuplicate = _('Host prototype with visible name "%1$s" already exists.'); $ this ->checkValidator($hostPrototypes, $collectionValidator); $ this ->checkExistingHostPrototypes($hostPrototypes, 'name', _('Host prototype with visible name "%1$s" already exists in discovery rule "%2$s" .') ) Maybe should be used function? REOPEN Pavels Jelisejevs RESOLVED in r38081. Oleg Egorov CLOSED
        Hide
        Andris Zeila added a comment - - edited

        (118) [S] fixed possible memory leak in interface validation. Please review my changes in r38070

        Alexander Vladishev CLOSED

        Show
        Andris Zeila added a comment - - edited (118) [S] fixed possible memory leak in interface validation. Please review my changes in r38070 Alexander Vladishev CLOSED
        Hide
        Oleg Egorov added a comment - - edited

        (119) [F] Invalid argument supplied for foreach() [ in C:\xampp\htdocs\ZBXNEXT-1633\frontends\php\host_prototypes.php:104]

        Host Prototype update

        Host name: {#3
        Visible name:

        {#}

        Press "save" -> Incorrect characters used for host "{#3".

        Press "enter" -> PHP Error

        This problem happen after "Add" button pressing in templates tab with empty input field

        Pavels Jelisejevs RESOLVED in r38082.

        Oleg Egorov CLOSED

        Show
        Oleg Egorov added a comment - - edited (119) [F] Invalid argument supplied for foreach() [ in C:\xampp\htdocs\ ZBXNEXT-1633 \frontends\php\host_prototypes.php:104] Host Prototype update Host name: {#3 Visible name: {#} Press "save" -> Incorrect characters used for host "{#3". Press "enter" -> PHP Error This problem happen after "Add" button pressing in templates tab with empty input field Pavels Jelisejevs RESOLVED in r38082. Oleg Egorov CLOSED
        Hide
        Pavels Jelisejevs added a comment - - edited

        (120) [FIS] Move the user name and password from the item keys to separate fields.

        Pavels Jelisejevs Frontend side RESOLVED in r38088.

        Alexander Vladishev data.tmpl RESOLVED in r38091.

        Alexander Vladishev server side RESOLVED in r38093:38094.

        Oleg Egorov Frontend side REVIEWED

        Andris Zeila server side REVIEWED

        Alexander Vladishev CLOSED

        Show
        Pavels Jelisejevs added a comment - - edited (120) [FIS] Move the user name and password from the item keys to separate fields. Pavels Jelisejevs Frontend side RESOLVED in r38088. Alexander Vladishev data.tmpl RESOLVED in r38091. Alexander Vladishev server side RESOLVED in r38093:38094. Oleg Egorov Frontend side REVIEWED Andris Zeila server side REVIEWED Alexander Vladishev CLOSED
        Hide
        Oleg Egorov added a comment - - edited

        (121) [F] Please implement changes from ZBX-6873 for host prototypes.

        In configuration.host.prototype.list.php use new CForm(); without 'get' form $itemForm
        And add urlParams for getPagingLine to fix "Critical error. Field "parent_discoveryid" is mandatory." potential problem

        Pavels Jelisejevs This has been done in ZBX-6873. CLOSED.

        Show
        Oleg Egorov added a comment - - edited (121) [F] Please implement changes from ZBX-6873 for host prototypes. In configuration.host.prototype.list.php use new CForm(); without 'get' form $itemForm And add urlParams for getPagingLine to fix "Critical error. Field "parent_discoveryid" is mandatory." potential problem Pavels Jelisejevs This has been done in ZBX-6873 . CLOSED.
        Hide
        Andris Zeila added a comment - - edited

        (122) [S] Please review my changes in r38110, r38126, r38128, r38129, r38135

        Alexander Vladishev r38110: REOPENED excess check should be removed

        if (NULL != doc)
        {
        }
        

        Andris Zeila r38110: excess check removed in r38140

        Alexander Vladishev r38110: CLOSED
        Alexander Vladishev r38126: CLOSED
        Alexander Vladishev r38128: CLOSED
        Alexander Vladishev r38129: CLOSED
        Alexander Vladishev r38135: REOPENED the same problem should be fixed with triggers and graphs.

        Andris Zeila r38135: RESOLVED in r38143

        Alexander Vladishev CLOSED

        Show
        Andris Zeila added a comment - - edited (122) [S] Please review my changes in r38110, r38126, r38128, r38129, r38135 Alexander Vladishev r38110: REOPENED excess check should be removed if (NULL != doc) { } Andris Zeila r38110: excess check removed in r38140 Alexander Vladishev r38110: CLOSED Alexander Vladishev r38126: CLOSED Alexander Vladishev r38128: CLOSED Alexander Vladishev r38129: CLOSED Alexander Vladishev r38135: REOPENED the same problem should be fixed with triggers and graphs. Andris Zeila r38135: RESOLVED in r38143 Alexander Vladishev CLOSED
        Hide
        Pavels Jelisejevs added a comment - - edited

        (123) [I] The implemented WMware checks must be added to the help items table.

        Andris Zeila RESOLVED in r38570

        Alexander Vladishev CLOSED

        Show
        Pavels Jelisejevs added a comment - - edited (123) [I] The implemented WMware checks must be added to the help items table. Andris Zeila RESOLVED in r38570 Alexander Vladishev CLOSED
        Hide
        Andris Zeila added a comment - - edited

        (124) [S] vmware.vsphere.memory.size.ballooned, wmware.vcenter.hv.memory.size.ballooned checks were failing if it failed for one of hosted virtual machines (for example if one of vm is not started).

        RESOLVED in r38202. Please review and test it.

        Alexander Vladishev CLOSED

        Show
        Andris Zeila added a comment - - edited (124) [S] vmware.vsphere.memory.size.ballooned, wmware.vcenter.hv.memory.size.ballooned checks were failing if it failed for one of hosted virtual machines (for example if one of vm is not started). RESOLVED in r38202. Please review and test it. Alexander Vladishev CLOSED
        Hide
        Andris Zeila added a comment - - edited

        (125) [S] powerstate checks were not converted from vmware format (poweredOff, poweredOn, suspended) to numeric format (0, 1, 2).

        RESOLVED in r38205. Please review and test it.

        Alexander Vladishev CLOSED

        Show
        Andris Zeila added a comment - - edited (125) [S] powerstate checks were not converted from vmware format (poweredOff, poweredOn, suspended) to numeric format (0, 1, 2). RESOLVED in r38205. Please review and test it. Alexander Vladishev CLOSED
        Hide
        Andris Zeila added a comment - - edited

        (126) [S] Discovered hypervisor host name must match the hypervisor name item of its virtual machines.

        RESOLVED in r38219. Please review and test it.

        It shoud be done other way around. Instead of using host as hypervisor name, the previously used config/name should be also used in virtual machines as their hypervisor name. So isntead of simply returning host as hypervisor name we must lookup the right hypervisor and return its name. REOPENED

        Andris Zeila RESOLVED in r38253

        Alexander Vladishev CLOSED

        Show
        Andris Zeila added a comment - - edited (126) [S] Discovered hypervisor host name must match the hypervisor name item of its virtual machines. RESOLVED in r38219. Please review and test it. It shoud be done other way around. Instead of using host as hypervisor name, the previously used config/name should be also used in virtual machines as their hypervisor name. So isntead of simply returning host as hypervisor name we must lookup the right hypervisor and return its name. REOPENED Andris Zeila RESOLVED in r38253 Alexander Vladishev CLOSED
        Hide
        Alexander Vladishev added a comment - - edited

        Available in pre-2.1.4 (trunk) r38270.

        Show
        Alexander Vladishev added a comment - - edited Available in pre-2.1.4 (trunk) r38270.
        Hide
        Andris Zeila added a comment - - edited

        (127) [S] Changed the logic how virtual host devices and performance counters are processed.

        Before the following steps were taken:
        1) get the list of all available counters for a host
        2) filter counters by instance names (requiring well known instance names, which was not always so), populate device list
        3) get the details of the filtered counters
        4) select the required counters by their keys
        5) request counter values for all devices in the device list

        Now it is as follows:
        1) get the list of all supported counters by vmware instance
        2) find the required counter types by their keys
        3) populate device list with nic devices found in vm configurations
        4) request counter values for network devices and all virtual disk instances
        5) populate device list with disk devices found in counter values

        RESOLVED in development branch svn://svn.zabbix.com/branches/dev/ZBXNEXT-1633 r38333

        Alexander Vladishev CLOSED

        Show
        Andris Zeila added a comment - - edited (127) [S] Changed the logic how virtual host devices and performance counters are processed. Before the following steps were taken: 1) get the list of all available counters for a host 2) filter counters by instance names (requiring well known instance names, which was not always so), populate device list 3) get the details of the filtered counters 4) select the required counters by their keys 5) request counter values for all devices in the device list Now it is as follows: 1) get the list of all supported counters by vmware instance 2) find the required counter types by their keys 3) populate device list with nic devices found in vm configurations 4) request counter values for network devices and all virtual disk instances 5) populate device list with disk devices found in counter values RESOLVED in development branch svn://svn.zabbix.com/branches/dev/ZBXNEXT-1633 r38333 Alexander Vladishev CLOSED
        Show
        Pavels Jelisejevs added a comment - - edited (128) API documentation needs to be updated. Pavels Jelisejevs Updated: https://www.zabbix.com/documentation/2.2/manual/api/changes_2.0_-_2.2 https://www.zabbix.com/documentation/2.2/manual/api/reference/discoveryrule/object https://www.zabbix.com/documentation/2.2/manual/api/reference/discoveryrule/get https://www.zabbix.com/documentation/2.2/manual/api/reference/host/object https://www.zabbix.com/documentation/2.2/manual/api/reference/host/get https://www.zabbix.com/documentation/2.2/manual/api/reference/hostgroup/object https://www.zabbix.com/documentation/2.2/manual/api/reference/hostgroup/get https://www.zabbix.com/documentation/2.2/manual/api/reference/item/object https://www.zabbix.com/documentation/2.2/manual/api/reference/itemprototype/object Alexander Vladishev CLOSED
        Hide
        Andris Zeila added a comment - - edited

        (129) [PSI] added vmware host network and datastore monitoring support, updated templates.

        New virtual machine simple checks were added:
        vmware.vcenter.hv.network.in[<url>,<host>,bps]
        vmware.vcenter.hv.network.out[<url>,<host>,bps]
        vmware.vcenter.hv.datastore.discovery[<url>,<host>]
        vmware.vcenter.hv.datastore.read[<url>,<host>,<datastore>,latency]
        vmware.vcenter.hv.datastore.write[<url>,<host>,<datastore>,latency]

        vmware.vsphere.network.in[<url>,bps]
        vmware.vsphere.network.out[<url>,bps]
        vmware.vsphere.datastore.discovery[<url>]
        vmware.vsphere.datastore.read[<url>,<datastore>,latency]
        vmware.vsphere.datastore.write[<url>,<datastore>,latency]

        The network monitoring items and datastore discovery were added to VMware vCenter Hypervisor and VMware vSphere templates.

        RESOLVED in r38351, r38360

        Alexander Vladishev REVIEWED. Please review my changes in r38509.

        Andris Zeila REVIEWED and CLOSED.

        Alexander Vladishev TESTED

        Show
        Andris Zeila added a comment - - edited (129) [PSI] added vmware host network and datastore monitoring support, updated templates. New virtual machine simple checks were added: vmware.vcenter.hv.network.in [<url>,<host>,bps] vmware.vcenter.hv.network.out [<url>,<host>,bps] vmware.vcenter.hv.datastore.discovery [<url>,<host>] vmware.vcenter.hv.datastore.read [<url>,<host>,<datastore>,latency] vmware.vcenter.hv.datastore.write [<url>,<host>,<datastore>,latency] vmware.vsphere.network.in [<url>,bps] vmware.vsphere.network.out [<url>,bps] vmware.vsphere.datastore.discovery [<url>] vmware.vsphere.datastore.read [<url>,<datastore>,latency] vmware.vsphere.datastore.write [<url>,<datastore>,latency] The network monitoring items and datastore discovery were added to VMware vCenter Hypervisor and VMware vSphere templates. RESOLVED in r38351, r38360 Alexander Vladishev REVIEWED. Please review my changes in r38509. Andris Zeila REVIEWED and CLOSED. Alexander Vladishev TESTED
        Hide
        richlv added a comment - - edited

        (130) [PS] vmware support status should be printed in the 'compiled in features' block in the server/proxy log

        Alexander Vladishev RESOLVED in r38510.

        Andris Zeila CLOSED

        Show
        richlv added a comment - - edited (130) [PS] vmware support status should be printed in the 'compiled in features' block in the server/proxy log Alexander Vladishev RESOLVED in r38510. Andris Zeila CLOSED
        Hide
        Egita Sidorova added a comment - - edited

        (131) passive proxy will not be saved, please check error message attached

        Vitalij Romanovskij RESOLVED in the development branch svn://svn.zabbix.com/branches/dev/ZBXNEXT-1633_131

        Pavels Jelisejevs TESTED.

        Fixed in pre-2.1.5 (trunk) r38539.

        Show
        Egita Sidorova added a comment - - edited (131) passive proxy will not be saved, please check error message attached Vitalij Romanovskij RESOLVED in the development branch svn://svn.zabbix.com/branches/dev/ZBXNEXT-1633_131 Pavels Jelisejevs TESTED. Fixed in pre-2.1.5 (trunk) r38539.
        Hide
        Andris Zeila added a comment -

        Available in pre-2.1.5 (trunk) r38552

        Show
        Andris Zeila added a comment - Available in pre-2.1.5 (trunk) r38552
        Hide
        Andris Zeila added a comment - - edited

        (132) [S] add vmware collector process that will be responsible for data retrieval from vmware services (vCenter, vSphere).

        Available in in development branch svn://svn.zabbix.com/branches/dev/ZBXNEXT-1633 r38867 r38886

        Updated specifications at https://www.zabbix.org/wiki/Docs/specs/ZBXNEXT-1633
        More specifically - VMWare data gathering, Simple checks, Configuration file changes, Internal items and Self monitoring sections

        Updated documentation:

        Alexander Vladishev Updated:

        Show
        Andris Zeila added a comment - - edited (132) [S] add vmware collector process that will be responsible for data retrieval from vmware services (vCenter, vSphere). Available in in development branch svn://svn.zabbix.com/branches/dev/ZBXNEXT-1633 r38867 r38886 Updated specifications at https://www.zabbix.org/wiki/Docs/specs/ZBXNEXT-1633 More specifically - VMWare data gathering, Simple checks, Configuration file changes, Internal items and Self monitoring sections Updated documentation: Simple checks - https://www.zabbix.com/documentation/2.2/manual/config/items/itemtypes/simple_checks#supported_simple_checks VMWare key description - https://www.zabbix.com/documentation/2.2/manual/config/items/itemtypes/simple_checks/vmware_keys vmware internal check - https://www.zabbix.com/documentation/2.2/manual/config/items/itemtypes/internal?&#supported_checks Virtual machine monitoring - https://www.zabbix.com/documentation/2.2/manual/vm_monitoring What's new - https://www.zabbix.com/documentation/2.2/manual/introduction/whatsnew220#virtual_machine_monitoring Alexander Vladishev Updated: https://www.zabbix.com/documentation/2.2/manual/config/items/itemtypes/simple_checks/vmware_keys?&#item_keys - formatting; fixed description of vmware.vm.vfs.fs.size[]
        Hide
        Alexander Vladishev added a comment - - edited

        (134) These keys relates to a hypervisor and should be renamed:

        • vmware.datastore.read => vmware.hv.datastore.read
        • vmware.datastore.write => vmware.hv.datastore.write
        • vmware.network.in => vmware.hv.network.in
        • vmware.network.out => vmware.hv.network.out

        Also in:

        Andris Zeila Actually only help items table and documentation had the wrong key names. RESOLVED in r38976

        Alexander Vladishev CLOSED

        Show
        Alexander Vladishev added a comment - - edited (134) These keys relates to a hypervisor and should be renamed: vmware.datastore.read => vmware.hv.datastore.read vmware.datastore.write => vmware.hv.datastore.write vmware.network.in => vmware.hv.network.in vmware.network.out => vmware.hv.network.out Also in: https://www.zabbix.com/documentation/2.2/manual/config/items/itemtypes/simple_checks/vmware_keys?&#item_keys data.tmpl: help_items, items Andris Zeila Actually only help items table and documentation had the wrong key names. RESOLVED in r38976 Alexander Vladishev CLOSED
        Hide
        Alexander Vladishev added a comment - - edited

        (135) "Template App Zabbix Server" should be updated.

        • new item zabbix[vmware,buffer,pfree]
        • new trigger "Less than 25% free in the vmware cache"
        • new graph_item in "Zabbix cache usage, % free"

        Andris Zeila RESOLVED in r39003

        Alexander Vladishev Also added a new item zabbix[process,vmware collector,avg,busy] and trigger. Updated graphs. Please review r39044.

        Andris Zeila reviewed and CLOSED

        Show
        Alexander Vladishev added a comment - - edited (135) "Template App Zabbix Server" should be updated. new item zabbix [vmware,buffer,pfree] new trigger "Less than 25% free in the vmware cache" new graph_item in "Zabbix cache usage, % free" Andris Zeila RESOLVED in r39003 Alexander Vladishev Also added a new item zabbix [process,vmware collector,avg,busy] and trigger. Updated graphs. Please review r39044. Andris Zeila reviewed and CLOSED
        Hide
        Alexander Vladishev added a comment - - edited

        (136) "vmware collector" should check service->lastcheck variable to calculate sleep time.

        Andris Zeila RESOLVED in r38996 r39004

        Alexander Vladishev REOPENED vmware_get_update_time() works without a lock

        Andris Zeila RESOLVED in 39067

        Alexander Vladishev CLOSED

        Show
        Alexander Vladishev added a comment - - edited (136) "vmware collector" should check service->lastcheck variable to calculate sleep time. Andris Zeila RESOLVED in r38996 r39004 Alexander Vladishev REOPENED vmware_get_update_time() works without a lock Andris Zeila RESOLVED in 39067 Alexander Vladishev CLOSED
        Hide
        richlv added a comment - - edited

        (137) config file option comments use "vmware" capitalisation - let's use "VMware" there, too

        Andris Zeila in this place the vmware is not used as product (VMware) name, but as a par of process name and our internal process names are in lowercase letters (vmware collector).

        <richlv> ah, that makes sense - CLOSED

        Show
        richlv added a comment - - edited (137) config file option comments use "vmware" capitalisation - let's use "VMware" there, too Andris Zeila in this place the vmware is not used as product (VMware) name, but as a par of process name and our internal process names are in lowercase letters (vmware collector). <richlv> ah, that makes sense - CLOSED
        Hide
        Alexander Vladishev added a comment - - edited

        (138) vmware_service_update() function shall lock a cache in case of updating

        Andris Zeila RESOLVED in r39067

        Alexander Vladishev CLOSED

        Show
        Alexander Vladishev added a comment - - edited (138) vmware_service_update() function shall lock a cache in case of updating Andris Zeila RESOLVED in r39067 Alexander Vladishev CLOSED
        Hide
        Andris Zeila added a comment -

        Available in pre-2.1.7 (trunk) r39083

        Show
        Andris Zeila added a comment - Available in pre-2.1.7 (trunk) r39083
        Hide
        Yuya Kusakabe added a comment -

        Virtual machine's "Host name" should be "instanceUuid" instead of "uuid".
        Because "instanceUuid" is grantee to be unique, but "uuid" is not grantee.

        http://pubs.vmware.com/vsphere-55/index.jsp#com.vmware.wssdk.apiref.doc/vim.vm.ConfigInfo.html

        Show
        Yuya Kusakabe added a comment - Virtual machine's "Host name" should be "instanceUuid" instead of "uuid". Because "instanceUuid" is grantee to be unique, but "uuid" is not grantee. http://pubs.vmware.com/vsphere-55/index.jsp#com.vmware.wssdk.apiref.doc/vim.vm.ConfigInfo.html
        Hide
        richlv added a comment -

        uuid issue will be handled in ZBX-7258

        Show
        richlv added a comment - uuid issue will be handled in ZBX-7258
        Hide
        Cristian Mammoli added a comment -

        Hi guys, I started testing the new vmware monitoring functions but I noticed tha there is no check for the actual datastore occupation. Read, write and latency statistics are nice but datastore usage is critical for us...

        See ZBXNEXT-2043 for other nice ideas

        Show
        Cristian Mammoli added a comment - Hi guys, I started testing the new vmware monitoring functions but I noticed tha there is no check for the actual datastore occupation. Read, write and latency statistics are nice but datastore usage is critical for us... See ZBXNEXT-2043 for other nice ideas
        Hide
        Oleksiy Zagorskyi added a comment - - edited

        (140) need to update descriptions for:
        common.h:

        #define ZBX_FLAG_DISCOVERY_NORMAL	0x00	/* normal item */
        #define ZBX_FLAG_DISCOVERY_CREATED	0x04	/* auto-created item, trigger or graph */
        

        defines.inc.php:

        define('ZBX_FLAG_DISCOVERY_NORMAL',		0x0); // a normal item
        define('ZBX_FLAG_DISCOVERY_PROTOTYPE',	0x2); // an item prototype
        define('ZBX_FLAG_DISCOVERY_CREATED',		0x4); // an item created via a discovery rule
        

        because they all can be not only item/etc but trigger or graph or host as well.

        Alexander Vladishev The comments was removed from code. Тhey aren't necessary here. CLOSED

        r41941 (branches/2.2) and r41942 (trunk)

        Show
        Oleksiy Zagorskyi added a comment - - edited (140) need to update descriptions for: common.h: #define ZBX_FLAG_DISCOVERY_NORMAL 0x00 /* normal item */ #define ZBX_FLAG_DISCOVERY_CREATED 0x04 /* auto-created item, trigger or graph */ defines.inc.php: define('ZBX_FLAG_DISCOVERY_NORMAL', 0x0); // a normal item define('ZBX_FLAG_DISCOVERY_PROTOTYPE', 0x2); // an item prototype define('ZBX_FLAG_DISCOVERY_CREATED', 0x4); // an item created via a discovery rule because they all can be not only item/etc but trigger or graph or host as well. Alexander Vladishev The comments was removed from code. Тhey aren't necessary here. CLOSED r41941 (branches/2.2) and r41942 (trunk)
        Hide
        richlv added a comment -

        this seems to have caused a regression in simple check item config form : ZBX-7971

        Show
        richlv added a comment - this seems to have caused a regression in simple check item config form : ZBX-7971

          People

          • Assignee:
            Unassigned
            Reporter:
            Pavels Jelisejevs
          • Votes:
            14 Vote for this issue
            Watchers:
            18 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: