When the Report section first loads in the NagiosXI GUI, the default report showin is the Availability report. I have a large (582 hosts, 18053 services) deployment and it takes about 35 seconds for avail.cgi to complete its execution and display results. Is there a way to optimize the performance of avail.cgi? Also, can I change the logic of the Report GUI so that it displays one of the other reports at loading ? Those reports execute without delay.
Linux Distribution and version?
Centos 6.4
32 or 64bit?
64 bit
VMware Image or Manual Install of XI?
VMWare Image
avail.cgi tuning
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: avail.cgi tuning
Yes you can, and I can provide a way that should cause no latency at all. Alter /usr/local/nagiosxi/html/reports/index.php on line 35 from:
To:
This will cause no report to be generated at the opening of the reports page. However I will caution that this alteration almost definitely will be overwritten on any and every XI upgrade, so you will want to make the alteration again on the new file, in the event that we make changes to index.php, I would not copy the old one back in place. Really you can replace that with any report.php page that you would like to see as default, I just thought I would give one that will populate instantly for you.
Code: Select all
//$url="main.php";
if(use_new_features()==true)
$url="availability.php";
else
$url="nagioscorereports.php";
Code: Select all
//$url="main.php";
if(use_new_features()==true)
$url="nagioscorereports.php";
else
$url="nagioscorereports.php";
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Re: avail.cgi tuning
Thanks for the quick reply. This worked great and was exactly what I needed. Do you have any ideas on tuning avail.cgi? Am I correct in that it's parsing the files in
/usr/local/nagios/var/archives? Can I delete any files, or does it only look back at the two most recent (24 hours)?
/usr/local/nagios/var/archives? Can I delete any files, or does it only look back at the two most recent (24 hours)?
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: avail.cgi tuning
You can remove archived logs, though depending on what you delete you will lose the ability to pull Reports from that time period.