BPI is maxing out CPU

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
whjsmith
Posts: 24
Joined: Thu Dec 29, 2011 12:34 pm

BPI is maxing out CPU

Post by whjsmith »

Anytime we attempt to view the BPI, create a new BPI group or edit existing members the httpd service CPU usage goes to 60-95% and the web pages take 13+ seconds to load. We currently have 2 cpus on the server. We also have 10,000+ service checks on the server (checks are distributed). It has to be the number of service checks that is causing the issue. We setup the identical BPI on our test system that only has 300 checks and it is quick. We copy that same BPI over to our production system and it grinds to halt. Where does the BPI query to get the results of the service checks that are associated to the BPI? Is it from the Nagios database?

Thanks for your help,
Jason
Our installation is currently:
CentOS Linux release 6.0 (Final)
32 bit
VM Image
Special Configurations: No
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: BPI is maxing out CPU

Post by scottwilkerson »

This is well beyond the amount of services that is recommended to be checked with this hardware. Anything over 3000 checks we recommend have > 4 CPUs

http://assets.nagios.com/downloads/nagi ... ements.pdf
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
whjsmith
Posts: 24
Joined: Thu Dec 29, 2011 12:34 pm

Re: BPI is maxing out CPU

Post by whjsmith »

Ok I will up the resources and see if that helps.

Jason
Our installation is currently:
CentOS Linux release 6.0 (Final)
32 bit
VM Image
Special Configurations: No
whjsmith
Posts: 24
Joined: Thu Dec 29, 2011 12:34 pm

Re: BPI is maxing out CPU

Post by whjsmith »

Oh wait... sorry. That document you linked to is for a server processing active checks. We distribute the checks to 6 other servers. That server that is displaying the BPI does not run any checks. It just processes the results. Back to my original questions.. does the BPI query the Nagios database to get the results of the service checks?
Our installation is currently:
CentOS Linux release 6.0 (Final)
32 bit
VM Image
Special Configurations: No
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: BPI is maxing out CPU

Post by mguthrie »

Which version of Nagios BPI are you using? The 1.3x version will use a LOT of CPU on a large system for each check, whereas the 2.x version caches data so it's much more efficient.
whjsmith
Posts: 24
Joined: Thu Dec 29, 2011 12:34 pm

Re: BPI is maxing out CPU

Post by whjsmith »

We are using BPI 2.0 on Nagios XI 2012R1.1
Our installation is currently:
CentOS Linux release 6.0 (Final)
32 bit
VM Image
Special Configurations: No
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: BPI is maxing out CPU

Post by mguthrie »

Can you make sure the cache file has write permissions on it? If for some reason it wasn't writable then the checks would definitely be a big CPU grabber.

Code: Select all

chown apache.nagios /usr/local/nagiosxi/var/components/bpi.xml
chmod 775 /usr/local/nagiosxi/var/components/bpi.xml
whjsmith
Posts: 24
Joined: Thu Dec 29, 2011 12:34 pm

Re: BPI is maxing out CPU

Post by whjsmith »

The bpi.xml file had 644 permissions and was empty. I have changed it to 775 permissions 4 hours ago but the file is still empty. How do I get the BPI to start caching the data? We also added 2 cpus and 4 gigs of RAM to the server. It helped maybe shave off a couple seconds but the BPI still takes 10+ seconds to load.
Our installation is currently:
CentOS Linux release 6.0 (Final)
32 bit
VM Image
Special Configurations: No
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: BPI is maxing out CPU

Post by scottwilkerson »

Can we take a look at who the user/group are for the file

Code: Select all

ls -l /usr/local/nagiosxi/var/components/bpi.xml
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: BPI is maxing out CPU

Post by mguthrie »

Can you also verify that particular location is specified in the BPI Options? Check the Admin->Manage Components page, and click the edit settings icon for the BPI listing. BPI Supports a custom location for that file, so it would be good just to verify that the location matches.
Locked