Page 1 of 1

Yearly reports running forever

Posted: Thu Dec 18, 2014 9:29 am
by WillemDH
Hello,

I have to create several yearly reports for hostgroups. It seems however that they are running forever. I've been waiting for 20 minutes now and my browser tab is still turning.. Received 6 messages from Chrome that my browser seems to hanging. (i selected wait 6 times) In Firefox, one of the reports just stopped generating a blank page.

As I'll have to do this every year... for 10+ hostgroups.. I've got some questions:

Could there be some estimated time left, so at least we know how much longer to wait?

As when I decide to make a pdf, it seems like I have to first run the report then export to pdf, where it has to run another time?

There does not seem a way to stop the report from generating once it is started. The browser tab seems to keep hanging, I guess until the report is finished.

Anyway, creating and managing reports for a longer then a month period of time is kind of a pain. Although I thought reports did not start automatically anymore, I have one report that does starts automatically every time... :( (I deleted it an recreated it and it seems to not start automatically anymore)

There is also no way to edit a report once it is added to favourites.

Memory and cpu load seem to spike during report runs. I'll put some more RAM in it, I think it has 4 GB at the moment. Any other tips for making my yearly reports job less a pain are very welcome..

Grtz

Willem

Re: Yearly reports running forever

Posted: Thu Dec 18, 2014 11:51 am
by abrist
WillemDH wrote:Any other tips for making my yearly reports job less a pain are very welcome..
What type of report?
How long of a report are you running?
How big are the hostgroups?
You may want to check your php.ini settings:

Code: Select all

grep "memory_limit\|max_execution\|max_input" /etc/php.ini

Re: Yearly reports running forever

Posted: Mon Dec 22, 2014 4:06 am
by WillemDH
Andy,

Thanks for the input:

Code: Select all

 grep "memory_limit\|max_execution\|max_input" /etc/php.ini
; max_input_time
max_execution_time = 90
max_input_time = 60
;max_input_nesting_level = 64
memory_limit = 512M
What would you recommend for settings? The server has now 8 GB RAM, but it still seems to run a long time.

Grtz

Willem

Re: Yearly reports running forever

Posted: Mon Dec 22, 2014 5:41 pm
by slansing
Depending on how long these PHP jobs take, you may need to bump out that max execution time even more, though that may have performance hit implications elsewhere. How do the processes look in TOP while you are running one of these lengthy reports? Do you have multiple users running them at the same time, or just you?

Re: Yearly reports running forever

Posted: Tue Dec 23, 2014 5:27 am
by WillemDH
Sam,

I did try one time to make two reports at the same time. Man, I wished I didn't have done that. Memory spiked above the roof. Even swap filled up. Had to reboot the server.... So after this one, I never tried running two reports at the same time.

At the moment a report is running avail.cgi is using 99 % cpu. See screenshot.

Grtz

Willem

Re: Yearly reports running forever

Posted: Tue Dec 23, 2014 3:58 pm
by sreinhardt
That looks like its purely a cpu bound issue, being that it has to churn through a whole years worth of hosts, services, and everything else, I can't say I blame it. Instead of running them manually, have you attempted to schedule the reports within the xi interface for off hours? One other thought you could try if you have not already would be to ramdisk the logs and files that it is processing, but i doubt that will have too much effect.

Re: Yearly reports running forever

Posted: Wed Dec 24, 2014 5:12 am
by WillemDH
Hey Spenser,

My Nagios server is already on pretty fast SSD's. I also doubt moving the logs would improve the situation a lot. Anyway I've been able to create most of my yearly reports now. About the scheduling, I couldn't risk the reports did not ran, as I had to finish the reports yesterday. Also, I'm not sure, but it is possible that before you can schedule a report, it has to run at least once? I thought I did try to schedule it once without running and it took the last 24 hours instead of last quarter.

Can you confirm this?

Grtz

Willem

Re: Yearly reports running forever

Posted: Fri Dec 26, 2014 10:14 am
by scottwilkerson
WillemDH wrote:Also, I'm not sure, but it is possible that before you can schedule a report, it has to run at least once? I thought I did try to schedule it once without running and it took the last 24 hours instead of last quarter.

Can you confirm this?
Yes, unfortunately, you are correct, you have to have loaded the page once to schedule it.

Re: Yearly reports running forever

Posted: Mon Jan 05, 2015 9:51 am
by WillemDH
Thanks Scott,

Yealry reports have been created. I guess you won't hear me again untill next year... ;) it would be nice to be able to schedule a report without having to run it first though... Made this feature request for it: http://tracker.nagios.com/view.php?id=648

Thread can be closed.

Grtz

Willem

Re: Yearly reports running forever

Posted: Mon Jan 05, 2015 10:07 am
by cmerchant
Thanks for the feature request. We'll go ahead and close this thread.