Emailing pdf or jpg reports Nagios XI web unresponsive

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
jisaacs
Posts: 5
Joined: Mon Apr 11, 2016 1:02 pm

Emailing pdf or jpg reports Nagios XI web unresponsive

Post by jisaacs »

Trial version of Nagios XI Enterprise edition. Downloaded VMWare image, patched and updated, configured for our environment.

Everything is working well except for emailing pdf or jpg reports. Email notifications work perfectly and reports sent as csv work fine as well. The web interface becomes unresponsive when attempting to email reports either as jpg or pdf. SSH is still active, service nagios restart and service nagiosxi restart do not help. Server needs to be restarted to re-enable web interface.


Nagios XI Installation Profile
System:
Nagios XI Version : 5.2.7
server.domain.com 2.6.32-573.22.1.el6.x86_64 x86_64
CentOS release 6.7 (Final)
Gnome is not installed
Apache Information
PHP Version: 5.3.3
Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0
Server Name: server.domain.com
Server Address: xxx.xxx.xxx.xxx
Server Port: 443
Date/Time
PHP Timezone: US/Central
PHP Time: Mon, 02 May 2016 15:29:56 -0500
System Time: Mon, 02 May 2016 15:29:56 -0500
Nagios XI Data
License ends in:

Days left in Trial: 37

nagios (pid 1856) is running...
NPCD running (pid 1779).
ndo2db (pid 1797) is running...
CPU Load 15: 0.13
Total Hosts: 6
Total Services: 44
Function 'get_base_uri' returns: https://ccmblxns0003.cancercare.mb.ca/nagiosxi/
Function 'get_base_url' returns: https://ccmblxns0003.cancercare.mb.ca/nagiosxi/
Function 'get_backend_url(internal_call=false)' returns: https://server.domain.com/nagiosxi/incl ... rofile.php
Function 'get_backend_url(internal_call=true)' returns: http://localhost/nagiosxi/backend/
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Emailing pdf or jpg reports Nagios XI web unresponsive

Post by rkennedy »

Are you forcing SSL? I noticed the 443 in your paste from the profile page.

Additionally, please attach a screenshot of your Admin -> System Settings page, and also your /etc/hosts file for us to take a look at.
Former Nagios Employee
jisaacs
Posts: 5
Joined: Mon Apr 11, 2016 1:02 pm

Re: Emailing pdf or jpg reports Nagios XI web unresponsive

Post by jisaacs »

Yes, we are forcing SSL. ipv6 is disabled too. Reports sent as csv work perfectly. The web interface hangs when sending as pdf or jpg.

/etc/hosts
127.0.0.1 localhost.localdomain localhost.localdomain localhost4 localhost4.localdomain4 localhost
::1 localhost.localdomain localhost.localdomain localhost6 localhost6.localdomain6 localhost
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Emailing pdf or jpg reports Nagios XI web unresponsive

Post by rkennedy »

It may not be resolving internal calls properly.

Can you also attach a screenshot of your Admin -> System Settings page?
Former Nagios Employee
bwallace
Posts: 1145
Joined: Tue Nov 17, 2015 1:57 pm

Re: Emailing pdf or jpg reports Nagios XI web unresponsive

Post by bwallace »

Thanks for the /etc/hosts listing, but we have to see a screenshot of the Admin -> System Settings page as well --
Be sure to check out the Knowledgebase for helpful articles and solutions!
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Emailing pdf or jpg reports Nagios XI web unresponsive

Post by ssax »

Please validate that under Admin > System Settings that your Program URL and if you're using the External URL are accessible from the XI command line (can XI ping it from the command line).

Since you are forcing SSL, did you edit:

Code: Select all

/usr/local/nagiosxi/html/config.inc.php
And set:

Code: Select all

$cfg['use_https'] = true;
Also, is there a proxy in front of this?

I always add the FQDN on the 127.0.0.1 /etc/hosts entry so that it would never go out of the server for local requests.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Emailing pdf or jpg reports Nagios XI web unresponsive

Post by tgriep »

In the XI gui, can you go to Admin > System Settings and make sure the External URL is valid?
Also, can you run the following command while logged in as root to the XI server.

Code: Select all

tail -f /var/log/httpd/*.log
Then try and email a report and post the output from the tail command.
Be sure to check out our Knowledgebase for helpful articles and solutions!
jisaacs
Posts: 5
Joined: Mon Apr 11, 2016 1:02 pm

Re: Emailing pdf or jpg reports Nagios XI web unresponsive

Post by jisaacs »

Under Admin > System Settings I verified that the program url was using https.

I did not have the following set so I edited /usr/local/nagiosxi/html/config.inc.php and set $cfg['use_https'] = true;

I added the fqdn to the hosts file, tailed /var/log/httpd/error_log while trying to send reports with pdf and jpg attachments and was able to successfully send pdf and jpg attachments.

I believe the piece that resolved this was adding the fqdn to the hosts file. I see in the error_log that prior to adding the fqdn the server was being resolved to it's external address and I was getting a zend_mm_heap corrupted error in the logs, once the server was able to resolve the fqdn to 127.0.0.1 everything worked, with a few second pause while generating the file.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Emailing pdf or jpg reports Nagios XI web unresponsive

Post by rkennedy »

XI does internal calls, to itself, and that's why this issue arises. Glad to see it resolved though!

Closing this one out, but feel free to make a new thread if you need any assistance in the future.
Former Nagios Employee
Locked