Details

    • Team:
      Team A
    • Sprint:
      Sprint 1

      Description

      It should be possible to nest host groups.
      There should be a hierarchical display for viewing such groups in most places.
      All group dropdown selectors should show groups hierarchically whenever possible (a lot of subgroups could expand them a lot).
      Circular nesting should be checked and prohibited.
      Must perform well with large amount of groups and hosts in them in all locations in frontend and in server, where relevant.

      open questions :

      Should groups be able to contain both groups and hosts ?
      Should group be able to be a member of several parent groups ?
      What about upgrades - maybe it's worth providing simple upgrade path for people who use some notation schema currently (for example, allowing definition of group separator, thus group "UPS :: Something" group would create two groups - "UPS" and "Something", where "Something" would be a subgroup of "UPS").

      open questions, large areas :

      Permissions (general, global scripts, maintenance, actions...)
      Action conditions
      Action targets (groups)
      Maintenance
      Dropdown entry "all"
      Filtering (almost everywhere - should it include subgroup elements etc...)
      Search result displaying (for host groups)
      Displaying in network maps (to include subgroup triggers or not, what about host group element displaying...)

      forum threads :

      http://www.zabbix.com/forum/showthread.php?t=11425
      http://www.zabbix.com/forum/showthread.php?t=17559

      1. 14_zabbix-2.0.6-frontend_group-groups-2.patch
        5 kB
        Ghozlane TOUMI
      1. after.png
        3 kB
      2. before.png
        11 kB
      3. error.png
        40 kB
      4. incorrect-alignent.png
        4 kB
      5. ms_search_results.png
        8 kB
      6. multiselect.png
        21 kB
      7. permissions.png
        3 kB
      8. zbx_nested_hostgroup.png
        13 kB

        Issue Links

          Activity

          Hide
          Henrik Johansen added a comment -

          Since this is a rather fundamental change of the way people currently interact with the ZBX front-end I would envision that this need to be done in smaller steps.

          Perhaps we should simply introduce a new type of Host Group (a "Host Group Container"?) that Host Groups can be flagged as - the flag would enforce that a Host Group Container only
          can contain other Host Groups. These Host Group Containers could then be displayed as additional drop-down menu items where required for filtering, assignment, etc.

          Permissions and action conditions/ targets are our primary headache right now - a simple inheritance model from top to bottom would most likely we the simplest solution and would scratch our particular itch well.

          After that, network map display is the next major issue where nesting should be supported in our use case.

          Show
          Henrik Johansen added a comment - Since this is a rather fundamental change of the way people currently interact with the ZBX front-end I would envision that this need to be done in smaller steps. Perhaps we should simply introduce a new type of Host Group (a "Host Group Container"?) that Host Groups can be flagged as - the flag would enforce that a Host Group Container only can contain other Host Groups. These Host Group Containers could then be displayed as additional drop-down menu items where required for filtering, assignment, etc. Permissions and action conditions/ targets are our primary headache right now - a simple inheritance model from top to bottom would most likely we the simplest solution and would scratch our particular itch well. After that, network map display is the next major issue where nesting should be supported in our use case.
          Hide
          Vitaly Nikolaev added a comment -

          I like how groups done in Cisco ACS:

          GroupA.GroupB.GroupC
          .GroupB.GroupE
          .GroupD
          .GroupX

          Each subgroup (to the right), inherit security settings from parent group. If I let SysadminA read permission on
          GroupB - he will get read permission also to GroupA.GroupB.GroupC and GroupA.GroupB.GroupE

          In GUI for example if I look hosts in "GroupB" il get summary host list form GroupA.GroupB, GroupA.GroupB.GroupC, GroupA.GroupB.GroupE groups

          Any group can have hosts,

          As for making change compatible with current system ? It is compatible, current Groups will become root Groups.

          Show
          Vitaly Nikolaev added a comment - I like how groups done in Cisco ACS: GroupA.GroupB.GroupC .GroupB.GroupE .GroupD .GroupX Each subgroup (to the right), inherit security settings from parent group. If I let SysadminA read permission on GroupB - he will get read permission also to GroupA.GroupB.GroupC and GroupA.GroupB.GroupE In GUI for example if I look hosts in "GroupB" il get summary host list form GroupA.GroupB, GroupA.GroupB.GroupC, GroupA.GroupB.GroupE groups Any group can have hosts, As for making change compatible with current system ? It is compatible, current Groups will become root Groups.
          Hide
          Stefan added a comment -

          any news about that? will it exist in zabbix 2.2?

          Show
          Stefan added a comment - any news about that? will it exist in zabbix 2.2?
          Hide
          Stefan added a comment -

          why you dont add a column something like 'parent(NULL)'
          in this columm there are the parent-hostgroupids..

          otherwise you can use ltree
          (http://www.postgresql.org/docs/9.1/static/ltree.html)

          Show
          Stefan added a comment - why you dont add a column something like 'parent(NULL)' in this columm there are the parent-hostgroupids.. otherwise you can use ltree ( http://www.postgresql.org/docs/9.1/static/ltree.html )
          Hide
          Ghozlane TOUMI added a comment -

          As a workaround, I have a patch that adds a 1 level grouping for groups, maps and screens.
          It's a .js based solution, cosmetic only but may help some of you while waiting for a true solution to this problem...
          its tested on 2.0.x, but should work in 2.2 as it's a standalone .js

          https://www.zabbix.com/forum/showthread.php?t=43743

          Show
          Ghozlane TOUMI added a comment - As a workaround, I have a patch that adds a 1 level grouping for groups, maps and screens. It's a .js based solution, cosmetic only but may help some of you while waiting for a true solution to this problem... its tested on 2.0.x, but should work in 2.2 as it's a standalone .js https://www.zabbix.com/forum/showthread.php?t=43743
          Hide
          Marc added a comment -

          Ghozlane TOUMI, why not attaching the patch/images to this ticket?

          Show
          Marc added a comment - Ghozlane TOUMI , why not attaching the patch/images to this ticket?
          Hide
          Ghozlane TOUMI added a comment -

          Meh.. the patch doesn't really answer the feature request, it's just a cosmetic / usability improvement...
          But well there it is...

          Show
          Ghozlane TOUMI added a comment - Meh.. the patch doesn't really answer the feature request, it's just a cosmetic / usability improvement... But well there it is...
          Hide
          Adail Horst added a comment -

          Yeap.... the patch is only a cosmetic. to solve this is required change the database + API. Because the relation between groups is not so "named logical".

          Show
          Adail Horst added a comment - Yeap.... the patch is only a cosmetic. to solve this is required change the database + API. Because the relation between groups is not so "named logical".
          Hide
          Marc added a comment -

          Sure. Anyhow, I think it addresses the issue and might for some be beneficial in comparison to have nothing.

          Show
          Marc added a comment - Sure. Anyhow, I think it addresses the issue and might for some be beneficial in comparison to have nothing.
          Hide
          Adail Horst added a comment -

          Yeap. Is a good temporary soluction for a specific cenario.

          Show
          Adail Horst added a comment - Yeap. Is a good temporary soluction for a specific cenario.
          Hide
          Dawid van Wyngaard added a comment -

          Zabbix Dev Team,

          Any indication when this feature / fix will be implemented in a next release? Zabbix 2.4? If so, what is the time frame for this feature enhancement / request to be released?

          Thanks,

          Dawid

          Show
          Dawid van Wyngaard added a comment - Zabbix Dev Team, Any indication when this feature / fix will be implemented in a next release? Zabbix 2.4? If so, what is the time frame for this feature enhancement / request to be released? Thanks, Dawid
          Hide
          richlv added a comment -

          this is currently not on the roadmap

          Show
          richlv added a comment - this is currently not on the roadmap
          Hide
          jj added a comment -

          this would be great

          Show
          jj added a comment - this would be great
          Hide
          James Vajoumounien added a comment -

          +1
          Any news about this feature?

          Show
          James Vajoumounien added a comment - +1 Any news about this feature?
          Hide
          Marc added a comment -

          James Vajoumounien,

          as richlv already said, it's not on the roadmap yet.
          To get it there maybe consider to (co-)sponsor development.

          Show
          Marc added a comment - James Vajoumounien , as richlv already said, it's not on the roadmap yet. To get it there maybe consider to (co-)sponsor development .
          Hide
          J. van Stijn added a comment -

          +1 for me!

          This would be so helpful!

          Show
          J. van Stijn added a comment - +1 for me! This would be so helpful!
          Hide
          Oleg Egorov added a comment - - edited

          (1) [A] Possible to create host group with name "test//test"

          RESOLVED IN r61767

          Ivo Kurzemnieks Possible to create "test/test/" with ending slash.

          REOPENED

          Gunars Pujats RESOLVED in r61896

          Ivo Kurzemnieks CLOSED

          Show
          Oleg Egorov added a comment - - edited (1) [A] Possible to create host group with name "test//test" RESOLVED IN r61767 Ivo Kurzemnieks Possible to create "test/test/" with ending slash. REOPENED Gunars Pujats RESOLVED in r61896 Ivo Kurzemnieks CLOSED
          Hide
          Oleg Egorov added a comment - - edited

          (2) [F] I have groups:
          Latvia
          Latvia/Riga

          Issues:

          • Search by "/*" return "More matches found", but should be "no matches found".
          • Search by "//*" return all nested host groups, in my case return "Latvia/Riga", but should be "no matches found".

          Only if searching by "///*" multiselect return correct result.

          Function naming for multiselect, removeSubgroupPostfix and hasSubgroupPostfix please change to removeSubGroupPostfix and hasSubGroupPostfix

          Gunars Pujats RESOLVED in r61788

          Ivo Kurzemnieks The order of host groups is incorrect when child is added first and parent is added afterwards.

          REOPENED

          Gunars Pujats As discussed with Alexander Vladishev it's not a regression. WON'T FIX.

          Show
          Oleg Egorov added a comment - - edited (2) [F] I have groups: Latvia Latvia/Riga Issues: Search by "/*" return "More matches found" , but should be "no matches found". Search by "//*" return all nested host groups, in my case return "Latvia/Riga" , but should be "no matches found". Only if searching by "///*" multiselect return correct result. Function naming for multiselect, removeSubgroupPostfix and hasSubgroupPostfix please change to removeSubGroupPostfix and hasSubGroupPostfix Gunars Pujats RESOLVED in r61788 Ivo Kurzemnieks The order of host groups is incorrect when child is added first and parent is added afterwards. REOPENED Gunars Pujats As discussed with Alexander Vladishev it's not a regression. WON'T FIX.
          Hide
          Ivo Kurzemnieks added a comment - - edited

          (3) [F] I have a host group named "A". Type "A" in multiselect. See many choices to choose from. It looks for also "a" in any name. Choose something else using mouse and click. The group "A" gets selected anyway.

          Gunars Pujats RESOLVED in r61815

          Ivo Kurzemnieks Seems to work, but now there is a different problem. Let's say we start typing "Latvia" and navigate with arrow key down to "Latvia/Riga", but I change my mind and click with mouse "Latvia/Venstpils" instead. The name "Latvia/Riga" is cleared, but "Latvia/Venstpils" was not chosen. This problem appears on FF. Chome, Opera and latest IE works fine.

          REOPENED

          Gunars Pujats RESOLVED in r61870

          Ivo Kurzemnieks CLOSED

          Show
          Ivo Kurzemnieks added a comment - - edited (3) [F] I have a host group named "A". Type "A" in multiselect. See many choices to choose from. It looks for also "a" in any name. Choose something else using mouse and click. The group "A" gets selected anyway. Gunars Pujats RESOLVED in r61815 Ivo Kurzemnieks Seems to work, but now there is a different problem. Let's say we start typing "Latvia" and navigate with arrow key down to "Latvia/Riga", but I change my mind and click with mouse "Latvia/Venstpils" instead. The name "Latvia/Riga" is cleared, but "Latvia/Venstpils" was not chosen. This problem appears on FF. Chome, Opera and latest IE works fine. REOPENED Gunars Pujats RESOLVED in r61870 Ivo Kurzemnieks CLOSED
          Hide
          Ivo Kurzemnieks added a comment - - edited

          (4) [F] Translation string changes.
          Strings added:

          • Duplicate "%1$s" value "%2$s" for host group.
          • Empty group ID.
          • Host group is missing parameters: %1$s
          • Incorrect group ID.
          • No "%1$s" given for group.
          • invalid group name "%1$s"
          • must be a string

          Strings deleted:

          • Calculated permissions
          • Composing permissions
          • Host group name cannot be empty.

          Gunars Pujats CLOSED

          Show
          Ivo Kurzemnieks added a comment - - edited (4) [F] Translation string changes. Strings added: Duplicate "%1$s" value "%2$s" for host group. Empty group ID. Host group is missing parameters: %1$s Incorrect group ID. No "%1$s" given for group. invalid group name "%1$s" must be a string Strings deleted: Calculated permissions Composing permissions Host group name cannot be empty. Gunars Pujats CLOSED
          Hide
          Oleg Egorov added a comment - - edited

          (5) [F] Error after adding new element via multiselect in user group permission tab.
          I have host groups:
          test
          test/test

          Trying to add permissions for user group "Zabbix Administrators".

          array_fill(): Number of elements must be positive [usergrps.php:456 → array_fill() in usergrps.php:456]
          array_combine() expects parameter 2 to be array, boolean given [usergrps.php:457 → array_combine() in usergrps.php:457]
          array_diff_key(): Argument #2 is not an array [usergrps.php:460 → array_diff_key() in usergrps.php:460]
          Argument 1 passed to findParentAndChildsForUpdate() must be of the type array, null given, called in C:\xampp\htdocs\ZBXNEXT-1262\frontends\php\usergrps.php on line 462 and defined [usergrps.php:462 → findParentAndChildsForUpdate() in include\users.inc.php:291]
          array_keys() expects parameter 1 to be array, null given [usergrps.php:462 → findParentAndChildsForUpdate() → array_keys() in include\users.inc.php:300]
          Argument 1 passed to findParentAndChildsForUpdate() must be of the type array, null given, called in C:\xampp\htdocs\ZBXNEXT-1262\frontends\php\usergrps.php on line 473 and defined [usergrps.php:473 → findParentAndChildsForUpdate() in include\users.inc.php:291]
          array_keys() expects parameter 1 to be array, null given [usergrps.php:473 → findParentAndChildsForUpdate() → array_keys() in include\users.inc.php:300]
          array_diff_key(): Argument #2 is not an array [usergrps.php:480 → array_diff_key() in usergrps.php:480]
          Invalid argument supplied for foreach() [ in usergrps.php:480]
          

          Oleg Egorov & Ivo Kurzemnieks RESOLVED IN r61813

          Ivo Kurzemnieks Problem was due to PHP < v5.6 function array_fill() works a bit differently.
          CLOSED

          Show
          Oleg Egorov added a comment - - edited (5) [F] Error after adding new element via multiselect in user group permission tab. I have host groups: test test/test Trying to add permissions for user group "Zabbix Administrators". array_fill(): Number of elements must be positive [usergrps.php:456 → array_fill() in usergrps.php:456] array_combine() expects parameter 2 to be array, boolean given [usergrps.php:457 → array_combine() in usergrps.php:457] array_diff_key(): Argument #2 is not an array [usergrps.php:460 → array_diff_key() in usergrps.php:460] Argument 1 passed to findParentAndChildsForUpdate() must be of the type array, null given, called in C:\xampp\htdocs\ZBXNEXT-1262\frontends\php\usergrps.php on line 462 and defined [usergrps.php:462 → findParentAndChildsForUpdate() in include\users.inc.php:291] array_keys() expects parameter 1 to be array, null given [usergrps.php:462 → findParentAndChildsForUpdate() → array_keys() in include\users.inc.php:300] Argument 1 passed to findParentAndChildsForUpdate() must be of the type array, null given, called in C:\xampp\htdocs\ZBXNEXT-1262\frontends\php\usergrps.php on line 473 and defined [usergrps.php:473 → findParentAndChildsForUpdate() in include\users.inc.php:291] array_keys() expects parameter 1 to be array, null given [usergrps.php:473 → findParentAndChildsForUpdate() → array_keys() in include\users.inc.php:300] array_diff_key(): Argument #2 is not an array [usergrps.php:480 → array_diff_key() in usergrps.php:480] Invalid argument supplied for foreach() [ in usergrps.php:480] Oleg Egorov & Ivo Kurzemnieks RESOLVED IN r61813 Ivo Kurzemnieks Problem was due to PHP < v5.6 function array_fill() works a bit differently. CLOSED
          Hide
          Alexander Vladishev added a comment - - edited

          (7) [F] Controls are not properly aligned

          Pavel Amosov RESOLVED in r61827

          Ivo Kurzemnieks Older IEs had problems with radio buttons displayed at the bottom.
          RESOLVED in r61829

          Alexander Vladishev RESOLVED in r61895, r61901

          Ivo Kurzemnieks CLOSED

          Show
          Alexander Vladishev added a comment - - edited (7) [F] Controls are not properly aligned Pavel Amosov RESOLVED in r61827 Ivo Kurzemnieks Older IEs had problems with radio buttons displayed at the bottom. RESOLVED in r61829 Alexander Vladishev RESOLVED in r61895, r61901 Ivo Kurzemnieks CLOSED
          Hide
          Alexander Vladishev added a comment - - edited

          (8) [F] Cannot add permissions to a Group/*

          1. Open Permissions tab in "Zabbix administrators" user group
          2. Type "Zabbix servers/*", click [Read-write] and Add
          3.

          Oleg Egorov Don't work numeric host group in User group permission tab

          Ivo Kurzemnieks No, it's not a numeric problem. The groups with default permissions "None" were not displayed and all other groups had same permissions. The problem was with groups that have no parent and the "all permissions are the same" was not calculated properly for them.
          RESOLVED in r61823

          Alexander Vladishev CLOSED

          Show
          Alexander Vladishev added a comment - - edited (8) [F] Cannot add permissions to a Group/* 1. Open Permissions tab in "Zabbix administrators" user group 2. Type "Zabbix servers/*", click [Read-write] and Add 3. Oleg Egorov Don't work numeric host group in User group permission tab Ivo Kurzemnieks No, it's not a numeric problem. The groups with default permissions "None" were not displayed and all other groups had same permissions. The problem was with groups that have no parent and the "all permissions are the same" was not calculated properly for them. RESOLVED in r61823 Alexander Vladishev CLOSED
          Hide
          Andris Zeila added a comment - - edited

          (9) [I] Create database patch to increase groups.name and group_prototype.name fields to 255 characters.
          RESOLVED in r61814

          Alexander Vladishev CLOSED

          Show
          Andris Zeila added a comment - - edited (9) [I] Create database patch to increase groups.name and group_prototype.name fields to 255 characters. RESOLVED in r61814 Alexander Vladishev CLOSED
          Hide
          Alexander Vladishev added a comment - - edited

          (10) [F] The length of host group name and host group prototype name must be increased to 255 chars

          Ivo Kurzemnieks The limit is increased to host group names. Host group prototype names are generated by macros.
          RESOLVED r61819

          Alexander Vladishev The length of these fields are not updated:

          • Configuration -> Host form: "New group"
          • Configuration -> Trigger form: "New group"
          • Configuration -> Host prototype form: "Group prototypes"

          REOPENED

          Ivo Kurzemnieks RESOLVED in r61828

          Alexander Vladishev CLOSED

          Show
          Alexander Vladishev added a comment - - edited (10) [F] The length of host group name and host group prototype name must be increased to 255 chars Ivo Kurzemnieks The limit is increased to host group names. Host group prototype names are generated by macros. RESOLVED r61819 Alexander Vladishev The length of these fields are not updated: Configuration -> Host form : "New group" Configuration -> Trigger form : "New group" Configuration -> Host prototype form : "Group prototypes" REOPENED Ivo Kurzemnieks RESOLVED in r61828 Alexander Vladishev CLOSED
          Hide
          Alexander Vladishev added a comment - - edited

          (11) [F] usrgrps.php: these input parameters are not used and can be removed

          users, new_right, right_to_del, group_users_to_del, register, del_user_group, del_user_media, del_group_user, change_password, cancel

          Ivo Kurzemnieks RESOLVED in r61826

          Alexander Vladishev CLOSED

          Show
          Alexander Vladishev added a comment - - edited (11) [F] usrgrps.php : these input parameters are not used and can be removed users , new_right , right_to_del , group_users_to_del , register , del_user_group , del_user_media , del_group_user , change_password , cancel Ivo Kurzemnieks RESOLVED in r61826 Alexander Vladishev CLOSED
          Hide
          Alexander Vladishev added a comment - - edited

          (12) [F] Checkboxes always unchecked now in User group form

          Ivo Kurzemnieks RESOLVED in r61835

          Alexander Vladishev Second checkbox (debug_mode) also always unchecked

          REOPENED

          Ivo Kurzemnieks RESOLVED in r61843

          Alexander Vladishev CLOSED

          Show
          Alexander Vladishev added a comment - - edited (12) [F] Checkboxes always unchecked now in User group form Ivo Kurzemnieks RESOLVED in r61835 Alexander Vladishev Second checkbox (debug_mode) also always unchecked REOPENED Ivo Kurzemnieks RESOLVED in r61843 Alexander Vladishev CLOSED
          Hide
          Alexander Vladishev added a comment - - edited

          (13) [F] Already deleted users appears in the user list when error occurred while updating user group

          Ivo Kurzemnieks RESOLVED in r61836

          Alexander Vladishev CLOSED

          Show
          Alexander Vladishev added a comment - - edited (13) [F] Already deleted users appears in the user list when error occurred while updating user group Ivo Kurzemnieks RESOLVED in r61836 Alexander Vladishev CLOSED
          Hide
          Alexander Vladishev added a comment - - edited

          (14) frontends/php/usergrps.php:390

          $dbUsers = DBselect(
              'SELECT DISTINCT u.userid '.
              ' FROM users u,users_groups ug '.
              ' WHERE u.userid=ug.userid '.
                  ' AND ug.usrgrpid='.zbx_dbstr($data['usrgrpid'])
          );
          while ($dbUser = DBfetch($dbUsers)) {
              $data['group_users'][$dbUser['userid']] = $dbUser['userid'];
          }
          
          if (hasRequest('form_refresh')) {
              $data['group_users'] =  getRequest('group_users', []);
          }
          
          1. SQL statement must be executed only when form_refresh and group_users are not set
          2. SQL statement can be simplified
             'SELECT ug.userid'.
                ' FROM users_groups ug'.
                ' WHERE ug.usrgrpid='.zbx_dbstr($data['usrgrpid'])
            
          3. keys of $data['group_users'] array are not used

          Ivo Kurzemnieks RESOLVED in r61844, r61846

          Alexander Vladishev

          1. operation is repeated twice
            frontends/php/usergrps.php:370
            'group_users' => getRequest('group_users', []),

            frontends/php/usergrps.php:390

            $data['group_users'] = getRequest('group_users', []);
          2. double-space in SQL statement
            frontends/php/usergrps.php:398
            ' FROM users_groups ug '.
            ' WHERE ug.usrgrpid='.zbx_dbstr($data['usrgrpid'])
            

          REOPENED

          Ivo Kurzemnieks RESOLVED in r61849

          Alexander Vladishev when create new user group

          Undefined index: group_users [usergrps.php:610 → CView->render() → include() in include/views/administration.usergroups.edit.php:51]
          

          REOPENED

          Ivo Kurzemnieks RESOLVED in r61854

          Alexander Vladishev CLOSED

          Show
          Alexander Vladishev added a comment - - edited (14) frontends/php/usergrps.php:390 $dbUsers = DBselect( 'SELECT DISTINCT u.userid '. ' FROM users u,users_groups ug '. ' WHERE u.userid=ug.userid '. ' AND ug.usrgrpid='.zbx_dbstr($data['usrgrpid']) ); while ($dbUser = DBfetch($dbUsers)) { $data['group_users'][$dbUser['userid']] = $dbUser['userid']; } if (hasRequest('form_refresh')) { $data['group_users'] = getRequest('group_users', []); } SQL statement must be executed only when form_refresh and group_users are not set SQL statement can be simplified 'SELECT ug.userid'. ' FROM users_groups ug'. ' WHERE ug.usrgrpid='.zbx_dbstr($data['usrgrpid']) keys of $data['group_users'] array are not used Ivo Kurzemnieks RESOLVED in r61844, r61846 Alexander Vladishev operation is repeated twice frontends/php/usergrps.php:370 'group_users' => getRequest('group_users', []), frontends/php/usergrps.php:390 $data['group_users'] = getRequest('group_users', []); double-space in SQL statement frontends/php/usergrps.php:398 ' FROM users_groups ug '. ' WHERE ug.usrgrpid='.zbx_dbstr($data['usrgrpid']) REOPENED Ivo Kurzemnieks RESOLVED in r61849 Alexander Vladishev when create new user group Undefined index: group_users [usergrps.php:610 → CView->render() → include() in include/views/administration.usergroups.edit.php:51] REOPENED Ivo Kurzemnieks RESOLVED in r61854 Alexander Vladishev CLOSED
          Hide
          Alexander Vladishev added a comment - - edited

          (15) [F] frontends/php/usergrps.php:404

          $db_rights = DBselect(
              'SELECT r.rightid,r.permission,r.groupid AS user_groupid,g.groupid AS host_groupid,g.name'.
              ' FROM groups g'.
                  ' LEFT JOIN rights r ON r.id=g.groupid AND r.groupid='.zbx_dbstr($data['usrgrpid'])
          );
          
          while ($db_right = DBfetch($db_rights)) {
              $data['group_rights'][$db_right['name']] = [
                  'rights' => ($db_right['rightid'] == 0) ? PERM_NONE : $db_right['permission'],
                  'name' => $db_right['name'],
                  'host_groupid' => $db_right['host_groupid']
              ];
          }
          
          $data['group_rights'] = getRequest('group_rights', $data['group_rights']);
          
          1. SQL statement must be executed only when group_rights is not set
          2. SQL: user_groupid is not used
          3. host_groupid must be renamed into groupid

          Ivo Kurzemnieks RESOLVED in r61847

          Alexander Vladishev CLOSED

          Show
          Alexander Vladishev added a comment - - edited (15) [F] frontends/php/usergrps.php:404 $db_rights = DBselect( 'SELECT r.rightid,r.permission,r.groupid AS user_groupid,g.groupid AS host_groupid,g.name'. ' FROM groups g'. ' LEFT JOIN rights r ON r.id=g.groupid AND r.groupid='.zbx_dbstr($data['usrgrpid']) ); while ($db_right = DBfetch($db_rights)) { $data['group_rights'][$db_right['name']] = [ 'rights' => ($db_right['rightid'] == 0) ? PERM_NONE : $db_right['permission'], 'name' => $db_right['name'], 'host_groupid' => $db_right['host_groupid'] ]; } $data['group_rights'] = getRequest('group_rights', $data['group_rights']); SQL statement must be executed only when group_rights is not set SQL: user_groupid is not used host_groupid must be renamed into groupid Ivo Kurzemnieks RESOLVED in r61847 Alexander Vladishev CLOSED
          Hide
          Alexander Vladishev added a comment - - edited

          (16) [F] Why one entity has several names?

          1. 'host_groupid' => $host_group['groupid']
          2. $ms_ids = getRequest('groupids', []);
          3. $ms_groupids = getRequest('groupids_subgroups', []);
          4. $ls_groupids = getRequest('group_permissions', []);
            ...

          Alexander Vladishev RESOLVED in r61866

          Ivo Kurzemnieks CLOSED

          Show
          Alexander Vladishev added a comment - - edited (16) [F] Why one entity has several names? ' host_groupid ' => $host_group[' groupid '] $ ms_ids = getRequest(' groupids ', []); $ ms_groupids = getRequest(' groupids_subgroups ', []); $ ls_groupids = getRequest(' group_permissions ', []); ... Alexander Vladishev RESOLVED in r61866 Ivo Kurzemnieks CLOSED
          Hide
          Alexander Vladishev added a comment - - edited

          (17) [F] frontends/php/usergrps.php:449

          1. this code must be rewritten using array_fill_keys() function (http://php.net/manual/en/function.array-fill-keys.php)
          2. if statements are useless here
          if ($ms_ids) {
              $new_permissions = array_fill(0, count($ms_ids), $data['new_permission']);
              $ms_ids = array_combine($ms_ids, $new_permissions);
          }
          
          if ($ms_groupids) {
              $new_permissions_groups = array_fill(0, count($ms_groupids), $data['new_permission']);
              $ms_groupids = array_combine($ms_groupids, $new_permissions_groups);
          }
          

          Ivo Kurzemnieks RESOLVED in r61848

          Alexander Vladishev CLOSED

          Show
          Alexander Vladishev added a comment - - edited (17) [F] frontends/php/usergrps.php:449 this code must be rewritten using array_fill_keys() function ( http://php.net/manual/en/function.array-fill-keys.php ) if statements are useless here if ($ms_ids) { $new_permissions = array_fill(0, count($ms_ids), $data['new_permission']); $ms_ids = array_combine($ms_ids, $new_permissions); } if ($ms_groupids) { $new_permissions_groups = array_fill(0, count($ms_groupids), $data['new_permission']); $ms_groupids = array_combine($ms_groupids, $new_permissions_groups); } Ivo Kurzemnieks RESOLVED in r61848 Alexander Vladishev CLOSED
          Hide
          Alexander Vladishev added a comment - - edited

          (18) [F] $data['usrgrp'] is not used in the view. It can be rewritten using a local variable.

          Ivo Kurzemnieks RESOLVED in r61850

          Alexander Vladishev CLOSED

          Show
          Alexander Vladishev added a comment - - edited (18) [F] $data ['usrgrp'] is not used in the view. It can be rewritten using a local variable. Ivo Kurzemnieks RESOLVED in r61850 Alexander Vladishev CLOSED
          Hide
          Alexander Vladishev added a comment - - edited

          (19) [F] implemented alternative solution to manage user group permissions. Тhe code was reduced by 143 lines.

          RESOLVED in r61866

          Ivo Kurzemnieks Group list gets corrupted and undefined indexes appear in host group form upon error.

          REOPENED

          Alexander Vladishev RESOLVED in r61868

          Ivo Kurzemnieks The alternative solution works a bit differently now. A child group that has permissions "NONE" and no direct parent, is displayed in the list.

          • Example: "A/B/C" has permissions "NONE" and no parents. Neither "A" or "A/B".
          • Example: "D/E/F" has permissions "NONE" and has no direct parent "E/F", but has "D" with same permissions "NONE".

          REOPENED

          Alexander Vladishev Thanks! RESOLVED in r61891

          Ivo Kurzemnieks Nice work.
          CLOSED

          Show
          Alexander Vladishev added a comment - - edited (19) [F] implemented alternative solution to manage user group permissions. Тhe code was reduced by 143 lines. RESOLVED in r61866 Ivo Kurzemnieks Group list gets corrupted and undefined indexes appear in host group form upon error. REOPENED Alexander Vladishev RESOLVED in r61868 Ivo Kurzemnieks The alternative solution works a bit differently now. A child group that has permissions "NONE" and no direct parent, is displayed in the list. Example: "A/B/C" has permissions "NONE" and no parents. Neither "A" or "A/B". Example: "D/E/F" has permissions "NONE" and has no direct parent "E/F", but has "D" with same permissions "NONE". REOPENED Alexander Vladishev Thanks! RESOLVED in r61891 Ivo Kurzemnieks Nice work. CLOSED
          Hide
          Oleg Egorov added a comment - - edited

          (20) [F] Multiselect in host mass update form suggest new elements.

          Gunars Pujats As discussed with Alexander Vladishev hostgroup name validation is done on API side.
          WON'T FIX.

          Show
          Oleg Egorov added a comment - - edited (20) [F] Multiselect in host mass update form suggest new elements. Gunars Pujats As discussed with Alexander Vladishev hostgroup name validation is done on API side. WON'T FIX.
          Hide
          Alexander Vladishev added a comment - - edited

          (21) [F] Added new function getMultiselectGroupIds(). Old function findParentAndChildsForUpdate() must be removed.

          Gunars Pujats RESOLVED in r61878

          Alexander Vladishev TESTED Have a look at my changes in r61894

          Ivo Kurzemnieks CLOSED

          Show
          Alexander Vladishev added a comment - - edited (21) [F] Added new function getMultiselectGroupIds() . Old function findParentAndChildsForUpdate() must be removed. Gunars Pujats RESOLVED in r61878 Alexander Vladishev TESTED Have a look at my changes in r61894 Ivo Kurzemnieks CLOSED
          Hide
          Andris Zeila added a comment - - edited

          (22) [S] Groups created by server during low level host discovery must inherit permissions from their direct parents.
          RESOLVED in r61893

          Alexander Vladishev CLOSED with small fix in r61927

          Show
          Andris Zeila added a comment - - edited (22) [S] Groups created by server during low level host discovery must inherit permissions from their direct parents. RESOLVED in r61893 Alexander Vladishev CLOSED with small fix in r61927
          Hide
          Alexander Vladishev added a comment - - edited

          (23) [S] syntax of the new groups must be validated

          RESOLVED in r61922

          Alexander Vladishev CLOSED

          Show
          Alexander Vladishev added a comment - - edited (23) [S] syntax of the new groups must be validated RESOLVED in r61922 Alexander Vladishev CLOSED
          Hide
          Ivo Kurzemnieks added a comment - - edited

          (24) [F] Is it supposed to be like this?

          Alexander Vladishev RESOLVED in r61944

          Ivo Kurzemnieks Thanks! CLOSED

          Show
          Ivo Kurzemnieks added a comment - - edited (24) [F] Is it supposed to be like this? Alexander Vladishev RESOLVED in r61944 Ivo Kurzemnieks Thanks! CLOSED
          Hide
          Alexander Vladishev added a comment -

          Server side was successfully tested!

          Show
          Alexander Vladishev added a comment - Server side was successfully tested!
          Hide
          Ivo Kurzemnieks added a comment -

          Frontend tested

          Show
          Ivo Kurzemnieks added a comment - Frontend tested
          Hide
          Alexander Vladishev added a comment -

          Available in pre-3.2.0beta1 r61951.

          Show
          Alexander Vladishev added a comment - Available in pre-3.2.0beta1 r61951.
          Hide
          Ivo Kurzemnieks added a comment - - edited

          (25) [D] API documentation added

          Gunars Pujats CLOSED

          Show
          Ivo Kurzemnieks added a comment - - edited (25) [D] API documentation added Gunars Pujats CLOSED
          Hide
          Filipe Paternot added a comment -

          Question: a calculated item works on toplevel group and includes all items below it?

          Show
          Filipe Paternot added a comment - Question: a calculated item works on toplevel group and includes all items below it?
          Hide
          richlv added a comment -

          Filipe Paternot, did you mean an aggregate item ?

          Show
          richlv added a comment - Filipe Paternot , did you mean an aggregate item ?
          Hide
          Filipe Paternot added a comment -

          Yes @richlv. Aggregate checks using group functions like grpsum/grpavg...

          Just to be accurate now, https://www.zabbix.com/documentation/3.0/manual/config/items/itemtypes/aggregate

          Show
          Filipe Paternot added a comment - Yes @richlv. Aggregate checks using group functions like grpsum/grpavg... Just to be accurate now, https://www.zabbix.com/documentation/3.0/manual/config/items/itemtypes/aggregate
          Hide
          richlv added a comment -

          that's a good question which one might or might not have been able to find out in the specification
          in any case, it seems like a good candidate to document somewhere proper - probably in whatsnew, aggregate item and nested group pages ?

          Show
          richlv added a comment - that's a good question which one might or might not have been able to find out in the specification in any case, it seems like a good candidate to document somewhere proper - probably in whatsnew, aggregate item and nested group pages ?
          Hide
          Dimitri Bellini added a comment - - edited

          Hi, i have now checked on zabbix 3.2.0rc1 but i don't understand how dos it work.
          On my mind i supposed this feature work like that:
          1- Create a Host Group called "Linux" with an included host
          2- Create a main level Host Group called "Prod" to include the previous Host Group "Linux" and in that case the host group inherit the host from "Linux" host group

          from my test this flow is not possible, is correct?

          The only way to work seems to assign the single host to both "host Group", one called "Linux" and another one called "Prod/Linux" but i do not understand what benefit we have to the old implementation, may be using through API?
          Could be possible to extend or clarify the documentation?
          Thanks so much

          Show
          Dimitri Bellini added a comment - - edited Hi, i have now checked on zabbix 3.2.0rc1 but i don't understand how dos it work. On my mind i supposed this feature work like that: 1- Create a Host Group called "Linux" with an included host 2- Create a main level Host Group called "Prod" to include the previous Host Group "Linux" and in that case the host group inherit the host from "Linux" host group from my test this flow is not possible, is correct? The only way to work seems to assign the single host to both "host Group", one called "Linux" and another one called "Prod/Linux" but i do not understand what benefit we have to the old implementation, may be using through API? Could be possible to extend or clarify the documentation? Thanks so much
          Hide
          Dimitri Bellini added a comment -

          Nested Host Group View

          Show
          Dimitri Bellini added a comment - Nested Host Group View
          Hide
          Ivo Kurzemnieks added a comment -

          Hello, Dimitri Bellini! No, hosts are not inherited. The inheritance works for permissions and only forward. Meaning that first a parent group must be created. Then, when creating a child group, it will inherit permissions from parent group. If a child group was created first, and then the parent group, permissions to parent group are not inherited from child group. And for example, let's say that a parent group "Prod" has read permissions and a group "Prod/Linux" has read-write permissions. Then creating, a new group "Prod/Windows" this group will gain read permissions from parent. And so will the hosts in this group. Changing permissions to "Prod" we have option to overwrite permissions to all child groups or only the parent group. Which means that future child groups will have different permissions. Hosts, however, can be assigned to multiple groups just like before. And only highest permission from all groups is taken into account. No changes there.

          Show
          Ivo Kurzemnieks added a comment - Hello, Dimitri Bellini ! No, hosts are not inherited. The inheritance works for permissions and only forward. Meaning that first a parent group must be created. Then, when creating a child group, it will inherit permissions from parent group. If a child group was created first, and then the parent group, permissions to parent group are not inherited from child group. And for example, let's say that a parent group "Prod" has read permissions and a group "Prod/Linux" has read-write permissions. Then creating, a new group "Prod/Windows" this group will gain read permissions from parent. And so will the hosts in this group. Changing permissions to "Prod" we have option to overwrite permissions to all child groups or only the parent group. Which means that future child groups will have different permissions. Hosts, however, can be assigned to multiple groups just like before. And only highest permission from all groups is taken into account. No changes there.
          Hide
          Dimitri Bellini added a comment -

          Hi Ivo,
          i think is a very strange implementation because usually, when we talk about "Nested Host Group" we talk about group a logical elements and maybe it is also related to privileges but not strictly only.
          Also from the page "whats new 3.2.0" the title is "Nested host groups" and not "Nested host groups permission", if this implementation is only intended to "Nested host groups permissions" please clarify the related documentation because is not so clear from my point of view.
          Thanks so much

          PS: At the conference on Alexei's speech, i have supposed he talked to a real Nested Host Group solutions

          Show
          Dimitri Bellini added a comment - Hi Ivo, i think is a very strange implementation because usually, when we talk about "Nested Host Group" we talk about group a logical elements and maybe it is also related to privileges but not strictly only. Also from the page "whats new 3.2.0" the title is "Nested host groups" and not "Nested host groups permission", if this implementation is only intended to "Nested host groups permissions" please clarify the related documentation because is not so clear from my point of view. Thanks so much PS: At the conference on Alexei's speech, i have supposed he talked to a real Nested Host Group solutions
          Hide
          richlv added a comment -

          i'm a bit concerned about this part :

          If a child group was created first, and then the parent group, permissions to parent group are not inherited from child group

          how transparent is this ? it seems that user would have no indication on what's going on there.

          regarding host membership, i'd have to agree with Dimitri Bellini - if actual membership is not included in this issue, that prevents aggregate items, unsupported item count items and a few more features from working as expected.

          it should be clearly documented.

          in this case, a specification would have helped to set the expectations right.

          Show
          richlv added a comment - i'm a bit concerned about this part : If a child group was created first, and then the parent group, permissions to parent group are not inherited from child group how transparent is this ? it seems that user would have no indication on what's going on there. regarding host membership, i'd have to agree with Dimitri Bellini - if actual membership is not included in this issue, that prevents aggregate items, unsupported item count items and a few more features from working as expected. it should be clearly documented. in this case, a specification would have helped to set the expectations right.
          Hide
          Martins Valkovskis added a comment - - edited

          (27) [D] Documentation for this feature has been clarified:

          RESOLVED

          Alexander Vladishev Excellent! But information about new possibilities of a filtration is missing. I.e. in multiselects we can select group with all subgroups. For example: Latvia/* or Latvia/Riga/*.

          Scope:
          Monitoring->Dashboard
          Monitoring->Latest data
          Monitoring->Problems
          Reports->Top 100 triggers

          REOPENED

          Martins Valkovskis Updated sections:

          RESOLVED

          Ivo Kurzemnieks Looks good to me.
          CLOSED

          Show
          Martins Valkovskis added a comment - - edited (27) [D] Documentation for this feature has been clarified: What's new Configuring a host group Configuring a user group RESOLVED Alexander Vladishev Excellent! But information about new possibilities of a filtration is missing. I.e. in multiselects we can select group with all subgroups. For example: Latvia/* or Latvia/Riga/* . Scope: Monitoring->Dashboard Monitoring->Latest data Monitoring->Problems Reports->Top 100 triggers REOPENED Martins Valkovskis Updated sections: Dashboard (filter details) Problems (filter details) Latest data (filter details) Trigger top 100 (filter details) RESOLVED Ivo Kurzemnieks Looks good to me. CLOSED
          Hide
          Dimitri Bellini added a comment - - edited

          Hi Martins,
          thanks for the updated documentation but this is a very "difficult" understanding feature.
          Because you say "Having a built-in mechanism for a logical grouping of host groups is something that is very much required, especially in larger organizations" and yes this is what we want but after that you say "first steps towards nested host groups have been taken by allowing a nested representation of host groups and aligning the permission schema to host group nesting" so this first step is only usable for host/host group permissions.
          So my concern is, we can still call "Nested representation of host groups" on "whats new" page? From my point of view is better to hide this new feature to not create false hope or to create misunderstanding.
          But this is only my opinion
          After all my words, thanks for your great hard work and is pleasure to with the Zabbix Team!

          Show
          Dimitri Bellini added a comment - - edited Hi Martins, thanks for the updated documentation but this is a very "difficult" understanding feature. Because you say "Having a built-in mechanism for a logical grouping of host groups is something that is very much required, especially in larger organizations" and yes this is what we want but after that you say "first steps towards nested host groups have been taken by allowing a nested representation of host groups and aligning the permission schema to host group nesting" so this first step is only usable for host/host group permissions. So my concern is, we can still call "Nested representation of host groups" on "whats new" page? From my point of view is better to hide this new feature to not create false hope or to create misunderstanding. But this is only my opinion After all my words, thanks for your great hard work and is pleasure to with the Zabbix Team!
          Hide
          Martins Valkovskis added a comment -

          Dimitri,
          We cannot hide this feature because it was approved and developed and presumably bringing benefit to some users. But, other than that, I understand your concern. Intuitively a different implementation is expected.

          Show
          Martins Valkovskis added a comment - Dimitri, We cannot hide this feature because it was approved and developed and presumably bringing benefit to some users. But, other than that, I understand your concern. Intuitively a different implementation is expected.
          Hide
          Dimitri Bellini added a comment -

          Hi Martin,
          I have understood but i suggest to reduce the enphasys of that feature to reduce every other kind of discussion I talk about this part extracted from the press-release "Now the navigation process across Zabbix monitored devices is also simplified with the appearance of nested host groups."

          Show
          Dimitri Bellini added a comment - Hi Martin, I have understood but i suggest to reduce the enphasys of that feature to reduce every other kind of discussion I talk about this part extracted from the press-release "Now the navigation process across Zabbix monitored devices is also simplified with the appearance of nested host groups."
          Hide
          richlv added a comment -

          looks like "Fix Version/s" has not been set for this issue, and it is still in an "open" state.
          if it was included in 3.2, those two things do not seem to be correct.

          Show
          richlv added a comment - looks like "Fix Version/s" has not been set for this issue, and it is still in an "open" state. if it was included in 3.2, those two things do not seem to be correct.
          Hide
          richlv added a comment -

          this introduced a typo in a variable name : ZBX-11238

          Show
          richlv added a comment - this introduced a typo in a variable name : ZBX-11238
          Hide
          Dimitri Bellini added a comment -

          As discussed with Alexei Vladishev, this new feature is the real implementation of the "Nested Host Group" and is not only limited to "permissions". So i hope in a new implementation for the Web Frontend (better user experience) maybe on zabbix 3.2.1 or 3.4.
          Thanks for you great work!

          Show
          Dimitri Bellini added a comment - As discussed with Alexei Vladishev, this new feature is the real implementation of the "Nested Host Group" and is not only limited to "permissions". So i hope in a new implementation for the Web Frontend (better user experience) maybe on zabbix 3.2.1 or 3.4. Thanks for you great work!
          Hide
          Aleksandrs Saveljevs added a comment -

          Not sure, but maybe ZBXNEXT-3451 is meant to improve it further.

          Show
          Aleksandrs Saveljevs added a comment - Not sure, but maybe ZBXNEXT-3451 is meant to improve it further.
          Hide
          Dimitri Bellini added a comment -

          Yes it is another Web Frontend handicap of the actual implementation but for example is not possible to disable/enable all hosts of a main HostGroup A. Below example

          Main Group : Production
          SubGroup: Linux (5 hosts)
          SubGroup: Windows (10 hosts)

          From Zabbix Configuration->Host Group i will supposed to view all hosts belong to "Production" provided by the two subgroup "Linux" and "Windows" for a total of 15 hosts. Actually we see a void "Production" hostgroup and other two host group.

          So a better Web Frontend implementation is need for the User, this my personal opinion

          Show
          Dimitri Bellini added a comment - Yes it is another Web Frontend handicap of the actual implementation but for example is not possible to disable/enable all hosts of a main HostGroup A. Below example Main Group : Production SubGroup: Linux (5 hosts) SubGroup: Windows (10 hosts) From Zabbix Configuration->Host Group i will supposed to view all hosts belong to "Production" provided by the two subgroup "Linux" and "Windows" for a total of 15 hosts. Actually we see a void "Production" hostgroup and other two host group. So a better Web Frontend implementation is need for the User, this my personal opinion
          Hide
          Mehmet Ali Buyukkarakas added a comment - - edited

          Personally I have also opinions and feelings about the nested groups.

          Its very usefull and one of the biggest tactical things about managing lots of hosts and objects. But not that way.

          'Nesting' means for me also grouping and filtering.

          When I saw the results of this issue, first I didnt understood the reason. Today either....

          Thank you for your effort but we need a real and working nested group design.

          Best regards.

          Show
          Mehmet Ali Buyukkarakas added a comment - - edited Personally I have also opinions and feelings about the nested groups. Its very usefull and one of the biggest tactical things about managing lots of hosts and objects. But not that way. 'Nesting' means for me also grouping and filtering. When I saw the results of this issue, first I didnt understood the reason. Today either.... Thank you for your effort but we need a real and working nested group design. Best regards.
          Hide
          J. van Stijn added a comment -

          Ok, so I just finished my long postponed upgrade to 3.2.5

          I was wondering why the "nested groups" thing wasn't working as I was expecting.
          As I didn't read up too well on this item (aside from "topic closed, we fixed it") I went back to this item and read the comments. Upon reading the comments I now understand that the current implementation is totally not where I put my "+1" in for. Basically I couldn't agree more with Dimitri Bellini!

          It's a bit strange that the current item is closed because the implementation doesn't fit the original description at all.
          When you read the second and third line of the original post: "There should be a hierarchical display for viewing such groups in most places.
          All group dropdown selectors should show groups hierarchically whenever possible (a lot of subgroups could expand them a lot)." This clearly does not speak solely about group permissions but nested groups throughout Zabbix (especially graphically imho).

          Oh well. At least it's a step in the right direction. Can't wait for some real nested (intuitive) group feature.

          Show
          J. van Stijn added a comment - Ok, so I just finished my long postponed upgrade to 3.2.5 I was wondering why the "nested groups" thing wasn't working as I was expecting. As I didn't read up too well on this item (aside from "topic closed, we fixed it") I went back to this item and read the comments. Upon reading the comments I now understand that the current implementation is totally not where I put my "+1" in for. Basically I couldn't agree more with Dimitri Bellini! It's a bit strange that the current item is closed because the implementation doesn't fit the original description at all. When you read the second and third line of the original post: "There should be a hierarchical display for viewing such groups in most places. All group dropdown selectors should show groups hierarchically whenever possible (a lot of subgroups could expand them a lot)." This clearly does not speak solely about group permissions but nested groups throughout Zabbix (especially graphically imho). Oh well. At least it's a step in the right direction. Can't wait for some real nested (intuitive) group feature.

            People

            • Assignee:
              Unassigned
              Reporter:
              richlv
            • Votes:
              93 Vote for this issue
              Watchers:
              56 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Agile