Page 1 of 1
View User with Limited Access does not work
Posted: Fri Dec 09, 2016 6:55 am
by mopp
Hello,
I created a user with limited access (the option can see all objects objects is disabled). The user is only allowed to see a certain host.
When the user logs in to Nagios XI the user sees only the host and all its services.
But when the user clicks on the host or the service only a blank page is shown. When I check the HTTP Error Codes I see a HTTP Error 500
Nagios 5.3.3
Can anybody confirm this problem?
Re: View User with Limited Access does not work
Posted: Fri Dec 09, 2016 8:48 am
by eloyd
Users who log in to the GUI are allowed to see anything for which they are configured to receive notifications (even if notifications are disabled). Not sure about your blank page though.
Re: View User with Limited Access does not work
Posted: Fri Dec 09, 2016 11:13 am
by avandemore
Can you attach or PM /var/log/*_log along with full browser screenshot of the blank page issue?
Has there been any alterations from default to Apache configs?
Re: View User with Limited Access does not work
Posted: Tue Dec 13, 2016 3:32 am
by mopp
Hello,
sorry for the delay. I attached the screenshots.
This is a screenshot from our test system. I' m logged in with a normal user.
Authorization Level: User
nagios_security.jpg
I assigned this contact only to the host.
nagios.jpg
I see the hosts and all services, but this AD test user is not in the notification list for the services. Only for the host.
It is possible to view the performance graph from the Host and the Services, which should not be possible for the services because I' m not in the notification list.
When I click on localhost I' ll get the error 500.
error_500.jpg
Regarding the log files. I attached the interessting parts here. Let me know if you need more.
This will appear when you click on the host and get the error 500.
error_log:
Code: Select all
[Tue Dec 13 09:24:09 2016] [error] [client 10.216.16.203] PHP Warning: DOMDocument::loadHTML(): Unexpected end tag : p in Entity, line: 56 in /usr/local/nagiosxi/html/includes/components/objconfig/objconfig.inc.php on line 171, referer: http://testnagios.mydomain.com/nagiosxi/includes/components/xicore/status.php?show=hosts
[Tue Dec 13 09:24:09 2016] [error] [client 10.216.16.203] PHP Warning: DOMDocument::loadHTML(): Unexpected end tag : p in Entity, line: 57 in /usr/local/nagiosxi/html/includes/components/objconfig/objconfig.inc.php on line 171, referer: http://testnagios.mydomain.com/nagiosxi/includes/components/xicore/status.php?show=hosts
[Tue Dec 13 09:24:09 2016] [error] [client 10.216.16.203] PHP Fatal error: Call to a member function getElementsByTagName() on a non-object in /usr/local/nagiosxi/html/includes/components/objconfig/objconfig.inc.php on line 176, referer: http://testnagios.mydomain.com/nagiosxi/includes/components/xicore/status.php?show=hosts
access_log:
Code: Select all
10.123.123.123 - - [13/Dec/2016:09:24:03 +0100] "GET /nagiosxi/ajaxhelper.php?cmd=getxicoreajax&opts=%7B%22func%22%3A%22get_pagetop_alert_content_html%22%2C%22args%22%3A%22%22%7D&nsp=0fee30a598ade0a4138b3d584db88c614c549604f700bced1812ace531f7d013 HTTP/1.1" 200 - "http://testnagios.mydomain.com/nagiosxi/index.php" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
10.12.12.12 - - [13/Dec/2016:09:24:08 +0100] "GET /nagiosxi/includes/components/nagioscore/ui/config.php?type=hosts&expand=localhost HTTP/1.0" 200 2898 "-" "-"
10.123.123.123 - - [13/Dec/2016:09:24:08 +0100] "GET /nagiosxi/includes/components/xicore/status.php?show=hostdetail&host=localhost HTTP/1.1" 500 - "http://testnagios.mydomain.com/nagiosxi/includes/components/xicore/status.php?show=hosts" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
127.0.0.1 - - [13/Dec/2016:09:24:10 +0100] "POST /nagiosxi/backend/ HTTP/1.1" 200 1589 "-" "BinGet/1.00.A (http://www.bin-co.com/php/scripts/load/)"
127.0.0.1 - - [13/Dec/2016:09:24:10 +0100] "POST /nagiosxi/backend/ HTTP/1.1" 200 1589 "-" "BinGet/1.00.A (http://www.bin-co.com/php/scripts/load/)"
Re: View User with Limited Access does not work
Posted: Tue Dec 13, 2016 11:43 am
by lmiltchev
It seems like the issue is caused by the object component that you installed in Nagios XI. I would assume that you are the author of the component below judging by the username:
https://exchange.nagios.org/directory/A ... on/details
It is possible that we introduced some changes in the newer versions of Nagios XI that caused the component to fail...
FYI, when I installed the component on my test XI box, I was able to reproduce the issue - clicking on the host would result in a blank page, and I would get errors as the one below:
Code: Select all
[Tue Dec 13 10:10:53.551553 2016] [:error] [pid 35090] [client 192.168.x.x:58864] PHP Fatal error: Call to a member function getElementsByTagName() on a non-object in /usr/local/nagiosxi/html/includes/components/objconfig/objconfig.inc.php on line 174, referer: http://192.168.x.x/nagiosxi/includes/components/xicore/status.php?show=hosts
Removing the component fixed the issue for me. Hope this helps.
Re: View User with Limited Access does not work
Posted: Tue Dec 13, 2016 7:12 pm
by mopp
Thanks for the hint, I was blind, just didn' t recognise the name.
I uploaded a new version of the component which will handle the situation with users with limited access
You can close this thread.
Re: View User with Limited Access does not work
Posted: Tue Dec 13, 2016 10:34 pm
by eloyd
I'll have to go check out the component. Looks interesting.
Re: View User with Limited Access does not work
Posted: Wed Dec 14, 2016 10:23 am
by rkennedy
Awesome - are we good to mark this thread as resolved?
Re: View User with Limited Access does not work
Posted: Thu Dec 15, 2016 2:58 am
by mopp
rkennedy wrote:Awesome - are we good to mark this thread as resolved?
Yes, please close it.