multi-threading avail.cgi

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
IkaIka
Posts: 34
Joined: Fri Dec 21, 2018 4:37 am

multi-threading avail.cgi

Post by IkaIka »

Hello! I've ran into a performance problem when generating SLA reports. Generating a yearly report takes hours to complete, and during that time Nagios just locks up for me (other users don't experience any problems). I looked up the server's CPU usage and whenever a report is being generated, a process called avail.cgi is eating up a single CPU core. Is there a way to allow it to use more than one core to speed up the process?
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: multi-threading avail.cgi

Post by mcapra »

It has been discussed multiple times in the past that those reporting CGIs are getting major refactors with Nagios Core 5 (performance issues being well known), though I don't see that on the roadmap anywhere currently:
https://www.nagios.com/roadmaps/

Relevant GitHub issues:
https://github.com/NagiosEnterprises/na ... issues/280
https://github.com/NagiosEnterprises/na ... issues/409
Former Nagios employee
https://www.mcapra.com/
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: multi-threading avail.cgi

Post by benjaminsmith »

Hi @IkaIka,

Thanks @mcapra. One more thing, we are planning to add a new report management system in Nagios XI 6 that will allow backend report generation without affecting other users while generating and saving reports.

In the meantime, you may want to create reports over smaller time intervals to reduce the time required. You can also increase the memory limit settings in your php.ini file. However, issues with availability reports are mostly related to disk i/o as the script needs to parse the log files to generate the report.

Let me know if any other questions.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
IkaIka
Posts: 34
Joined: Fri Dec 21, 2018 4:37 am

Re: multi-threading avail.cgi

Post by IkaIka »

Thank you for your kind replies @mcapra and @benjaminsmith. I don't think changing memory limits would do much good in my case, as the bottleneck clearly is the single CPU thread. If it cannot be multi-threaded, I will have to just wait for the refactors you mentioned.

Thanks again, this answers my questions.
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: multi-threading avail.cgi

Post by benjaminsmith »

Hi @IkaIka
Thanks again, this answers my questions.
Your welcome. I'll close this thread. Thank you for using Nagios.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked