Ad Widget

Collapse

User Permissions to IT Services View?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • harmonica
    Senior Member
    • Jan 2009
    • 251

    #16
    In our company we are hopeful that this function is implemented by the Zabbix team.

    Regards

    Comment

    • harmonica
      Senior Member
      • Jan 2009
      • 251

      #17
      Originally posted by richlv
      it's currently not on the roadmap (some of which you can see here - https://zabbix.org/wiki/Docs/roadmap )
      I believe that this feature will not be implemented unfortunately

      Comment

      • jones12ax7
        Junior Member
        • Dec 2013
        • 1

        #18
        Workaround working on 2.2.1

        Originally posted by harmonica
        Hi,

        Does anyone have similar patch for 2.0 or above?

        Best regards
        With a bit of hack, I managed to get it working with 2.2.1 easily. Sorry for the messy code. At last it works nice for me.

        In the include/services.inc.php, locate and change the "if" block bellow. This is the one right after the comment: // hard dependencies and dependencies for the "root" node

        Code:
                if (!$dependency || $dependency['soft'] == 0) {
        
                        // Define 3 vars to define if it will be visible
                        $nparents = -1;
                        if(array_key_exists('parent',$service)){
                                $nparents = count($service['parent']);
                        }
        
                        $ndeps = count($service['dependencies']);
        
                        $ntrigs = count($service['trigger']);
        
                        // Show logic
                        if( !( $nparents ==0 && $ndeps==0 && $ntrigs==0)   ){
                                $tree[$serviceNode['id']] = $serviceNode;
        
                                foreach ($service['dependencies'] as $dependency) {
        
                                        $childService = $services[$dependency['servicedownid']];
        
                                        createServiceMonitoringTree($services, $slaData, $period, $tree, $service, $childService, $dependency);
                                }
                        }
                }
        The idea is to get 3 informations to about the service to decide if it should be visible or not:

        1) Does it has root as parent? ( check if the $service['parent'] is blank)
        2) This is a simple server without childrens? That is, does it have any trigger?
        3) Does it have any children? That is, the last one in the tree branch?

        Based on this, if it's a top level service, do not have any children and has no trigger, it should not be seen.

        Probably there's a better way to do it, but I'm too lazy to go deep on how the code works. It would be nice if Zabbix guys could implement this on future versions.

        Hope it helps someone.

        Jonathan
        Last edited by richlv; 25-06-2015, 11:27.

        Comment

        • harmonica
          Senior Member
          • Jan 2009
          • 251

          #19
          Hi Jonathan,

          Thanks. We will test and give feedback.

          Regards

          Comment

          • tpramos
            Junior Member
            • Feb 2010
            • 13

            #20
            Originally posted by jones12ax7
            With a bit of hack, I managed to get it working with 2.2.1 easily. Sorry for the messy code. At last it works nice for me.

            In the include/services.inc.php, locate and change the "if" block bellow. This is the one right after the comment: // hard dependencies and dependencies for the "root" node

            Code:
                    if (!$dependency || $dependency['soft'] == 0) {
            
                            // Define 3 vars to define if it will be visible
                            $nparents = -1;
                            if(array_key_exists('parent',$service)){
                                    $nparents = count($service['parent']);
                            }
            
                            $ndeps = count($service['dependencies']);
            
                            $ntrigs = count($service['trigger']);
            
                            // Show logic
                            if( !( $nparents ==0 && $ndeps==0 && $ntrigs==0)   ){
                                    $tree[$serviceNode['id']] = $serviceNode;
            
                                    foreach ($service['dependencies'] as $dependency) {
            
                                            $childService = $services[$dependency['servicedownid']];
            
                                            createServiceMonitoringTree($services, $slaData, $period, $tree, $service, $childService, $dependency);
                                    }
                            }
                    }
            The idea is to get 3 informations to about the service to decide if it should be visible or not:

            1) Does it has root as parent? ( check if the $service['parent'] is blank)
            2) This is a simple server without childrens? That is, does it have any trigger?
            3) Does it have any children? That is, the last one in the tree branch?

            Based on this, if it's a top level service, do not have any children and has no trigger, it should not be seen.

            Probably there's a better way to do it, but I'm too lazy to go deep on how the code works. It would be nice if Zabbix guys could implement this on future versions.

            Hope it helps someone.

            Jonathan
            Jonathan, If I have more one tree level before a child with trigger, all user cam see this level, but not the child
            Ex:
            Root
            -> Site1
            ->Servers
            -> Windows Servers: trigger
            -> Linux Server: trigger
            ->Networking
            ->Switches: trigger
            -> Routers: trigger


            -> Site2
            ->Servers
            -> Windows Servers: trigger
            -> Linux Server: trigger
            ->Networking
            ->Switches: trigger
            -> Routers: trigger

            All users can see until Servers and Networking

            Comment

            • rekeds
              Junior Member
              • Feb 2014
              • 21

              #21
              this is sad ;[

              Comment

              • bbs2web
                Junior Member
                • Apr 2016
                • 22

                #22
                Yes, I'm replying to a 7 year old thread...

                It appears Zabbix 6 has merged the following patch, which easily applied to our aging 3.4 installation. Planning on upgrading this Easter, to 6 TLS

                After a long time, here's another (short) post. WH1 is eating up my time. I decided to post just in English from now on, as it will broaden ...


                This will essentially filter out all children 'branches' where the logged in user doesn't have access to the devices.

                Comment

                Working...