I am running Nagios XI 5.4.0 on Centos 7.2.1511. I have a scheduled report configured. If I run the report in browser and choose to download the report as a pdf, it works fine. If I choose to send an email of the report with a pdf attachment, either I get no error and the email never comes, or I get the error below. Emails with any of the other attachment options go though fine.
Report failed to send. ARGV: Array ( [0] => /usr/local/nagiosxi/html/includes/components/scheduledreporting/sendreport.php [1] => --report=X2UVRU [2] => --username=nagiosadmin ) ARGS: Array ( [report] => X2UVRU [username] => nagiosadmin ) SR: Array ( [name] => Weekly Production Load [type] => [url] => reports/availability.php?reportperiod=thismonth&startdate=&enddate=&host=&service=&hostgroup=&servicegroup=Production+Load&advanced=1&assumeinitialstates=yes&assumestateretention=yes&assumestatesduringdowntime=yes&includesoftstates=no&assumedhoststate=3&assumedservicestate=6&timeperiod=&servicegraphs=1 [dontdisplay] => 0 [recipients] => [email protected] [frequency] => Weekly [subject] => Production Load Report [body] => Production load report for the past month. [schedule] => Array ( [hour] => 09 [minute] => 00 [ampm] => AM [dayofweek] => 1 [dayofmonth] => 1 ) [attachments] => Array ( [pdf] => on [jpg] => on ) ) SRO: Array ( [source] => report [attachments] => Array ( [pdf] => Array ( [type] => PDF [file] => Availability_Report.pdf [urlopts] => mode=pdf [icon] => fa-file-pdf-o ) [jpg] => Array ( [type] => JPG [file] => Availability_Report.jpg [urlopts] => mode=jpg [icon] => fa-file-image-o ) [csv] => Array ( [type] => CSV (Combined) [file] => Availability_Report.csv [urlopts] => mode=csv&csvtype=combined [icon] => fa-file-text-o ) [csvhost] => Array ( [type] => CSV (Host data only) [file] => Host_Availability.csv [urlopts] => mode=csv&csvtype=host [icon] => fa-file-text-o ) [csvservice] => Array ( [type] => CSV (Service data only) [file] => Service_Availability.csv [urlopts] => mode=csv&csvtype=service [icon] => fa-file-text-o ) ) ) ATTACHMENT[pdf]=on URL=>https://nm.trumid.com/nagiosxi//reports ... S&mode=pdf FILE=>Availability_Report.pdf Attached: '/usr/local/nagiosxi/tmp/scheduledreport-nagiosadmin-X2UVRU-Availability_Report.pdf' ATTACHMENT[jpg]=on URL=>https://nm.trumid.com/nagiosxi//reports ... S&mode=jpg FILE=>Availability_Report.jpg Attached: '/usr/local/nagiosxi/tmp/scheduledreport-nagiosadmin-X2UVRU-Availability_Report.jpg' EMAIL: Array ( [from] => Nagios XI [to] => [email protected] [subject] => Nagios Report: Production Load Report [attachment] => Array ( [0] => Array ( [0] => /usr/local/nagiosxi/tmp/scheduledreport-nagiosadmin-X2UVRU-Availability_Report.pdf [1] => Availability_Report.pdf ) [1] => Array ( [0] => /usr/local/nagiosxi/tmp/scheduledreport-nagiosadmin-X2UVRU-Availability_Report.jpg [1] => Availability_Report.jpg ) ) [message] => This scheduled report was automatically generated by Nagios XI and sent to you as requested by nagiosadmin (Nagios Administrator). Production load report for the past month. You can directly access this report at: https://nm.trumid.com/nagiosxi/?xiwindo ... graphs%3D1 Access Nagios XI at: https://nm.trumid.com/nagiosxi/ )
Please let me know if I can provide any additional information.
Thanks,
Chris
PDF Report Fails to Send
Re: PDF Report Fails to Send
There were a few odd bugs with 5.4.0 depending on which version you received relating to notifications like this - could you upgrade and try once again?
Former Nagios Employee
Re: PDF Report Fails to Send
I will upgrade this evening and report back. Thanks.
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: PDF Report Fails to Send
Fantastic. We are here until 5pm US Central. If you respond after that, we'll get back to you tomorrow. Thanks!
Re: PDF Report Fails to Send
The upgrade didn't correct the problem but I've not had time to troubleshoot further yet. Hopefully this week.
Re: PDF Report Fails to Send
Can you PM over a profile to myself and dwhitfield to review? This will have quite a few log files, and may lead to what the problem is. (Admin -> System Profile -> Download Profile)
The other files I'd be interested in seeing are -
The other files I'd be interested in seeing are -
Code: Select all
/var/log/httpd/error_log
/var/log/httpd/ssl_error_log
/var/log/httpd/access_log
/var/log/httpd/ssl_access_log
Former Nagios Employee
Re: PDF Report Fails to Send
Just checking in since we have not heard from you in a while. Did @rkennedy's post clear things up?
Former Nagios employee
Re: PDF Report Fails to Send
I just sent the requested information over. I did just notice that the report sends with a pdf successfully if I don't select "Display service performance graphs". It fails with graphs. There are 70 graphs in this report.
Thanks,
Chris
Thanks,
Chris
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: PDF Report Fails to Send
in your /etc/php.ini please set the following
You've got PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 34827903 bytes) in /usr/local/nagiosxi/html/includes/phpmailer/class.smtp.php on line 655 in your error_log.
It's possible you just need to give the machine more resources, but clearly you're exceeding the limit.
Code: Select all
max_execution_time = 60 ; Maximum execution time of each script, in seconds
max_input_time = 60 ; Maximum amount of time each script may spend parsing request data
memory_limit = 256M ; Maximum amount of memory a script may consume
It's possible you just need to give the machine more resources, but clearly you're exceeding the limit.