Where are scheduled report definitions stored?

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
joe.ward
Posts: 44
Joined: Tue Aug 06, 2013 10:44 am

Where are scheduled report definitions stored?

Post 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?
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Where are scheduled report definitions stored?

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Where are scheduled report definitions stored?

Post 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.
Former Nagios employee
joe.ward
Posts: 44
Joined: Tue Aug 06, 2013 10:44 am

Re: Where are scheduled report definitions stored?

Post 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...
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Where are scheduled report definitions stored?

Post 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?
You do not have the required permissions to view the files attached to this post.
Be sure to check out our Knowledgebase for helpful articles and solutions!
joe.ward
Posts: 44
Joined: Tue Aug 06, 2013 10:44 am

Re: Where are scheduled report definitions stored?

Post 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.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Where are scheduled report definitions stored?

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
joe.ward
Posts: 44
Joined: Tue Aug 06, 2013 10:44 am

Re: Where are scheduled report definitions stored?

Post 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...
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Where are scheduled report definitions stored?

Post by lmiltchev »

If you get the report tomorrow (I hope not... :) ), PM me the whole email (with the headers) for a review.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked