Scheduled reports not being sent

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
gwakem
Posts: 238
Joined: Mon Jan 23, 2012 2:02 pm
Location: Asheville, NC

Scheduled reports not being sent

Post by gwakem »

RHEL 7.6
XI 5.6.5

Hey all, I have an issue with scheduled reports not running. I can invoke a scheduled report and tell it to run manually with no issues, but if I schedule it in advance, it doesn't run and doesn't show up as even attempting in maillog.

Permissions on the folder and files look ok as far as I would expect:

Code: Select all

10:48:13 [root@xi var]# ll /usr/local/nagiosxi/html/includes/components/ |grep scheduledreporting
drwxr-xr-x  2 nagios nagios  136 Feb  7 08:57 scheduledreporting
10:48:19 [root@xi var]# ll /usr/local/nagiosxi/html/includes/components/scheduledreporting
total 612K
drwxr-xr-x  2 nagios nagios  136 Feb  7 08:57 .
drwxr-xr-x 71 nagios nagios 4.0K Jul 18 10:11 ..
-rw-r--r--  1 nagios nagios 2.4K Jul 29 08:17 CHANGES.txt
-rw-r--r--  1 nagios nagios 159K Jul 29 08:17 manage.php
-rw-r--r--  1 nagios nagios  774 Jun 21  2016 sanity.sh
-rw-r--r--  1 nagios nagios  24K Jul 29 08:17 scheduledreporting.inc.php
-rw-r--r--  1 nagios nagios 317K Jul 29 08:17 schedulereport.php
-rw-r--r--  1 nagios nagios  95K Jul 29 08:17 sendreport.php
Any ideas of what I can check?
--
Griffin Wakem
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Scheduled reports not being sent

Post by scottwilkerson »

It should show in here

Code: Select all

tail -50 /usr/local/nagiosxi/var/scheduledreporting.log
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
User avatar
gwakem
Posts: 238
Joined: Mon Jan 23, 2012 2:02 pm
Location: Asheville, NC

Re: Scheduled reports not being sent

Post by gwakem »

Odd:

Code: Select all

-rw-r--r--  1 nagios nagios 1.6K Jul  1 12:09 scheduledreporting.log.1.gz
It looks like the first entry in that rolled log is from June 21st, and the last is July 1st (obvs.) No regular log has been written to.

I have been testing the scheduled reports since before August 1st, so I would expect to see failures at least, but no log at all. I've checked /etc/crontab and such, based on the info I found in the rolled logs, and that all looks fine. I created the scheduledreporting.log, assigned the permissions, scheduled a report for two minutes in the future, let it run and... nothing. I selected the "send now" action, and still no output to the log. I did get the email with attached report however.
--
Griffin Wakem
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Scheduled reports not being sent

Post by scottwilkerson »

It doesn't seem like the actual file even exists.

Lets do this:

Code: Select all

touch /usr/local/nagiosxi/var/scheduledreporting.log
chown nagios.nagios /usr/local/nagiosxi/var/scheduledreporting.log
chmod ug+rw /usr/local/nagiosxi/var/scheduledreporting.log
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
User avatar
gwakem
Posts: 238
Joined: Mon Jan 23, 2012 2:02 pm
Location: Asheville, NC

Re: Scheduled reports not being sent

Post by gwakem »

Sorry, it may have gotten lost in the text above, but I did that in my last post, and then tested another scheduled run a few minutes out, as well as forcing it to run from the scheduled report screen after the time passed. Nothing was written to the log. Here is the log I created, which is exactly in line with what you asked:

Code: Select all

# ll /usr/local/nagiosxi/var/scheduledreporting.log
-rw-rw-r-- 1 nagios nagios 0 Aug  5 12:33 /usr/local/nagiosxi/var/scheduledreporting.log
--
Griffin Wakem
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Scheduled reports not being sent

Post by scottwilkerson »

Hmm, these cron jobs are usually kicked off by the apache cron located at

Code: Select all

/var/spool/cron/apache
Are there any errors in the cron log?

Code: Select all

grep apache /var/log/cron
Did the apache user somehow get added to the cron.deny ?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
User avatar
gwakem
Posts: 238
Joined: Mon Jan 23, 2012 2:02 pm
Location: Asheville, NC

Re: Scheduled reports not being sent

Post by gwakem »

There is no /etc/cron.deny on the system, but I did find these errors in the cron log:

Code: Select all

Aug  6 09:02:37 xi crontab[10445]: (apache) AUTH (crontab command not allowed)
This information led me down the path to the fix. after some testing on various things, I found I had to put apache in cron.allow, and that corrected the issue. Thank you for your help.. this can be closed up.
--
Griffin Wakem
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Scheduled reports not being sent

Post by scottwilkerson »

gwakem wrote:There is no /etc/cron.deny on the system, but I did find these errors in the cron log:

Code: Select all

Aug  6 09:02:37 xi crontab[10445]: (apache) AUTH (crontab command not allowed)
This information led me down the path to the fix. after some testing on various things, I found I had to put apache in cron.allow, and that corrected the issue. Thank you for your help.. this can be closed up.
Great!

Locking
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked