Page 1 of 2
Nagios XI 2012R2.2 / FPDF not working since upgrade
Posted: Tue Jul 16, 2013 2:12 am
by IMTECH
Hi,
after the upgrade from 1.6 to 2.2 some weeks ago it seems that the PDF generation in Nagios XI is broken for me.
The error message that is displayed when eg. trying show the availability report in PDF is: "FPDF error: Unsupported image type: png "
When I schedule a report a broken PDF is send by mail which is around 200-300 Bytes of size.
As i saw it in a different thread with a similar issue, maybe this information helps.
I checked /var/log/httpd/error_log but there is no entry at the time I try to generate the PDF.
cat /etc/php.ini | grep display_errors
; display_errors
display_errors = Off
; separately from display_errors. PHP's default behavior is to suppress those
/etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
(besides of several other entries that are customer-related, but nothing with the server-hostname in it)
Any ideas on this issue?
Thanks in advance!
Re: Nagios XI 2012R2.2 / FPDF not working since upgrade
Posted: Tue Jul 16, 2013 10:10 am
by abrist
Try to reinstall wkhtml (this requires the XI tarball to be expanded in /tmp):
Open the install file in a text editor:
Code: Select all
vi /tmp/nagiosxi/subcomponents/wkhtml/install
and change line 17 from this:
Code: Select all
installpath = os.environ['INSTALL_PATH']
to this:
Save the file and try to run the install again:
Code: Select all
cd /tmp/nagiosxi/subcomponents/wkhtml/
./install
What are the exact errors you are seeing in the apache error log?
Re: Nagios XI 2012R2.2 / FPDF not working since upgrade
Posted: Wed Jul 17, 2013 3:44 am
by IMTECH
Code: Select all
[root@xxx wkhtml]# ./install
--2013-07-17 10:32:52-- http://assets.nagios.com/downloads/nagiosxi/components/wkhtmltopdf-0.10.0_rc2-static-amd64.tar.bz2
Resolving assets.nagios.com... 72.14.181.71
Connecting to assets.nagios.com|72.14.181.71|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 10995568 (10M) [application/x-bzip2]
Saving to: âwkhtmltopdf-0.10.0_rc2-static-amd64.tar.bz2â
100%[========================================================================================================>] 10,995,568 88.3K/s in 1m 59s
2013-07-17 10:34:52 (90.3 KB/s) - âwkhtmltopdf-0.10.0_rc2-static-amd64.tar.bz2â
Should there be any installation going on?
As far as I can tell, the package was only downloaded.
There are no errors in the apache logfile that are directly related to this action.
eg. PHP Notice: Undefined variable: startdate in /usr/local/nagiosxi/html/includes/components/graphexplorer/visFunctions.inc.php on line 135, referer:
http://xxx/nagiosxi//includes/page-home-main.php?&=
or Exception KeyError: KeyError(139726975993824,) in <module 'threading' from '/usr/lib64/python2.6/threading.pyc'> ignored
Re: Nagios XI 2012R2.2 / FPDF not working since upgrade
Posted: Wed Jul 17, 2013 9:43 am
by abrist
IMTECH wrote:Should there be any installation going on?
Looking back over the script, there is another script that expands and copies the bin. We will just do it by hand. Untar it to /tmp, and copy the binary that matches your arch to /usr/bin/wkhtmltopdf :
(for 64 bit)
Code: Select all
tar xvf wkhtmltopdf-0.10.0_rc2-static-amd64.tar.bz2
cp wkhtmltopdf-amd64 /usr/bin/wkhtmltopdf
(for 32 bit)
Code: Select all
tar xvf wkhtmltopdf-0.10.0_rc2-static-i386.tar.bz2
cp wkhtmltopdf-i386 /usr/bin/wkhtmltopdf
Re: Nagios XI 2012R2.2 / FPDF not working since upgrade
Posted: Wed Jul 17, 2013 10:31 am
by IMTECH
Executed the mentioned commands, but the error is still unchanged - "FPDF error: Unsupported image type: png".
Re: Nagios XI 2012R2.2 / FPDF not working since upgrade
Posted: Thu Jul 18, 2013 10:24 am
by slansing
Is this happening on all reports? Or just the aforementioned?
Re: Nagios XI 2012R2.2 / FPDF not working since upgrade
Posted: Thu Jul 18, 2013 10:39 am
by IMTECH
Happens on the following reports:
Availability
State History
Top Alert Producers
Alert Histogram
Notifications
Event Log
Works with:
Executive Summary
Does not happen on a self-scheduled report like "
http://xxx/nagiosxi/?xiwindow=http%3A%2 ... ttr%3D4096" which has been created with "Schedule page".
Re: Nagios XI 2012R2.2 / FPDF not working since upgrade
Posted: Thu Jul 18, 2013 4:29 pm
by abrist
I am perplexed. PNGs are a supported format of FPDF . . .
Do you use the custom logo component?
Re: Nagios XI 2012R2.2 / FPDF not working since upgrade
Posted: Fri Jul 19, 2013 2:34 am
by IMTECH
That was a real good point!
When I deactivate the Custom Logo-Component all the reports do work again ... but actually we use a PNG as logo.
Re: Nagios XI 2012R2.2 / FPDF not working since upgrade
Posted: Fri Jul 19, 2013 10:46 am
by slansing
Could you try changing that logo to, maybe a JPEG? And enabling it?