Can not generate PDFs from reports

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
mrjsokol
Posts: 109
Joined: Thu Apr 16, 2020 10:27 am

Re: Can not generate PDFs from reports

Post by mrjsokol »

We are using a non standard port for Nagios XI web server. We use SSL on the web server.
dchurch
Posts: 858
Joined: Wed Oct 07, 2020 12:46 pm
Location: Yo mama

Re: Can not generate PDFs from reports

Post by dchurch »

1. Edit /usr/local/nagiosxi/html/config.inc.php, and around line 27, replace where it says $cfg['port_number'] = false; with the port number you're using to connect to the Nagios XI web interface.
2. Change $cfg['use_https'] = false; to = true

E.g. If I'm connected on port 8192, I would change it to

Code: Select all

// Force http/https
$cfg['use_https'] = true; // determines whether cron jobs and other scripts will force the use of HTTPS instead of HTTP

// Allow for different http port for subsystem calls 
$cfg['port_number'] = 8192;
Caveat: Do not put any commas or decimal points in the port number.

While you're editing that file, you could also tweak a setting that may be causing issues. Around line 53, change "latin1" to 'utf8' under where it says "ndoutils" => array(...:

Code: Select all

    "ndoutils" => array(
        "dbtype" => 'mysql',
        "dbserver" => 'localhost',
        "user" => 'ndoutils',
        "db" => 'nagios',
        "charset" => 'utf8',
If you didn't get an 8% raise over the course of the pandemic, you took a pay cut.

Discussion of wages is protected speech under the National Labor Relations Act, and no employer can tell you you can't disclose your pay with your fellow employees.
mrjsokol
Posts: 109
Joined: Thu Apr 16, 2020 10:27 am

Re: Can not generate PDFs from reports

Post by mrjsokol »

Good afternoon Dchurch,

We are getting close to the solution. It may have to do with our configuration of the SSL certificate. We are getting the following error now:

Bad Request
Your browser sent a request that this server could not understand.
Reason: You're speaking plain HTTP to an SSL-enabled server port.
Instead use the HTTPS scheme to access this URL, please.
mrjsokol
Posts: 109
Joined: Thu Apr 16, 2020 10:27 am

Re: Can not generate PDFs from reports

Post by mrjsokol »

Issue fixed:

Changed the following line:
// Force http/https
$cfg['use_https'] = true; // determines whether cron jobs and other scripts wil$

Original setting:
// Force http/https
$cfg['use_https'] = False; // determines whether cron jobs and other scripts wil$

This thread can be closed.

Thank you for your help,

Joseph
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Can not generate PDFs from reports

Post by scottwilkerson »

mrjsokol wrote:Issue fixed:

Changed the following line:
// Force http/https
$cfg['use_https'] = true; // determines whether cron jobs and other scripts wil$

Original setting:
// Force http/https
$cfg['use_https'] = False; // determines whether cron jobs and other scripts wil$

This thread can be closed.

Thank you for your help,

Joseph
Locking thread
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked