Page 1 of 1

PDF reports not working

Posted: Thu Sep 11, 2014 2:17 pm
by SavaSC
Hello,

When we go to run PDF reports we get the following error:

Code: Select all

************ ERROR: Failed to render URL 'http://hou-nagiosxi.ltcsvc.com/nagiosxi/reports/availability.php?1&host=ABCAWEB01&service=&reportperiod=last24hours&startdate=&enddate=&hostgroup=&servicegroup=&reporttimesubmitbutton=Update&advanced=0&assumeinitialstates=yes&assumestateretention=yes&assumestatesduringdowntime=yes&includesoftstates=no&assumedhoststate=3&assumedservicestate=6&timeperiod=&manual_run=1&hideoptions=1&username=jcalford1&ticket=7js5hhd0bl704m7taflie2s0bcd5aq3ebsjrevroivmjlsesa0fn29mbl0duqfc5&locale=en_US' as '/usr/local/nagiosxi/tmp/scheduledreport-jcalford1-1410461121-page.pdf' ************ 
The export to Excel works fine.

I found a post about this same subject from a couple of months ago, but when I run the same check they did, my system can't find that file:

Code: Select all

[root@ltc099l ~]# /usr/bin/wkhtmltopdf -V
-bash: /usr/bin/wkhtmltopdf: No such file or directory
Thanks for your help.

Re: PDF reports not working

Posted: Thu Sep 11, 2014 3:33 pm
by abrist
You may need to reinstall wkhtmltopdf:

For 64bit:

Code: Select all

cd /tmp
wget http://assets.nagios.com/downloads/nagiosxi/components/wkhtmltox-0.12.1-centos5-amd64.tar.gz
tar -xf wkhtmltox-0.12.1-centos5-amd64.tar.gz
cd wkhtmlto*
mv -f bin/wkhtmltopdf /usr/bin/wkhtmltopdf
mv -f bin/wkhtmltoimage /usr/bin/wkhtmltoimage
For 32bit:

Code: Select all

cd /tmp
wget http://assets.nagios.com/downloads/nagiosxi/components/wkhtmltox-0.12.1-centos5-i386.tar.gz
tar -xf wkhtmltox-0.12.1-centos5-i386.tar.gz
cd wkhtmlto*
mv -f bin/wkhtmltopdf /usr/bin/wkhtmltopdf
mv -f bin/wkhtmltoimage /usr/bin/wkhtmltoimage

Re: PDF reports not working

Posted: Thu Sep 11, 2014 3:57 pm
by SavaSC
That did it. Thanks so much!