Multi-Tenancy and Hypermap

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
jacek
Posts: 255
Joined: Wed Sep 09, 2015 5:49 am

Multi-Tenancy and Hypermap

Post by jacek »

Hello,

I'm trying out the Multi-Tenancy functionality in Nagios XI, which seems to work very well for the purposes I'm aiming at, but (why there always needs to be a but? :-P) the hypermap is not working.

I've added one user, with the following permissions:
Security.PNG
Now, I've added him to notification list on 7 hosts, starting up from the "localhost" and ending up at some end point.
The child/parent configuration is like this 1->2->3->4->5->6->7.
When I go to the hypermap view, there is an error showing, that: "You are not authorized to view all hosts and services."

Can this be somehow "fixed", so it would only view the hosts that the user can monitor?
Hypermap is really simple and cool, but I don't want to give access everybody to view all hosts so they can run hypermap...

BTW.
The Network Status Map is working almost fine, showing only the 7 hosts, connected to each other in the balloon view, but in the tree view it looks like it is only "hiding" all the other hosts so at my 100 hosts this looks really stupid:
You do not have the required permissions to view the files attached to this post.
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Multi-Tenancy and Hypermap

Post by hsmith »

What version of XI are you running? I can attempt to reproduce these and file bug reports.
Former Nagios Employee.
me.
jacek
Posts: 255
Joined: Wed Sep 09, 2015 5:49 am

Re: Multi-Tenancy and Hypermap

Post by jacek »

Hi, I'm on Nagios XI 5.2.2 (the latest one), thus didn't check this solution on the previous versions, but suppose this didn't work either...
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Multi-Tenancy and Hypermap

Post by hsmith »

slytheer wrote:When I go to the hypermap view, there is an error showing, that: "You are not authorized to view all hosts and services."
I can reproduce this, but for now, it sounds like this going to be the intended functionality. We may make some enhancements to make it less deceptive, and remove the link, but right now it's not changing.
slytheer wrote:The Network Status Map is working almost fine, showing only the 7 hosts, connected to each other in the balloon view, but in the tree view it looks like it is only "hiding" all the other hosts so at my 100 hosts this looks really stupid:
I could put in a feature request, but I can't promise any sort of timeline. What would you like to see it do instead?
Former Nagios Employee.
me.
jacek
Posts: 255
Joined: Wed Sep 09, 2015 5:49 am

Re: Multi-Tenancy and Hypermap

Post by jacek »

hsmith wrote:I can reproduce this, but for now, it sounds like this going to be the intended functionality. We may make some enhancements to make it less deceptive, and remove the link, but right now it's not changing.
That's bad, hypermap is briliant in it's simplicity, I think it would be better to let hypermap process only the viewable host for the current user.
hsmith wrote:I could put in a feature request, but I can't promise any sort of timeline. What would you like to see it do instead?
To act as the hosts that are viewable by this user were the only ones.
So the tree wouldn't get that split up, because of all those "hidden" hosts.
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Multi-Tenancy and Hypermap

Post by hsmith »

slytheer wrote:To act as the hosts that are viewable by this user were the only ones.
So the tree wouldn't get that split up, because of all those "hidden" hosts.
It gets tricky when you have parents though, since it kind of indicates 'levels'.

Do you think it should look almost like a 'spiral?' Have you compared it with something that doesn't have parents?
Former Nagios Employee.
me.
jacek
Posts: 255
Joined: Wed Sep 09, 2015 5:49 am

Re: Multi-Tenancy and Hypermap

Post by jacek »

Maybe I expressed this wrong.
The levels in the tree are ok, this is what it's made for, but it gets to wide because of all of the hidden hosts, it should be almost like the balloon view when there is only one route, shouldn't it?
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Multi-Tenancy and Hypermap

Post by tmcdonald »

I think I understand what you're saying, I am just not a very artistic person so I can't photoshop it up :)

Consider this though: Host A is a child of Host B which itself is a child of Host C. You are a contact assigned only to A and C - what should it display in this case? Clearly there is a host between A and C but since you are not allowed to view it removing it would imply that A is a direct child of C, which is not true.

For the tree view I suppose we could indicate there are hosts for which a user does not have permissions, and just collapse/condense them. Is this more of what you were looking for?
Former Nagios employee
jacek
Posts: 255
Joined: Wed Sep 09, 2015 5:49 am

Re: Multi-Tenancy and Hypermap

Post by jacek »

Hi,

I got hypermap working the way I want.
It now displays only the hosts that the user can see and if there are nodes that have no parents they get attached to nagios process (as it is when You don't define relationships).

To get this done open this file:

Code: Select all

/usr/local/nagiosxi/html/includes/components/hypermap/index.php
And comment out the whole section:

Code: Select all

    // Only certain people can see this
    if (is_authorized_for_all_objects() == false) {
        echo gettext("You are not authorized to view all hosts and services.");
        exit();
    }
Like this:

Code: Select all

    // Only certain people can see this
    //if (is_authorized_for_all_objects() == false) {
    //    echo _("You are not authorized to view all hosts and services.");
    //    exit();
    //}
This will prevent hypermap checking if the user "is_authorized_for_all_objects".

Most propably this will be overwritten by any hypermap update.

BTW. it would be nice if this section could be enabled and disabled from hypermap component configuration and disabled by default.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Multi-Tenancy and Hypermap

Post by rkennedy »

Thanks for letting us know how you solved this! I went ahead, and filed a feature request with our developers to add this in. The ID is #7668.

Do you mind if we close this thread out now, as the FR has been filed?
Former Nagios Employee
Locked