avail.cgi loops with 100% cpu and gets timeout

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
rouslan
Posts: 1
Joined: Sun Aug 21, 2011 6:57 am

avail.cgi loops with 100% cpu and gets timeout

Post by rouslan »

Hi gurus,
I have a problem with availability reports (Nagios core 3.2.3).
if I call avail.cgi to generate CSV report for all hosts and services for a given day it uses 100% cpu ,and in most cases eit nds up with a timeout after 10 minutes.
I observe growing memory usage of the avail.cgi process in top; iostat shows pretty no IO activity.
Example call:

Code: Select all

curl -u [user:pass] http://myhost:1080/nagios/cgi-bin/avail.cgi?show_log_entries=&host=all&service=all&timeperiod=custom&smon=08&sday=18&syear=2011&shour=00&smin=00&ssec=00&emon=08&eday=19&eyear=2011&ehour=00&emin=00&esec=00&rpttimeperiod=&assumeinitialstates=yes&assumestateretention=yes&assumestatesduringnotrunning=yes&includesoftstates=no&initialassumedservicestate=0&backtrack=4&csvoutput=
The overall number of services and hosts is not too high, nagios -v shows

Code: Select all

Checking services...
        Checked 325 services.
Checking hosts...
        Checked 67 hosts.
But I don't really need report for all hosts and services, I filter the results afterwards and select ca 20 most important hosts.
Unfortunately avail.cgi doesn't provide CSV output for a single host or hostgroup, same for services;
such reports are only available i nHTMP form which is bad for further processing.
I need to reformat the data, therefore I have to use CSV reports, bu tapparently with zero granularity (all/all) it's not performing well.
No idea how to investigate and fix it, any hints?
BTW is there a port of patch http://www.nagios-portal.org/wbb/index. ... eadID=3315 for newer versions?
I use Nagios 3.2.3, could update to 3.3.1 but can't consider downgrade to older one. If it were possible I'd prefer to generate CSV reports per hostgroup/servicegroup instead of doing this for all/all and filtering the huge output per awk afterwards.
Thanks in advance
P.S. the same worked on another nagios box (single-cpu SuSE 11.1 VMWare image) but doesn't work on the new 2-cpu SuSe 11.1 box, the configuration seems to be the same but...
Locked