Page 1 of 3
Not able to generate report using NAT IP
Posted: Wed Feb 06, 2013 6:45 am
by wiproltdwiv
Hi,
We are not able to generate report using NAT IP or from remote location system, getting below error. pls suggest.
FPDF error: Not a PNG file: /tmp/availabilityLXTXk8.png
Code: Select all
[root@EMSNagios1 ~]# tail /var/log/httpd/error_log
[Wed Feb 06 16:18:07 2013] [error] [client 172.16.66.4] PHP Warning: file_get_contents(http://172.29.70.37/nagiosxi/reports/availability.php?1360147687&mode=getchart&type=host&title=Host+Availability&data=55.779970013038,44.220029986962,0&legend=Up,Down,Unreachable&colors=%2356DA56,%23E9513D,%23CB2525&username=nagiosadmin&ticket=jso6hra6): failed to open stream: No route to host in /usr/local/nagiosxi/html/reports/availability.php on line 2394, referer: http://172.29.70.37/nagiosxi/reports/availability.php?&
Re: Not able to generate report using NAT IP
Posted: Wed Feb 06, 2013 11:30 am
by lmiltchev
We've confirmed this behavior, and added this to our TODO list. We will let you know as soon as this is fixed.
Meanwhile, you can try accessing it not by IP, but by hostname, and map the hostname to localhost in the /etc/hosts file.
Hope this helps.
Re: Not able to generate report using NAT IP
Posted: Wed Feb 06, 2013 1:21 pm
by scottwilkerson
Actually looking at this we believe it may be cause by allow_fopen_url being turned off in the php.ini. You can check the value by running in terminal:
Code: Select all
cat /etc/php.ini | grep allow_url_fopen
Can you confirm that 172.29.70.37 is the IP of your XI server?
Re: Not able to generate report using NAT IP
Posted: Wed Feb 06, 2013 11:44 pm
by wiproltdwiv
[root@EMSNagios1 ~]# cat /etc/php.ini | grep allow_url_fopen
allow_url_fopen = On
[root@EMSNagios1 ~]# tail /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
172.29.70.37 EMSNagios1.co-opbank.co.in
10.128.17.12 EMSNagios1.co-opbank.co.in EMSNagios1
Our Nagios server physical ip is 10.128.17.12 and we access with, also we have mention
http://172.29.70.37/nagiosxi/ this url in system setting so we can access nagios from remote location and it is NAT IP.
Re: Not able to generate report using NAT IP
Posted: Thu Feb 07, 2013 1:55 pm
by abrist
Have you tried adding localhost to the 2 addresses of the localhost in /etc/hosts?
Code: Select all
172.29.70.37 EMSNagios1.co-opbank.co.in localhost
10.128.17.12 EMSNagios1.co-opbank.co.in localhost EMSNagios1
Re: Not able to generate report using NAT IP
Posted: Thu Apr 04, 2013 7:27 am
by wiproltdwiv
yes we tried the same. but still we struck with same issue
Re: Not able to generate report using NAT IP
Posted: Thu Apr 04, 2013 4:49 pm
by scottwilkerson
In my opinion, the /etc/hosts should contain just
Code: Select all
10.128.17.12 EMSNagios1.co-opbank.co.in localhost EMSNagios1
Then if you access the page by name (EMSNagios1.co-opbank.co.in) and not IP address it will do the lookup based on that, which the XI server should see it as 10.128.17.12
Re: Not able to generate report using NAT IP
Posted: Fri Apr 05, 2013 5:05 am
by wiproltdwiv
one more thing.. we cannot able to generate availability in pdf.. rest of the reports like state history, top alert producers we are getting pdf output
Re: Not able to generate report using NAT IP
Posted: Fri Apr 05, 2013 5:16 am
by wiproltdwiv
pls find the below http/error-log
[Fri Apr 05 15:46:17 2013] [error] [client 172.16.66.22] PHP Warning: file_get_contents(
http://172.29.70.37/nagiosxi/reports/av ... t=jso6hra6): failed to open stream: no suitable wrapper could be found in /usr/local/nagiosxi/html/reports/availability.php on line 2437, referer:
http://172.29.70.37/nagiosxi/reports/availability.php
Re: Not able to generate report using NAT IP
Posted: Fri Apr 05, 2013 5:27 am
by wiproltdwiv
below error log after openurl to on state
[Fri Apr 05 15:56:17 2013] [error] [client 172.16.66.22] PHP Warning: file_get_contents(
http://172.29.70.37/nagiosxi/reports/av ... t=jso6hra6): failed to open stream: Connection timed out in /usr/local/nagiosxi/html/reports/availability.php on line 2437, referer:
http://172.29.70.37/nagiosxi/reports/av ... ity.php?&=