Slow Screen display in NagiosXI for non-Admin Users

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Fred Kroeger
Posts: 588
Joined: Wed Oct 19, 2011 11:36 pm
Location: Perth, Western Australia
Contact:

Slow Screen display in NagiosXI for non-Admin Users

Post by Fred Kroeger »

I have observed a huge difference in the display of screens in NagiosXI for non-Admin users.
As an examle, simple screens such as Host Status Detail or Service Status Detail are taking approx 60 seconds to display. This has been tested on both Firefox & Chrome browsers.
The same pages using the same browsers on the same desktop take 3 seconds to display for an Admin user.

When the non-Admin user selects one of the Status Details Page, the top part of the screen (up to the four icons -view status/notifications/history/availability) displays immediately, the rest of the screen (from the tabs onwards) is what takes 1minute to display.

System profile follows:

Code: Select all

Nagios XI Installation Profile
System:
Nagios XI Version : 5.2.9
nagios.X.com.au 2.6.32-358.23.2.el6.x86_64 x86_64
CentOS release 6.4 (Final)
Gnome Installed
Apache Information
PHP Version: 5.3.3
Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:47.0) Gecko/20100101 Firefox/47.0
Server Name: nagios
Server Address: X.X.X.X
Server Port: 80
Date/Time
PHP Timezone: Australia/X
PHP Time: Fri, 29 Jul 2016 12:47:01 +0800
System Time: Fri, 29 Jul 2016 12:47:01 +0800
Nagios XI Data
License ends in: X

nagios (pid 27906) is running...
NPCD running (pid 2671).
ndo2db (pid 37191) is running...
CPU Load 15: 9.73
Total Hosts: 468
Total Services: 4393
Function 'get_base_uri' returns: http://nagios/nagiosxi/
Function 'get_base_url' returns: http://nagios/nagiosxi/
Function 'get_backend_url(internal_call=false)' returns: http://nagios/nagiosxi/includes/components/profile/profile.php
Function 'get_backend_url(internal_call=true)' returns: http://localhost/nagiosxi/backend/
Ping Test localhost
Running:

/bin/ping -c 3 localhost 2>&1 

