Nagios XI report emails zero byte pdf file
Nagios XI report emails zero byte pdf file
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.
Re: Nagios XI report emails zero byte pdf file
I believe this was fixed already - what XI version are you running?
Former Nagios employee
Re: Nagios XI report emails zero byte pdf file
We are running XI 5.2.9
Re: Nagios XI report emails zero byte pdf file
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:
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!
Re: Nagios XI report emails zero byte pdf file
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).
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!
Re: Nagios XI report emails zero byte pdf file
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.
Re: Nagios XI report emails zero byte pdf file
I sent you a PM.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Nagios XI report emails zero byte pdf file
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
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
Re: Nagios XI report emails zero byte pdf file
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.
If they are already set that way, increase them.
Then restart the apache process by running the following
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.
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 = 512MThen restart the apache process by running the following
Code: Select all
service httpd restartBe sure to check out our Knowledgebase for helpful articles and solutions!