Availability Report Performance (Avail.cgi )
-
mina eskarous
- Posts: 5
- Joined: Wed Oct 19, 2016 5:31 am
Availability Report Performance (Avail.cgi )
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
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
Re: Availability Report Performance (Avail.cgi )
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?
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 )
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
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 )
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.
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.
One thing you can try is to edit the /etc/php.ini file and change the following setting from
to
Save the file and restart apache by running
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.
Code: Select all
memory_limit = 128MCode: Select all
memory_limit = 512MCode: Select all
service httpd restartBe 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 )
It is already set to 1024Mtgriep wrote:One thing you can try is to edit the /etc/php.ini file and change the following setting fromtoCode: Select all
memory_limit = 128MSave the file and restart apache by runningCode: Select all
memory_limit = 512MLet 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.Code: Select all
service httpd restart
Re: Availability Report Performance (Avail.cgi )
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.
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 )
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.
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 )
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.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.
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 )
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.