This support forum board is for support questions relating to
Nagios XI , our flagship commercial network monitoring solution.
derekb
Posts: 177 Joined: Wed Jun 10, 2015 1:54 pm
Post
by derekb » Sat Jun 13, 2015 7:11 pm
It seems PDF Reports are failing to generate, and are producing the following error:
Code: Select all
************ ERROR: Failed to render URL 'http://mydomain.com/nagiosxi//reports/notifications.php?1&hideoptions=1&username=nagiosadmin&ticket=hhlrana6&locale=en_US&records=100000' as '/usr/local/nagiosxi/tmp/scheduledreport-nagiosadmin-1434239951-page.pdf' ************
I am able to generate reports as CSV with no issues. I've some some searches, and it seems other people have experienced this issue but have not posted the answer to the problem. Any assistance would be appreciated.
Box293
Too Basu
Posts: 5126 Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:
Post
by Box293 » Sun Jun 14, 2015 11:39 pm
Run this command:
Then try and generate the PDF. Do any errors appear?
Do the same again with this command running:
Code: Select all
tail -f /usr/local/nagiosxi/var/cmdsubsys.log
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new
Privacy Policy .
derekb
Posts: 177 Joined: Wed Jun 10, 2015 1:54 pm
Post
by derekb » Mon Jun 15, 2015 9:46 am
Hello Box,
While running those commands, I get no output when I attempt to generate a PDF report.
Any other ideas?
ssax
Dreams In Code
Posts: 7682 Joined: Wed Feb 11, 2015 12:54 pm
Post
by ssax » Mon Jun 15, 2015 10:06 am
What version of XI are you using?
Please post the output of the following commands:
Code: Select all
ls -ld /usr/local/nagiosxi
ls -ld /usr/local/nagiosxi/tmp
Also, what do you have set under Program URL and External URL in Admin > System Config > Manage System Config?
derekb
Posts: 177 Joined: Wed Jun 10, 2015 1:54 pm
Post
by derekb » Mon Jun 15, 2015 10:36 am
ssax wrote: What version of XI are you using?
Please post the output of the following commands:
Code: Select all
ls -ld /usr/local/nagiosxi
ls -ld /usr/local/nagiosxi/tmp
Also, what do you have set under Program URL and External URL in Admin > System Config > Manage System Config?
Nagios XI 2014R2.7
[root@nagios nagiosxi]# ls -ld /usr/local/nagiosxi
drwxr-xr-x. 10 nagios nagios 4096 Jun 8 10:41 /usr/local/nagiosxi
[root@nagios nagiosxi]# ls -ld /usr/local/nagiosxi/tmp
drwsrwsr-x. 2 apache nagios 4096 Jun 13 20:13 /usr/local/nagiosxi/tmp
Program URL:
http://nagios.mydomain.com/nagiosxi/
External URL:
http://nagios.mydomain.com/nagiosxi/
ssax
Dreams In Code
Posts: 7682 Joined: Wed Feb 11, 2015 12:54 pm
Post
by ssax » Mon Jun 15, 2015 11:07 am
derekb
Posts: 177 Joined: Wed Jun 10, 2015 1:54 pm
Post
by derekb » Mon Jun 15, 2015 12:32 pm
ssax wrote: Is selinux enabled?
SELinux status: disabled
ssax
Dreams In Code
Posts: 7682 Joined: Wed Feb 11, 2015 12:54 pm
Post
by ssax » Mon Jun 15, 2015 1:47 pm
Try running the command below and try it again:
Code: Select all
chown nagios.nagios /usr/local/nagiosxi/tmp
derekb
Posts: 177 Joined: Wed Jun 10, 2015 1:54 pm
Post
by derekb » Mon Jun 15, 2015 2:18 pm
That did not work, sadly.
ssax
Dreams In Code
Posts: 7682 Joined: Wed Feb 11, 2015 12:54 pm
Post
by ssax » Mon Jun 15, 2015 3:18 pm
Edit:
Code: Select all
/usr/local/nagiosxi/html/reports/notifications.php
Add This:
Code: Select all
$file = '/tmp/notifications_pdf.sh';
// Write the contents back to the file
file_put_contents($file, $cmd);
Right before this code:
Code: Select all
if (!file_exists($fname)) {
echo "\n\n************\nERROR: Failed to render URL '" . $aurl . "' as '" . $fname . "'\n************\n\n";
Then refresh the page and try to generate the PDF again.
Then right away run this command to see if it works for you:
Let me know the results, if you get any errors, send me the full output.