Availability Report Performance (Avail.cgi )

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
mina eskarous
Posts: 5
Joined: Wed Oct 19, 2016 5:31 am

Availability Report Performance (Avail.cgi )

Post by mina eskarous »

Dears
I have a performance issue with availability report as CPU usage using top utility reached to 99% and sometimes 100% to process avail.cgi and also this cost much time. so I searched a lot and find out that avail.cgi is parsing files in archive directory /usr/local/nagios/var/archives/ to get the required data from these files.
I am beginner user for such these systems and .cgi files and I want to edit cgi files to query from database rather than parsing files so I appreciate your help for editing avail.cgi to make this change or if there another solution to avoid this issue performance. Thanks in advance
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Availability Report Performance (Avail.cgi )

Post by rkennedy »

It sounds like you're hitting a throttle point.

First off, are you using Nagios Core or Nagios XI? (this was posted in XI, but you're talking about Core reports)

Secondly, how many hosts / services do you have on your machine, and what amount of resources does the machine have?
Former Nagios Employee
mina eskarous
Posts: 5
Joined: Wed Oct 19, 2016 5:31 am

Re: Availability Report Performance (Avail.cgi )

Post by mina eskarous »

No dear this is Nagios XI what i am using not Nagios core and by using Nagios XI there is Availble Reports which run Avail.cgi,

No of hosts is 716 host and No of services is 4280 and i have 16G for Ram and CPU 8 Core
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Availability Report Performance (Avail.cgi )

Post by dwhitfield »

Could you PM me your profile? Admin > System Config > System Profile (click "Show Profile" in XI 5 onwards)

After you PM the profile, please update this thread so it shows back up on our dashboard. Thanks!

UPDATE: I do not have this zip file. I only have a piece of the profile. My PM back to @mina eskarous asking for the zip has been sitting in the outbox since 11:51 on 11/22...it is now 13:16 on 11/22.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Post by tgriep »

One thing you can try is to edit the /etc/php.ini file and change the following setting from

Code: Select all

memory_limit = 128M
to

Code: Select all

memory_limit = 512M
Save the file and restart apache by running

Code: Select all

service httpd restart
Let us know if this helps out on how long the report takes to run but the running of the reports does take a lot of CPU when it runs.
Be sure to check out our Knowledgebase for helpful articles and solutions!
mina eskarous
Posts: 5
Joined: Wed Oct 19, 2016 5:31 am

Re: Availability Report Performance (Avail.cgi )

Post by mina eskarous »

tgriep wrote:One thing you can try is to edit the /etc/php.ini file and change the following setting from

Code: Select all

memory_limit = 128M
to

Code: Select all

memory_limit = 512M
Save the file and restart apache by running

Code: Select all

service httpd restart
Let us know if this helps out on how long the report takes to run but the running of the reports does take a lot of CPU when it runs.
It is already set to 1024M
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Availability Report Performance (Avail.cgi )

Post by tgriep »

The Availability report is a single threaded report and when it runs, the CPU Usage will be very high because of this.
Here are some suggestions for making the report run quicker it to add more CPU's to the system, and to run the server on faster hard drives.
Try that and see if it helps out.
If you have purchased the Enterprise feature, you can schedule the reports to run during off hours and that should help out as well.
Be sure to check out our Knowledgebase for helpful articles and solutions!
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Availability Report Performance (Avail.cgi )

Post by dwhitfield »

There is still an outstanding "bug". You can track it at https://github.com/NagiosEnterprises/na ... issues/280. I know it's confusing that it's a Core bug, but XI uses Core under the hood.

An upgrade should also work, but your version of XI is old enough that an upgrade will probably be complicated. Is an upgrade something you'd be interested in exploring?

I will note that there is a US holiday on Thursday and our office will be closed on Thursday and Friday. If you are interested in an upgrade, I would suggest waiting until Monday to do so, in case you run into problems. However, we will be here today for a few more hours and tomorrow we will be here for a short day.
mina eskarous
Posts: 5
Joined: Wed Oct 19, 2016 5:31 am

Re: Availability Report Performance (Avail.cgi )

Post by mina eskarous »

tgriep wrote:The Availability report is a single threaded report and when it runs, the CPU Usage will be very high because of this.
Here are some suggestions for making the report run quicker it to add more CPU's to the system, and to run the server on faster hard drives.
Try that and see if it helps out.
If you have purchased the Enterprise feature, you can schedule the reports to run during off hours and that should help out as well.
Thank you for your suggestion but unfortunately this will not work for me as i need this report in different times by different users, this may may be work for some special cases.
The main problem for me is the logic that this report is using while parsing many files so i need to get the data from the database and avoid parsing many of files and i suggest to edit avail.cgi file to change this logic to read the data from the database but i do not know how to do it so i appreciate your support if you can help me to do this
mina eskarous
Posts: 5
Joined: Wed Oct 19, 2016 5:31 am

Re: Availability Report Performance (Avail.cgi )

Post by mina eskarous »

dwhitfield wrote:There is still an outstanding "bug". You can track it at https://github.com/NagiosEnterprises/na ... issues/280. I know it's confusing that it's a Core bug, but XI uses Core under the hood.

An upgrade should also work, but your version of XI is old enough that an upgrade will probably be complicated. Is an upgrade something you'd be interested in exploring?

I will note that there is a US holiday on Thursday and our office will be closed on Thursday and Friday. If you are interested in an upgrade, I would suggest waiting until Monday to do so, in case you run into problems. However, we will be here today for a few more hours and tomorrow we will be here for a short day.

Thank you for your help. ( https://github.com/NagiosEnterprises/na ... issues/280 ) is exactly the solution what I suggest before ,but this page do not have the steps to do it so I appreciate to provide me with the steps or how to deploy this solution.

regarding to upgrade ,you can just pass the right documentations or a link to required steps to follow and I can do it with my self.
Locked