Nagios XI report emails zero byte pdf file

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
skynardo
Posts: 136
Joined: Tue Sep 18, 2012 8:59 am
Location: St. Louis, MO

Nagios XI report emails zero byte pdf file

Post by skynardo »

I have been running/emailing a scheduled report using the YTD timeframe for a month or so and noticed last week that the attached pdf file would not open and when saved locally produces a zero byte file. I have found some old posts describing this issue, but I don't have anything in my /var/log/httpd/error_log from this morning's attempted run. The report is scheduled to run at 6am every day.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Nagios XI report emails zero byte pdf file

Post by tmcdonald »

I believe this was fixed already - what XI version are you running?
Former Nagios employee
skynardo
Posts: 136
Joined: Tue Sep 18, 2012 8:59 am
Location: St. Louis, MO

Re: Nagios XI report emails zero byte pdf file

Post by skynardo »

We are running XI 5.2.9
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Nagios XI report emails zero byte pdf file

Post by lmiltchev »

Is this a new install or an upgrade? Have you made any changes to the system prior to noticing the issue, i.e. configuring SSL, changing hostname, etc.?

Go to Admin->System Settings, and show us a screenshot of this page. Also, run the following commands, and show the output:

Code: Select all

ip addr | grep global | grep -m 1 'inet' | awk '/inet[^6]/{print substr($2,0)}' | sed 's|/.*||'
hostname -f
cat /etc/hosts
grep use_https /usr/local/nagiosxi/html/config.inc.php
wkhtmltopdf -V
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Nagios XI report emails zero byte pdf file

Post by lmiltchev »

Update: Initially, I was trying to recreate the issue by scheduling a "regular" report, which worked just fine. However, I forgot that we had an issue when scheduling a page.
The bug will be fixed in Nagios XI 5.3.0, which should be out sometime soon (probably by the end of Sep - middle of Oct; this is not "set in stone" - don't have an exact ETA).
Be sure to check out our Knowledgebase for helpful articles and solutions!
skynardo
Posts: 136
Joined: Tue Sep 18, 2012 8:59 am
Location: St. Louis, MO

Re: Nagios XI report emails zero byte pdf file

Post by skynardo »

Is there a work around? Is it an issue with the YTD timeframe? Unfortunately these reports go to director and above level so we (myself and Nagios) are not looking very good at the moment.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Nagios XI report emails zero byte pdf file

Post by lmiltchev »

I sent you a PM.
Be sure to check out our Knowledgebase for helpful articles and solutions!
skynardo
Posts: 136
Joined: Tue Sep 18, 2012 8:59 am
Location: St. Louis, MO

Re: Nagios XI report emails zero byte pdf file

Post by skynardo »

I upgraded to Nagios 5.3.3 this week and yesterday was able to manually run my YTD report from the Nagios console and though I had to tell chrome to wait several times, it did eventually return a report with data. I scheduled the report to run at 5am on the 1st of each month but when I got in this morning I had no report. When I check running processes that were kicked off at 5am I see:
apache 45270 45254 0 05:00 ? 00:00:00 /bin/sh -c /usr/bin/php /usr/local/nagiosxi/html/includes/components/scheduledreporting/sendreport.php --report=DBjIHr --username="tkwc4" > /dev/n
ull 2>&1
apache 45280 45270 0 05:00 ? 00:00:00 /usr/bin/php /usr/local/nagiosxi/html/includes/components/scheduledreporting/sendreport.php --report=DBjIHr --username=tkwc4
apache 45338 45280 0 05:00 ? 00:00:00 wget --no-check-certificate -O /usr/local/nagiosxi/tmp/scheduledreport-tkwc4-DBjIHr-Availability_Report.pdf http://10.204.240.199/nagiosxi//reports ... atesduring
downtime=yes&includesoftstates=no&assumedhoststate=3&assumedservicestate=6&timeperiod=24x7_exclude_maint_windows&servicegraphs=1&username=tkwc4&ticket=n8vl4ijc6efuojatkhsm4ukqrfpj4happ9eqq07udls
5662qkrgnn5hiha3lpcei&locale=en_US&mode=pdf

When I look at the pdf file specified above I see a zero byte file that was created at 5am.
[root@ut528 ~]# ls -al /usr/local/nagiosxi/tmp/scheduledreport-tkwc4-DBjIHr-Availability_Report.pdf
-rw-r--r-- 1 apache nagios 0 Dec 1 05:00 /usr/local/nagiosxi/tmp/scheduledreport-tkwc4-DBjIHr-Availability_Report.pdf

I don't see any errors or messages in the httpd error.log or ssl_error.logs
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Nagios XI report emails zero byte pdf file

Post by tgriep »

Telling chrome to wait is a good clue. Thanks for posting that.
The report could be timing out and that is why it is zero bytes.
Edit the /etc/php.ini file, find the following options and set them to the example below.

Code: Select all

max_execution_time = 60
max_input_time = 120
memory_limit = 512M
If they are already set that way, increase them.
Then restart the apache process by running the following

Code: Select all

service httpd restart
You can wait for the next run of the report or run it manually to see if it is fixed. Let us know how it works out.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked