hi lmiltchev,
i think option 2 work fine, but have another problem. When i set Schedule page for send the mail. it's not stable, some time show all graphs, sometime show blank. The error report have file size smaller than the normal report. pls see the pictures.
If i use One time report and send immediately, it will fine, no error.
Error_log show like this when i set/edit a report schedule:
[Thu Mar 18 10:04:20.890948 2021] [:error] [pid 2456] [client 192.168.xxx.x:56855] PHP Warning: file_put_contents(/usr/local/nagiosxi/var/scheduledreporting.log): failed to open stream: Permission denied in /usr/local/nagiosxi/html/includes/components/scheduledreporting/scheduledreporting.inc.php on line 727, referer:
http://192.168.xxx.xx/nagiosxi/includes ... a41df4b361
[Thu Mar 18 10:04:20.904669 2021] [:error] [pid 2456] [client 192.168.xxx.x:56855] PHP Warning: file_put_contents(/usr/local/nagiosxi/var/scheduledreporting.log): failed to open stream: Permission denied in /usr/local/nagiosxi/html/includes/components/scheduledreporting/scheduledreporting.inc.php on line 727, referer:
http://192.168.xxx.xx/nagiosxi/includes ... a41df4b361
[Thu Mar 18 10:04:36.056382 2021] [:error] [pid 1476] [client 192.168.xxx.x:56878] PHP Warning: file_put_contents(/usr/local/nagiosxi/var/scheduledreporting.log): failed to open stream: Permission denied in /usr/local/nagiosxi/html/includes/components/scheduledreporting/scheduledreporting.inc.php on line 727, referer:
http://192.168.xxx.xx/nagiosxi/includes ... a41df4b361
[Thu Mar 18 10:04:36.069693 2021] [:error] [pid 1476] [client 192.168.xxx.x:56878] PHP Warning: file_put_contents(/usr/local/nagiosxi/var/scheduledreporting.log): failed to open stream: Permission denied in /usr/local/nagiosxi/html/includes/components/scheduledreporting/scheduledreporting.inc.php on line 727, referer:
http://192.168.xxx.xx/nagiosxi/includes ... a41df4b361
[root@nagiosxi01 var]#less scheduledreporting.log
Daily report
You can directly access this report at:
http://192.168.xxx.xx/nagiosxi/?xiwindo ... 6column%3D
Access Nagios XI at:
http://192.168.xxx.xx/nagiosxi/
)
[Thu, 18 Mar 2021 10:31:03 +0700] EMAIL: Array
(
[to] =>
[email protected]
[subject] => nagiosls02 Performance Graphs
[attachment] => Array
(
[0] => Array
(
[0] => /usr/local/nagiosxi/tmp/scheduledreport-hangltt-k9th3ciSGOLc-1616038261-nagiosls02 Performance Graphs.pdf
[1] => 1616038261-nagiosls02 Performance Graphs.pdf
)
)
[message] => This scheduled report was automatically generated by Nagios XI and sent to you as requested by hangltt.
nagiosls02 Performance Graphs
You can directly access this report at:
http://192.168.xxx.xx/nagiosxi/?xiwindo ... 6column%3D
Access Nagios XI at:
http://192.168.xxx.xx/nagiosxi/
)
[Thu, 18 Mar 2021 10:31:18 +0700] DEBUG: [03-18-2021 10:31:03] Message sent! (method=smtp;host=192.168.xx.xxx;port=25;security=none), Referer: includes/components/scheduledreporting > Scheduled Report
[Thu, 18 Mar 2021 10:31:18 +0700] DEBUG: [03-18-2021 10:31:02] Message sent! (method=smtp;host=192.168.xx.xxx;port=25;security=none), Referer: includes/components/scheduledreporting > Scheduled Report
I have tried change the permission of files but not effect :
[root@nagiosxi01 scheduledreporting]# ls -l | grep schedule
-rwxrwxrwx. 1 nagios nagios 26100 Mar 4 17:53 scheduledreporting.inc.php
[root@nagiosxi01 var]# ls -l scheduledreporting.log
-rwxrwxrwx. 1 nagios nagios 8649 Mar 18 10:23 scheduledreporting.log