Page 1 of 4
Host Detail Page - High CPU usage
Posted: Mon Jul 20, 2015 10:32 am
by TBT
While accessing the Host Details page from the Views tab, we have noticed rather lengthily page load times with default number per page settings. As you increase the number of entries viewable per page, the server CPU usage increases and by setting entries to 1000 the page fails to load. Users are also unable to reset the entries to a lower number as the page needs to load in order to make this change. On the other hand, the Service Details page loads successfully in seconds with no issues with setting of 1000 entries per page.
I assume this is an optimization issue with the Host Detail Page, please advise.
Re: Host Detail Page - High CPU usage
Posted: Mon Jul 20, 2015 11:35 am
by lmiltchev
I will have to ask our developers to look into this but it is possible that you are hitting the "default" max_input_vars limitation (1000).
http://php.net/manual/en/info.configura ... input-vars
Try adding the following line on the bottom of the "/etc/php.ini" file:
save, exit and restart apache:
Let me know if this helped.
Re: Host Detail Page - High CPU usage
Posted: Mon Jul 20, 2015 12:29 pm
by TBT
This suggestion has not improved the situation, same result.
Re: Host Detail Page - High CPU usage
Posted: Mon Jul 20, 2015 12:40 pm
by ssax
Are you seeing any errors in your /var/log/httpd/error_log or /var/log/httpd/access_log? If you use SSL it may be in /var/log/httpd/ssl_error_log. Please post them if you do.
Re: Host Detail Page - High CPU usage
Posted: Mon Jul 20, 2015 12:59 pm
by TBT
No errors in /var/log/httpd/ssl_error_log
Re: Host Detail Page - High CPU usage
Posted: Mon Jul 20, 2015 3:03 pm
by ssax
You should be able to reset the view by logging into XI first and then accessing the link directly (this link will limit it to 10):
*** Make sure to change YOURXISERVER and http to https if using SSL
Code: Select all
http://YOURXISERVER/nagiosxi/includes/components/xicore/status.php?show=hosts&sortby=&sortorder=asc&host=&hostgroup=&servicegroup=&hoststatustypes=0&servicestatustypes=0&hostattr=0&serviceattr=0&page=1&records=10&pagemove=Go
Not a solution but will hopefully let you view them, let me know if that works for you.
Re: Host Detail Page - High CPU usage
Posted: Mon Jul 20, 2015 3:09 pm
by TBT
Confirmed this is a reset work-a-round.
ssax wrote:You should be able to reset the view by logging into XI first and then accessing the link directly (this link will limit it to 10):
*** Make sure to change YOURXISERVER and http to https if using SSL
Code: Select all
http://YOURXISERVER/nagiosxi/includes/components/xicore/status.php?show=hosts&sortby=&sortorder=asc&host=&hostgroup=&servicegroup=&hoststatustypes=0&servicestatustypes=0&hostattr=0&serviceattr=0&page=1&records=10&pagemove=Go
Not a solution but will hopefully let you view them, let me know if that works for you.
Re: Host Detail Page - High CPU usage
Posted: Mon Jul 20, 2015 4:53 pm
by tgriep
Edit your /etc/php.ini file and change the variables below to these values.
Code: Select all
max_execution_time = 60 ; Maximum execution time of each script, in seconds
max_input_time = 60 ; Maximum amount of time each script may spend parsing request data
memory_limit = 256M ; Maximum amount of memory a script may consume
Then restart Apache
See if that works for you.
Re: Host Detail Page - High CPU usage
Posted: Mon Jul 20, 2015 5:07 pm
by ssax
In addition to what tgriep is asking you to do, how many hosts do you have anyways? I created 1000 hosts and it loads in about 6 seconds, I'm wondering if it has to do at all with the total number of hosts.
Re: Host Detail Page - High CPU usage
Posted: Tue Jul 21, 2015 7:31 am
by TBT
This particular XI Server has only 462 Hosts being monitored. Host Details now loads in roughly 45-60 seconds with the adjustments suggested by tgriep, no where near 6 seconds though.
htop is reporting httpd CPU usage at 91% while 1000 Per pages is selected, switching to 50 per page drop significantly.
ssax wrote:In addition to what tgriep is asking you to do, how many hosts do you have anyways? I created 1000 hosts and it loads in about 6 seconds, I'm wondering if it has to do at all with the total number of hosts.