Page 1 of 2
PDF Files generated too big
Posted: Sun Jul 20, 2014 9:11 pm
by rajasegar
Nagios 2014R1.2
We have noticed that the PDF file generated in Nagios is way too big.
For example on the scheduled report generated by Nagios - 2.8 Mb
Same page generated using Web Page plugin - 700k.
Please advice on this.
Thanks
Re: PDF Files generated too big
Posted: Mon Jul 21, 2014 10:16 am
by lmiltchev
What is the time period that you are using? I tested this with "This Month". I saved the report as PDF from the Web page, and also scheduled the report. I can see a very small difference in the size of the PDFs...
18.6 KB (19,113 bytes) - web
18.6 KB (19,115 bytes) - scheduled
Re: PDF Files generated too big
Posted: Tue Jul 22, 2014 4:00 am
by rajasegar
Tried scheduling a One Time Report and the web page hung.
Code: Select all
[nagios@nagiosprodxi1 debug]$ sudo tail -f /var/log/httpd/error_log
[Tue Jul 22 11:20:01 2014] [error] [client 10.17.44.34] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20971521 bytes) in /usr/local/nagiosxi/html/includes/utils-reports.inc.php on line 437, referer: http://10.17.19.235/nagiosxi/reports/
[Tue Jul 22 11:24:05 2014] [error] [client 10.17.44.34] File does not exist: /usr/local/nagiosxi/html/includes/js/jquery/colorpicker/images/colorpicker_overlay.png, referer: http://10.17.19.235/nagiosxi/dashboards/
[Tue Jul 22 11:27:01 2014] [error] [client 10.17.44.34] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20971500 bytes) in /usr/local/nagiosxi/html/includes/utils-reports.inc.php on line 436, referer: http://10.17.19.235/nagiosxi/reports/
[Tue Jul 22 13:41:56 2014] [error] [client 10.17.44.34] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 21495769 bytes) in /usr/local/nagiosxi/html/includes/utils-reports.inc.php on line 441, referer: http://10.17.19.235/nagiosxi/reports/
Please advice how to increase this memory.
Re: PDF Files generated too big
Posted: Tue Jul 22, 2014 10:41 am
by abrist
Check your php memory_limit:
Code: Select all
cat /etc/php.ini | grep memory_limit
Increase the php.ini limits to 256 or 512:
Re: PDF Files generated too big
Posted: Tue Jul 22, 2014 7:09 pm
by rajasegar
abrist wrote:Check your php memory_limit:
Code: Select all
cat /etc/php.ini | grep memory_limit
Increase the php.ini limits to 256 or 512:
Changed and restarted httpd.
This time no more error message. The page timed out and cannot connect to website anymore.
Had to restart httpd to get back to normal.
Code: Select all
[Wed Jul 23 07:57:16 2014] [notice] caught SIGTERM, shutting down
[Wed Jul 23 07:57:17 2014] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Wed Jul 23 07:57:17 2014] [notice] Digest: generating secret for digest authentication ...
[Wed Jul 23 07:57:17 2014] [notice] Digest: done
[Wed Jul 23 07:57:17 2014] [notice] Apache/2.2.15 (Unix) DAV/2 PHP/5.3.3 mod_ssl/2.2.15 OpenSSL/1.0.1e-fips configured -- resuming normal operations
[Wed Jul 23 08:06:51 2014] [notice] caught SIGTERM, shutting down
[Wed Jul 23 08:06:51 2014] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Wed Jul 23 08:06:51 2014] [notice] Digest: generating secret for digest authentication ...
[Wed Jul 23 08:06:51 2014] [notice] Digest: done
[Wed Jul 23 08:06:51 2014] [notice] Apache/2.2.15 (Unix) DAV/2 PHP/5.3.3 mod_ssl/2.2.15 OpenSSL/1.0.1e-fips configured -- resuming normal operations
Re: PDF Files generated too big
Posted: Wed Jul 23, 2014 10:09 am
by lmiltchev
Can you schedule a report now? Are you still having the issue?
Re: PDF Files generated too big
Posted: Wed Jul 23, 2014 6:27 pm
by rajasegar
lmiltchev wrote:Can you schedule a report now? Are you still having the issue?
As per the post above, it hangs the web server when I tried to do a One Time run on the default Dashboard.
I did not bother to schedule it since, it might do the same thing.
Re: PDF Files generated too big
Posted: Thu Jul 24, 2014 12:21 pm
by abrist
What report are you running? The report may hang if it tries to pull in too much data or if it tries to access a giant db table or log file.
Re: PDF Files generated too big
Posted: Thu Jul 24, 2014 6:00 pm
by rajasegar
abrist wrote:What report are you running? The report may hang if it tries to pull in too much data or if it tries to access a giant db table or log file.
It is scheduling my default dashboard attached.
Nagios XI - Dashboard - Home Page.zip
Re: PDF Files generated too big
Posted: Fri Jul 25, 2014 1:38 pm
by lmiltchev
Probably we will need to schedule a remote session to further troubleshoot the issue. Is this an option for you?