Page 1 of 1

avail.cgi tuning

Posted: Mon Jan 13, 2014 5:31 pm
by njohnston
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

Re: avail.cgi tuning

Posted: Mon Jan 13, 2014 5:43 pm
by sreinhardt
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:

Code: Select all

        //$url="main.php";
        if(use_new_features()==true)
                $url="availability.php";
        else
                $url="nagioscorereports.php";
To:

Code: Select all

        //$url="main.php";
        if(use_new_features()==true)
                $url="nagioscorereports.php";
        else
                $url="nagioscorereports.php";
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.

Re: avail.cgi tuning

Posted: Mon Jan 13, 2014 6:18 pm
by njohnston
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)?

Re: avail.cgi tuning

Posted: Tue Jan 14, 2014 10:38 am
by slansing
You can remove archived logs, though depending on what you delete you will lose the ability to pull Reports from that time period.