PING localhost (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.026 ms
64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.031 ms
64 bytes from localhost (127.0.0.1): icmp_seq=3 ttl=64 time=0.037 ms

--- localhost ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2000ms
rtt min/avg/max/mdev = 0.026/0.031/0.037/0.006 ms
Test wget To localhost
WGET From URL: http://localhost/nagiosxi/includes/components/ccm/
Running:

/usr/bin/wget http://localhost/nagiosxi/includes/components/ccm/ 

--2016-07-29 12:47:03-- http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... ::1, 127.0.0.1
Connecting to localhost|::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: "/usr/local/nagiosxi/tmp/ccm_index.tmp"

0K ......... 219K=0.05s

2016-07-29 12:47:04 (219 KB/s) - "/usr/local/nagiosxi/tmp/ccm_index.tmp" saved [10132]

Network Settings

1: lo:  mtu 16436 qdisc noqueue state UNKNOWN 

    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00

    inet 127.0.0.1/8 scope host lo

    inet6 ::1/128 scope host 

       valid_lft forever preferred_lft forever

2: eth0:  mtu 1500 qdisc pfifo_fast state UP qlen 1000

    link/ether 00:0c:29:98:e3:54 brd ff:ff:ff:ff:ff:ff

    inet X.X.X.X/24 brd X.X.X.255 scope global eth0

    inet6 x::x:x:x:x/64 scope link 

       valid_lft forever preferred_lft forever


X.X.0.0/24 dev eth0  proto kernel  scope link  src X.X.X.X 

X.X.0.0/16 dev eth0  scope link  metric 1002 

default via X.X.X.1 dev eth0 
regards... Fred
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Slow Screen display in NagiosXI for non-Admin Users

Post by Box293 »

Fred,
Can you have a look at this forum post and see if any of this helps:

https://support.nagios.com/forum/viewto ... 74#p188567

If possible I would like to see if you can access XI from a machine in the same subnet as the XI server and see if the problem occurs.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Fred Kroeger
Posts: 588
Joined: Wed Oct 19, 2011 11:36 pm
Location: Perth, Western Australia
Contact:

Re: Slow Screen display in NagiosXI for non-Admin Users

Post by Fred Kroeger »

Thanks Troy - it might be a task to get access to another machine in that subnet.
I had a quick look at the forum link and it looks like what I am experiencing - however there is no reolution listed?
Personally, I can't see it being a network/firewall/dns issue as exactly the same desktop and browser are used to login as both a Nagios user & Nagios Admin user.

The user account has "See all objects" & "Can access advanced features" selected
I did some further testing as per the OP and can confirm that the screen displayed normally when I unticked "Can access advanced features".
When I tick it again, the screen delay comes back.

regards... Fred
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Slow Screen display in NagiosXI for non-Admin Users

Post by lmiltchev »

When the "admin" views the data, all of the objects are shown right away (there are no checks in place to verify that the user is actually "authorized" to view the objects). If this is a "non-admin" user, there are checks in place. I would imagine, if you had a very large environment, it would take some time to go through all objects. How many hosts/services are you monitoring?

FYI, I am not able to recreate the issue but I am not monitoring too many hosts/services. In any case, I am going to discuss the issue with our developers to see if they can provide you with a possible solution.
Be sure to check out our Knowledgebase for helpful articles and solutions!
sujitt
Posts: 132
Joined: Thu Apr 25, 2013 1:50 pm

Re: Slow Screen display in NagiosXI for non-Admin Users

Post by sujitt »

I am having the exact same issue just starting today. I am finding even going to services from core config does not load. Is something going on? even for admin users.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Slow Screen display in NagiosXI for non-Admin Users

Post by lmiltchev »

@sujitt
This may/may not be the same issue. Please start your own (separate) thread. Explain in details the issue that you are having. Show relevant logs, screenshots, etc.

@Fred Kroeger
I am sorry - somehow I failed to see the number of hosts/services that you are monitoring. They are not too many. It is strange that it takes 60 sec or more to load the page.

Let's try the following:

1. Open the "/usr/local/nagiosxi/html/includes/utils-objects.inc.php" file in a text editor, and change the line below the " is_authorized_for_object_id" function (around line 963) from this:

Code: Select all

$debug = false;
to this:

Code: Select all

$debug = true;
2. Log in as a "non-admin" user, click on a host or a service under Host/Service Detail page, and show us a screenshot.
Be sure to check out our Knowledgebase for helpful articles and solutions!
sujitt
Posts: 132
Joined: Thu Apr 25, 2013 1:50 pm

Re: Slow Screen display in NagiosXI for non-Admin Users

Post by sujitt »

I logged in as normal user and it works fine. It looks like when I login as admin user I have the service detail screen not loading at all.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Slow Screen display in NagiosXI for non-Admin Users

Post by tmcdonald »

sujitt wrote:I logged in as normal user and it works fine. It looks like when I login as admin user I have the service detail screen not loading at all.
As @lmiltchev mentioned, please open a separate thread for your issue as another customer opened this one and we need to keep them separate.
Former Nagios employee
Fred Kroeger
Posts: 588
Joined: Wed Oct 19, 2011 11:36 pm
Location: Perth, Western Australia
Contact:

Re: Slow Screen display in NagiosXI for non-Admin Users

Post by Fred Kroeger »

Sorry for the delay - been away for a couple of days.
Good & bad news first. I have tested this on the test Nagios instance at this site and while it is monitoring fewer servers, there doesn't appear to be any difference with the speed of the screen displays. I have now tested this at another Site and didn't see any difference either. So it would appear that the problems I am having are restricted to just the one Nagios instance. (They are all set-up much the same and are all using the same version of NagiosXI)

With Advanced Features turned on (60 sec delay in displaying screen)
Advanced-Features-On.PNG
With Advanced features turned off (no delay)
Advanced-Features-Off.PNG
You do not have the required permissions to view the files attached to this post.
bheden
Product Development Manager
Posts: 179
Joined: Thu Feb 13, 2014 9:50 am
Location: Nagios Enterprises

Re: Slow Screen display in NagiosXI for non-Admin Users

Post by bheden »

Fred,

For further debugging, please fire up your text editor of choice and open the file /html/includes/components/xicore/ajaxhelpers-hoststatus.inc.php. In the function xicore_ajax_get_host_status_quick_actions_html (around line 562) there is a line:

Code: Select all

$auth_command = is_authorized_for_host_command(0, $hostname);
Comment that line out, and then directly underneath it add:

Code: Select all

$auth_command = true;
So, when finished it should look like this:

Code: Select all

//$auth_command = is_authorized_for_host_command(0, $hostname);
$auth_command = true;
Now, try viewing the Host Status pages again with 'Advanced Features' turned on and let us know if there is any speed difference.

Thanks.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Nagios Enterprises
Senior Developer
Locked