PDF Report error

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
gwijnant
Posts: 37
Joined: Tue Sep 08, 2015 4:22 am

PDF Report error

Post by gwijnant »

Hi,

I just downloaded and installed Nagios XI to evaluate the monitoring software.
When trying to create a PDF report I get the following error in a pdf file:

Not Found
The requested URL /reports/availability.php was not found on this server.
Apache/2.2.15 (CentOS) Server at x.x.x.x Port 80

Can anyone give me atleas a clue on where to look?
I have searched this forum but nothing that can help me out (I dont think its a proxy issue).

Creating a report of CSV files works.

Best Regards,

Guy
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: PDF Report error

Post by tmcdonald »

I assume you are running the latest version, but just to confirm can you please specify the XI version?

Also, do you see anything in /var/log/httpd/error_log when you try to run a PDF report?
Former Nagios employee
gwijnant
Posts: 37
Joined: Tue Sep 08, 2015 4:22 am

Re: PDF Report error

Post by gwijnant »

Hi tmcdonald,

Here the requested info:

Version of nagios: Nagios XI 2014R2.7

The following appears in the error_log file:
[Wed Sep 09 10:37:07 2015] [error] [client 'server ip'] File does not exist: /var/www/html/reports

Best Regards,

Guy
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: PDF Report error

Post by lmiltchev »

Are you using/forcing SSL? Go to Admin->Manage System Config and post a screenshot of this page ("System Settings"). Also run:

Code: Select all

cat /etc/hosts
and show the output.
Be sure to check out our Knowledgebase for helpful articles and solutions!
gwijnant
Posts: 37
Joined: Tue Sep 08, 2015 4:22 am

Re: PDF Report error

Post by gwijnant »

Hi,

Output of cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6

In attachment you will find the screenshot

How can I check if I am using/forcing SSL? I have not changed any settings regarding this in my knowledge.
You do not have the required permissions to view the files attached to this post.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: PDF Report error

Post by lmiltchev »

How can I check if I am using/forcing SSL? I have not changed any settings regarding this in my knowledge.
If you haven't change anything, you are not using SSL. Are you using an IP address or a FQDN in the "Program URL" field?

Example:

Code: Select all

http://192.168.0.5/nagiosxi/
vs

Code: Select all

http://myxiserver/nagiosxi/
You can try adding the hostname of your server to the "/etc/hosts" and see if this is going to fix your issue. See an example of how to do this here:

http://www.cyberciti.biz/faq/centos-hos ... mand-line/
Be sure to check out our Knowledgebase for helpful articles and solutions!
gwijnant
Posts: 37
Joined: Tue Sep 08, 2015 4:22 am

Re: PDF Report error

Post by gwijnant »

I am using an IP Address in the Program URL field.

I have also tried adding the hostname to the /etc/hosts file.

127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
X.X.X.X cvlwrl
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6

I restarted the network services after the change but still get the same error.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: PDF Report error

Post by tmcdonald »

Have you modified your Apache settings?

What does the following yield?

Code: Select all

grep -R "/var/www" /usr/local/nagiosxi/html
grep -R "/var/www" /etc/httpd/conf.d
Former Nagios employee
gwijnant
Posts: 37
Joined: Tue Sep 08, 2015 4:22 am

Re: PDF Report error

Post by gwijnant »

I have not modified any Apache settings.

Requested output:
[root@cvlwrl ~]# grep -R "/var/www" /usr/local/nagiosxi/html
/usr/local/nagiosxi/html/config.inc.php: "dir" => "/var/www/html/nagiosql",
/usr/local/nagiosxi/html/includes/components/nagiosbpi/INSTALL: $file = '/var/www/http_public/nagiosbpi/api_tool.php';
[root@cvlwrl ~]# grep -R "/var/www" /etc/httpd/conf.d
/etc/httpd/conf.d/nagiosql.conf:Alias /nagiosql "/var/www/html/nagiosql"
/etc/httpd/conf.d/nagiosql.conf:<Directory "/var/www/html/nagiosql">
/etc/httpd/conf.d/ssl.conf.nagiosxibackup:#DocumentRoot "/var/www/html"
/etc/httpd/conf.d/ssl.conf.nagiosxibackup:<Directory "/var/www/cgi-bin">
/etc/httpd/conf.d/ssl.conf:#DocumentRoot "/var/www/html"
/etc/httpd/conf.d/ssl.conf:<Directory "/var/www/cgi-bin">
/etc/httpd/conf.d/mrtg.conf:Alias /mrtg /var/www/mrtg
[root@cvlwrl ~]#


Thanks!
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: PDF Report error

Post by tgriep »

One of the things that could cause the PDF reports to fail is that the Program URL on the Admin > System Settings screen is not set like below.

Code: Select all

http://xxx.xxx.xxx.xxx/nagiosxi/
If the /nagiosxi/ is not on the end of the URL, the PDF reports will not work.
Make sure it is set like the example above.
Can you run the following in a shell on the Nagios system and post the output?

Code: Select all

ll /usr/local/nagiosxi/
ll /usr/local/nagiosxi/html/
ll /usr/local/nagiosxi/html/reports/
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked