Page 1 of 1

Where are scheduled report definitions stored?

Posted: Wed Jul 30, 2014 9:54 am
by joe.ward
I have a couple of scheduled reports that I cannot find where they are defined. In Nagios XI, the Reports -> Scheduled Reports folder is empty. I've logged in as Nagios admin and as the users who receive the report but none of them have scheduled reports defined! How can I find out which ID has the report scheduled?

Re: Where are scheduled report definitions stored?

Posted: Wed Jul 30, 2014 11:53 am
by lmiltchev
It's run on the cron job by apache. To see if you have any scheduled reports, you can view the apache crontab:

Code: Select all

crontab -u apache -l

Re: Where are scheduled report definitions stored?

Posted: Wed Jul 30, 2014 12:21 pm
by tmcdonald
I'm looking through the databases and I see where they are stored but I can't tell what field is the user ID. I'll see if a developer can chime in on this.

Re: Where are scheduled report definitions stored?

Posted: Wed Jul 30, 2014 12:29 pm
by joe.ward
Thank you lmiltchev!

Unfortunately there is still a mystery!

crontab -u apache -l returns 4 lines, the first starts with #, followed by 3 blank lines.

#crontab for apache user
blank
blank
blank


So I went to /var/spool/cron and listed the files. Only "apache" was there. When I vi the file, and :set list to see the non-printable characters, it matches the previous output.

#crontab for apache user$
$
$
$


Is there anywhere else these reports could be running from? I see another reply from tmcdonald. Maybe that lead will pan out...

Re: Where are scheduled report definitions stored?

Posted: Wed Jul 30, 2014 1:21 pm
by lmiltchev
How many Nagios XI servers do you have? Scheduled reports should show up in the apache cron. For example, on one of my test boxes, I have two scheduled reports, and here's what you can see in the crontab.
example01.PNG
Do you have any scheduled reports now? If you schedule a "new", test report, does it show in the apache crontab?

Re: Where are scheduled report definitions stored?

Posted: Wed Jul 30, 2014 2:43 pm
by joe.ward
Hello lmitchev,

I only have one Nagios server. Yes, if I create a new scheduled report, it shows up in crontab -u apache -l. When I delete the new scheduled report in Nagios, it is removed from crontab.

I don't see any useful clues in the cron.log file. cron.log mentions /usr/local/nagiosxi/var/reportengine.log but the file is empty.

Re: Where are scheduled report definitions stored?

Posted: Thu Jul 31, 2014 11:21 am
by lmiltchev
This is very strange. No entries, but you are still getting a report... What is the report that you are getting? Do you have multiple instances of nagios running?

Code: Select all

ps -ef | grep bin/nagios
Try restarting nagios service, crond, and apache.

Code: Select all

service nagios stop
killall nagios
service crond restart
service httpd restart

Re: Where are scheduled report definitions stored?

Posted: Thu Jul 31, 2014 1:17 pm
by joe.ward
Only one instance of nagios is running.

I have stopped and restarted the services as requested. The report runs daily at 09:00 EDT so I won't know if the restart had any impact until tomorrow.

The report is "www.domain.com Availability". When I open the PDF, it says I don't have permissions for the host. Since I didn't want the report any way, I didn't think much about it... until now.

www.domain.com was defined as a host at one point, but has been deleted. Maybe something wasn't cleaned up completely when the host was deleted...

Re: Where are scheduled report definitions stored?

Posted: Thu Jul 31, 2014 3:36 pm
by lmiltchev
If you get the report tomorrow (I hope not... :) ), PM me the whole email (with the headers) for a review.