When I run the availability report and click "Download as PDF"
I get the following error:
FPDF error: Not a PNG file: /tmp/availabilityLRLPBT.png
Other reports the download as PDF seem to work OK.
I am using Nagios XI 2011R2.2
Regards
Availability Report - Download as PDF
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Availability Report - Download as PDF
if you are accessing the XI site using a hostname, make sure you have the hostname in the /etc/hosts file on the line with 127.0.0.1
Re: Availability Report - Download as PDF
I have added the hostname to the host file and I am getting the same error.
Hosts file:
127.0.0.1 myserver.mydomain.local localhost
Regards
Hosts file:
127.0.0.1 myserver.mydomain.local localhost
Regards
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Availability Report - Download as PDF
you might want to look at the httpd error_log to see if it shows anything
Code: Select all
tail -f /var/log/httpd/error_logRe: Availability Report - Download as PDF
Do you have error reporting turned on in the "/etc/php.ini" file? If you do, turn it off, restart apache:
and try again.
Let me know if this fixes your issue.
Code: Select all
service httpd restartLet me know if this fixes your issue.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Availability Report - Download as PDF
When viewing the httpd error_log I see the following:
When opening the availability report page:
When clicking the "Download as PDF link":
Then I get the error in my browser: FPDF error: Not a PNG file: /tmp/availabilityzgI2R4.png
Regards
When opening the availability report page:
Code: Select all
[Thu Apr 12 16:35:31 2012] [error] [client 10.44.20.34] PHP Notice: Use of undefined constant LEGEND_VER - assumed 'LEGEND_VER' in /usr/local/nagiosxi/html/reports/availability.php on line 189, referer: http://myserver/nagiosxi/reports/availability.php
[Thu Apr 12 16:35:31 2012] [error] [client 10.44.20.34] PHP Notice: Use of undefined constant LEGEND_VER - assumed 'LEGEND_VER' in /usr/local/nagiosxi/html/reports/availability.php on line 189, referer: http://myserver/nagiosxi/reports/availability.php
Code: Select all
[Thu Apr 12 16:36:10 2012] [error] [client 10.44.20.34] PHP Warning: file_get_contents() [<a href='function.file-get-contents'>function.file-get-contents</a>]: php_network_getaddresses: getaddrinfo failed: Name or service not known in /usr/local/nagiosxi/html/reports/availability.php on line 2388, referer: http://myserver/nagiosxi/reports/availability.php
[Thu Apr 12 16:36:10 2012] [error] [client 10.44.20.34] PHP Warning: file_get_contents(http://myserver/nagiosxi/reports/availability.php?1334244970&mode=getchart&type=host&title=Host+Availability&data=97.380149253731,2.6198507462687,0&legend=Up,Down,Unreachable&colors=%2356DA56,%23E9513D,%23CB2525&username=ict&ticket=af27fdaetqrjsro4bank7ou29v7t5facsbg9lpmjhg6ebrfl3479r6823eu5r6gl) [<a href='function.file-get-contents'>function.file-get-contents</a>]: failed to open stream: Success in /usr/local/nagiosxi/html/reports/availability.php on line 2388, referer: http://myserver/nagiosxi/reports/availability.phpRegards
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Availability Report - Download as PDF
To verify, you have what is the equivelent of myserver in your error log in your /etc/hosts ?
Also note, if you are accessing XI from http://myserver/nagiosxi/
and in your /etc/hosts file you have
This still isn't correct, you would need
The reason I ask is this solved the exact same issue here
http://support.nagios.com/forum/viewtop ... 35&p=23906
Also note, if you are accessing XI from http://myserver/nagiosxi/
and in your /etc/hosts file you have
Code: Select all
127.0.0.1 myserver.mydomain.local localhostCode: Select all
127.0.0.1 myserver myserver.mydomain.local localhostThe reason I ask is this solved the exact same issue here
http://support.nagios.com/forum/viewtop ... 35&p=23906
Re: Availability Report - Download as PDF
Ahh that was the problem, it's working now!
Thank you
Thank you