Page 1 of 1
Hosts not being displayed in Hypermap
Posted: Wed Sep 02, 2015 2:41 am
by Fred Kroeger
When a user is set to "User" and "Can access advanced features" they can no longer display the hosts that they are allowed to see in Hypermap. They get a message "Not authorized to view all hosts and services". In the Host details page, they can see all the hosts for their contact group.
This used to work in previous versions of NagiosXI but not very well. Hypermap would still scale the map for all the hosts and then just display the allowed hosts. When you have ~800 hosts, the screen got very hard to read.
Any ideas/thoughts on what's happened?
I'm running NagiosXI 2014R2.7
thank...... Fred
Re: Hosts not being displayed in Hypermap
Posted: Wed Sep 02, 2015 8:55 am
by lmiltchev
This used to work in previous versions of NagiosXI but not very well. Hypermap would still scale the map for all the hosts and then just display the allowed hosts.
In what version of Nagios XI this used to work? I tested it in Nagios XI 2014R2.6 and I got "You are not authorized to view all hosts and services." (as in Nagios XI 2014R2.7).
Re: Hosts not being displayed in Hypermap
Posted: Mon Sep 07, 2015 2:36 am
by Fred Kroeger
Hmm.... you could be right. I think I'm getting mixed up with Network Status Map which does still work
Anyway - I tracked down an old post of this which it appears that I logged using an old account -
https://support.nagios.com/forum/viewto ... per#p99424
What do we need to do to get this working for a Multi-Tenant Scenario?
It is critical that users can only see the hosts they are authorised to view.
Hypermap is the only option as the Network Status Map is now even more useless with ~780 hosts it is trying to squeeze on the screen.
regards... Fred
Re: Hosts not being displayed in Hypermap
Posted: Tue Sep 08, 2015 3:17 pm
by ssax
Try this and see if it works for you, edit this file:
Code: Select all
/usr/local/nagiosxi/html/includes/components/hypermap/index.php
Change this code:
Code: Select all
if (is_authorized_for_all_objects() == false) {
echo gettext("You are not authorized to view all hosts and services.");
exit();
}
To:
Code: Select all
// if (is_authorized_for_all_objects() == false) {
// echo gettext("You are not authorized to view all hosts and services.");
// exit();
// }
Re: Hosts not being displayed in Hypermap
Posted: Tue Sep 08, 2015 3:17 pm
by ssax
*** I should note that this will be reverted on an upgrade and have to be re-implemented.
Re: Hosts not being displayed in Hypermap
Posted: Tue Sep 08, 2015 9:32 pm
by Fred Kroeger
Brilliant! It works as expected! Thanks very much ssax!
The user is able to see only the hosts they are allowed to see in Hypermap.
Ludmil - this was submited as a feature request some time ago.
http://tracker.nagios.com/view.php?id=543
Based on the solution provided by ssax - is there any reason why it can't be implemented ?
regards.... Fred
Re: Hosts not being displayed in Hypermap
Posted: Wed Sep 09, 2015 9:51 am
by lmiltchev
Fred, I just heard back from our developers. They are not going to implement this for the time being as other (better) options are being considered.
The problem with this "workaround" is that the Hypermap wouldn't display the parent/child relationships accurately.
For example, if you had a host with no parent, it would be connected "directly" to the "Nagios Process". However, if you had a host with a parent, and your user was not authorized to see the parent, in the "Network Status" map you will see a blank space (no lines) between the "Nagios Process" and the "child". This would be a "correct" representation of the parent/child relationship.
In "Hypermap", however ALL of the hosts (with or without parents) will be connected DIRECTLY to the "Nagios Process", which is NOT correct. See the picture below (for comparison):
example01.PNG
example02.PNG
Re: Hosts not being displayed in Hypermap
Posted: Wed Sep 09, 2015 9:42 pm
by Fred Kroeger
Thanks Ludmil
Let's hope the developers come up with some "better options" - however this is working perfectly for me.
I have set this up as a Multi-Tenant environment, and created a Dummy Host "Site-XXX" which is the parent for all the nodes for that client, so it appears to display correctly.
Nagios Process is in the Centre which connects to SITE-XXX which then connects to each router/gateway for that client which in turn connect to the devices behind them
Regards.. Fred
Re: Hosts not being displayed in Hypermap
Posted: Thu Sep 10, 2015 9:11 am
by lmiltchev
Fred, I am glad it's working fine for you... and thanks for the feedback! Is it OK if we lock this thread now?