Nagios XI 2012R2.2 / FPDF not working since upgrade
Nagios XI 2012R2.2 / FPDF not working since upgrade
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!
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
Try to reinstall wkhtml (this requires the XI tarball to be expanded in /tmp):
Open the install file in a text editor:
and change line 17 from this:
to this:
Save the file and try to run the install again:
What are the exact errors you are seeing in the apache error log?
Open the install file in a text editor:
Code: Select all
vi /tmp/nagiosxi/subcomponents/wkhtml/installCode: Select all
installpath = os.environ['INSTALL_PATH']Code: Select all
installpath = '/tmp/nagiosxi'Code: Select all
cd /tmp/nagiosxi/subcomponents/wkhtml/
./installFormer Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: Nagios XI 2012R2.2 / FPDF not working since upgrade
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â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
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 :IMTECH wrote:Should there be any installation going on?
Code: Select all
cd /tmpCode: Select all
tar xvf wkhtmltopdf-0.10.0_rc2-static-amd64.tar.bz2
cp wkhtmltopdf-amd64 /usr/bin/wkhtmltopdfCode: Select all
tar xvf wkhtmltopdf-0.10.0_rc2-static-i386.tar.bz2
cp wkhtmltopdf-i386 /usr/bin/wkhtmltopdfFormer Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: Nagios XI 2012R2.2 / FPDF not working since upgrade
Executed the mentioned commands, but the error is still unchanged - "FPDF error: Unsupported image type: png".
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Nagios XI 2012R2.2 / FPDF not working since upgrade
Is this happening on all reports? Or just the aforementioned?
Re: Nagios XI 2012R2.2 / FPDF not working since upgrade
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".
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
I am perplexed. PNGs are a supported format of FPDF . . .
Do you use the custom logo component?
Do you use the custom logo component?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: Nagios XI 2012R2.2 / FPDF not working since upgrade
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.
When I deactivate the Custom Logo-Component all the reports do work again ... but actually we use a PNG as logo.
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Nagios XI 2012R2.2 / FPDF not working since upgrade
Could you try changing that logo to, maybe a JPEG? And enabling it?