Page 1 of 1

Scheduled Reports

Posted: Mon Jun 14, 2021 1:30 pm
by seaward1983
Red Hat Enterprise Linux Server release 7.9 (Maipo)
x86_64
Manual install of XI -- running since 2019
Version of XI - Installed Version: 5.8.3

Email alerts - work fine
Manually run reports - work fine
Schedule reports - no workie
tailing scheduledreporting.log doesn't show the time I tested for the report or
CMD: crontab -l | grep -v '/usr/bin/php /usr/local/nagiosxi/html/includes/components/scheduledreporting/sendreport.php --report='\''fXesMKRiGYGV'\'' --username='\''USERNAME'\''' | cat - '/usr/local/nagiosxi/tmp/scheduledreport.fXesMKRiGYGV' | crontab - ; rm -f '/usr/local/nagiosxi/tmp/scheduledreport.fXesMKRiGYGV'

What is curious (may or may not be related) -- I go to the /usr/local/nagiosxi/tmp - and there is nothing for 2021 here. I looks like everything is being written to /tmp

What permissions are supposed to be on /usr/local/nagiosxi/tmp? Right now it's

drwsrwsr-x 2 root nagios 4096 Jun 14 13:25 tmp

Re: Scheduled Reports

Posted: Tue Jun 15, 2021 11:22 am
by ssax
That's what I have as well:

Code: Select all

[root@xid archives]# ls -ld /usr/local/nagiosxi/tmp
drwsrwsr-x 3 root nagios 317 Apr  5 11:55 /usr/local/nagiosxi/tmp
If you add a new scheduled report, do you see it show up in /var/spool/cron/apache?

Please PM me a copy of your profile, you can download it from Admin > System Profile by clicking the Download Profile button.

PM these files as well:

Code: Select all

/etc/php.ini
/var/spool/cron/apache
Are the cron jobs running properly?

Code: Select all

tail /var/log/cron
Please send the FULL output of these commands (as root):
- NOTE: You may need to adjust the -h 127.0.0.1, the -uroot, and -pnagiosxi in the first command if your DB is contained/stored on another server and/or you've changed the root mysql password

Code: Select all

mysql -h 127.0.0.1 -uroot -pnagiosxi -e 'SELECT NOW(); SELECT @@GLOBAL.time_zone, @@SESSION.time_zone;'
date
ls -l /etc/localtime
php -r 'echo date("D M j G:i:s T Y")."\n";'
grep "date.timezone =" /etc/php.ini
grep timezone /var/lib/pgsql/data/postgresql.conf

Re: Scheduled Reports

Posted: Wed Jun 16, 2021 10:07 am
by ssax
Please edit your /etc/php.ini and change these:

Code: Select all

max_execution_time = 60
max_input_vars = 7000
memory_limit = 256M
To these:

Code: Select all

max_execution_time = 300
max_input_vars = 50000
memory_limit = 1024M
Then restart httpd:

Code: Select all

systemctl restart httpd
Then edit this file:

Code: Select all

/usr/local/nagiosxi/html/config.inc.php
Change this:

Code: Select all

$cfg['use_https'] = false;
To this:

Code: Select all

$cfg['use_https'] = true;
While you're in that file, change this:

Code: Select all

        "charset" => "latin1",
To this:

Code: Select all

        "charset" => "utf8",
What is the output of this command?

Code: Select all

ls -lh /var/spool/cron/apache

Re: Scheduled Reports

Posted: Thu Jun 17, 2021 12:04 pm
by seaward1983
Output of the command
-rw-r-----. 1 apache apache 25 Feb 2 08:21 /var/spool/cron/apache

Re: Scheduled Reports

Posted: Thu Jun 17, 2021 12:26 pm
by seaward1983
Not sure if this is an option - but is there a way to submit the report to be scheduled in cron from cli? Maybe I can catch an error that way?

Re: Scheduled Reports

Posted: Thu Jun 17, 2021 1:28 pm
by seaward1983
This issue can be closed. The user "apache" existed in /etc/cron.deny Once I removed it - crontab started populating. Sorry for the trouble.