Page 1 of 1

Scheduled report error

Posted: Mon Jun 26, 2017 1:20 pm
by TBT
We have a user that is authenticating through Fusion and then navigating to an individual XI host where a scheduled report is created. Nagios XI displays the the report under My Scheduled Reports for the user "fusion" (our fused server UID). This particular report is generated successfully when viewed, but never received via email on schedule or when using the "send now" option, the following error is produced:
Report failed to send. ARGV: Array ( [0] => /usr/local/nagiosxi/html/includes/components/scheduledreporting/sendreport.php [1] => --report=IVUvXQ [2] => --username=fusion ) ARGS: Array ( [report] => IVUvXQ [username] => fusion ) SR: Array ( [name] => Weekly Bandwidth Report [type] => [url] => reports/availability.php?reportperiod=lastweek&startdate=&enddate=&host=&service=&hostgroup=&servicegroup=monitor6_Canopy_BW&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] => Canopy Weekly Bandwidth Report - West [body] => [schedule] => Array ( [hour] => 07 [minute] => 51 [ampm] => AM [dayofweek] => 1 [dayofmonth] => 1 ) [attachments] => Array ( [pdf] => on [csv] => 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://monitor6.domain.com/nagiosxi//r ... n&mode=pdf FILE=>Availability_Report.pdf Attached: '/usr/local/nagiosxi/tmp/scheduledreport-fusion-IVUvXQ-Availability_Report.pdf' ATTACHMENT[csv]=on URL=>https://monitor6.domain.com/nagiosxi//r ... e=combined FILE=>Availability_Report.csv Attached: '/usr/local/nagiosxi/tmp/scheduledreport-fusion-IVUvXQ-Availability_Report.csv' EMAIL: Array ( [from] => Nagios XI [to] => [email protected] [subject] => Nagios Report: Canopy Weekly Bandwidth Report - West [attachment] => Array ( [0] => Array ( [0] => /usr/local/nagiosxi/tmp/scheduledreport-fusion-IVUvXQ-Availability_Report.pdf [1] => Availability_Report.pdf ) [1] => Array ( [0] => /usr/local/nagiosxi/tmp/scheduledreport-fusion-IVUvXQ-Availability_Report.csv [1] => Availability_Report.csv ) ) [message] => This scheduled report was automatically generated by Nagios XI and sent to you as requested by fusion (Fusion Server User). You can directly access this report at: https://monitor6.domain.com/nagiosxi/?x ... graphs%3D1 Access Nagios XI at: https://monitor6.domain.com/nagiosxi/ )
Please advise,

Re: Scheduled report error

Posted: Mon Jun 26, 2017 4:06 pm
by tgriep
If you login directly to the Nagios XI server using the fusion account, can the report be sent by email or it the error still happening?
When you do login as that user, can you click on their login name in the top right corner of the XI GUI and verify that the email address is correct.

Also, when reports are sent by email, it uses the External URL: to generate the report, can you go to the Admin > System Settings menu, and verify that the External URL is correct for the system?
If you do change it, try emailing the report again to see if the error is resolved.

Re: Scheduled report error

Posted: Tue Jun 27, 2017 9:22 am
by TBT
tgriep wrote:If you login directly to the Nagios XI server using the fusion account, can the report be sent by email or it the error still happening?
When you do login as that user, can you click on their login name in the top right corner of the XI GUI and verify that the email address is correct.

Also, when reports are sent by email, it uses the External URL: to generate the report, can you go to the Admin > System Settings menu, and verify that the External URL is correct for the system?
If you do change it, try emailing the report again to see if the error is resolved.
1. Direct login results in the same error.
2. Yes, the email address for the fused user is correct.
3. The External URL is not defined as the Program URL is populated and correct.

I should have mentioned that other reports created in the same manner send successfully and do not experience the error noted above.

Please advise,

Re: Scheduled report error

Posted: Tue Jun 27, 2017 10:11 am
by tgriep
It could that when the report is getting emailed, it is hitting a PHP memory limit or a timeout.
You can verify this if you check the Apache Error log files in the /var/log/httpd folder while you recreate the error.

Try this change to the server and see if the reports start to get sent by email afterwards.
Edit your /etc/php.ini and set the following

Code: Select all

max_execution_time = 60     ; Maximum execution time of each script, in  seconds
max_input_time = 120     ; Maximum amount of time each script may spend parsing request data
memory_limit = 1G      ; Maximum amount of memory a script may consume
If they have been increased already, increase them further.
Save the file and restart the Apache daemon by running

Code: Select all

service httpd restart
Then test to see if the reports can be sent after the above changes.

Re: Scheduled report error

Posted: Tue Jul 18, 2017 1:26 pm
by TBT
I've made some adjustments which resolved the issue. Thank you.

Re: Scheduled report error

Posted: Tue Jul 18, 2017 2:23 pm
by bolson
May we go ahead and close this topic?

Re: Scheduled report error

Posted: Tue Jul 18, 2017 2:25 pm
by TBT
Yes.

Re: Scheduled report error

Posted: Tue Jul 18, 2017 2:29 pm
by bolson
Closing this topic as resolved.

Thank you for using the Nagios Support Forum!