Page 1 of 1
PDF reports not working
Posted: Mon Aug 31, 2015 1:38 pm
by nbdstl
System Profile
Nagios XI Version : 2014R2.7
**hostname** 3.10.0-229.4.2.el7.x86_64 x86_64
CentOS Linux release 7.1.1503 (Core)
Gnome is not installed
When trying to generate PDF reports for immediate viewing I'm getting an error:
************ ERROR: Failed to render URL 'https://hostname/nagiosxi//reports/execsummary.php?1&reportperiod=last24hours&startdate=&enddate=&host=&hostgroup=linux-servers&servicegroup=&reporttimesubmitbutton=Update&manual_run=1&hideoptions=1&username=nagiosadmin&ticket=4ttb5cj8&locale=en_US' as '/usr/local/nagiosxi/tmp/scheduledreport-nagiosadmin-1441045666-page.pdf' ************
When I try to send a report via email, the PDF attachment is 0 bytes in length.
No output in /var/log/httpd/error_log
It seems like a supporting program/module must be missing, but I don't know what's required.
Chris
Re: PDF reports not working
Posted: Mon Aug 31, 2015 3:33 pm
by tgriep
Can you run the following and post the output here?
Re: PDF reports not working
Posted: Wed Sep 02, 2015 9:01 am
by nbdstl
Code: Select all
[root@host ~]# wkhtmltopdf -V
wkhtmltopdf 0.12.1-c22928d (with patched qt)
[root@host ~]# which wkhtmltopdf
/usr/bin/wkhtmltopdf
Re: PDF reports not working
Posted: Wed Sep 02, 2015 9:21 am
by lmiltchev
Are you using/forcing SSL? What is the output of the following commands?
Code: Select all
ifconfig
grep use_https /usr/local/nagiosxi/html/config.inc.php
cat /etc/hosts
ls -ld /usr/local/nagiosxi
ls -ld /usr/local/nagiosxi/tmp
Go to Admin->Manage System Config and show us what you have in the "
Program URL" and "
External URL" fields.
Re: PDF reports not working
Posted: Wed Sep 02, 2015 9:25 am
by nbdstl
Code: Select all
[root@host ~]# ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.254.2 netmask 255.255.255.0 broadcast 192.168.254.255
inet6 fe80::5054:ff:fe86:6030 prefixlen 64 scopeid 0x20<link>
ether 52:54:00:86:60:30 txqueuelen 1000 (Ethernet)
RX packets 19376017 bytes 8042258834 (7.4 GiB)
RX errors 0 dropped 11032 overruns 0 frame 0
TX packets 20601891 bytes 2643324030 (2.4 GiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 0 (Local Loopback)
RX packets 2841375 bytes 1331200813 (1.2 GiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 2841375 bytes 1331200813 (1.2 GiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
[root@host ~]# grep use_https /usr/local/nagiosxi/html/config.inc.php
$cfg['use_https'] = false; // determines whether cron jobs and other scripts will force the use of HTTPS instead of HTTP
[root@host ~]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
[root@host ~]# ls -ld /usr/local/nagiosxi
drwxr-xr-x 10 nagios nagios 94 May 25 08:25 /usr/local/nagiosxi
[root@host ~]# ls -ld /usr/local/nagiosxi/tmp
drwsrwsr-x 2 apache nagios 4096 Aug 31 13:35 /usr/local/nagiosxi/tmp
Re: PDF reports not working
Posted: Wed Sep 02, 2015 9:31 am
by ssax
Edit this file:
Code: Select all
/usr/local/nagiosxi/html/config.inc.php
Change this:
To:
Then try it again, usually when we see this it's related to a proxy, this might resolve it for you though.
Re: PDF reports not working
Posted: Wed Sep 02, 2015 9:35 am
by tgriep
We need to know how these settings are configured in XI.
Go to Admin->Manage System Config and show us what you have in the "Program URL" and "External URL" fields.
When the report are run, it uses the External URL to run them. If that URL is incorrect, they will not run.
Re: PDF reports not working
Posted: Wed Sep 02, 2015 10:43 am
by nbdstl
I actually edited /etc/hosts and put the local hostname into the hosts file.
It works now.
Thanks!