NagiosXI not emailing scheduled reports

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
sampath.krb
Posts: 23
Joined: Fri Dec 09, 2016 3:07 pm

NagiosXI not emailing scheduled reports

Post by sampath.krb »

Hi There,

I am trying to schedule some dashboards to be emailed via scheduled reports, but it doesn't seem to be working. Although I am able to send the reports manually.

Please Help.

Thank You.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: NagiosXI not emailing scheduled reports

Post by dwhitfield »

Sometimes, this can be due to report generation timing out. What time of day are the reports scheduled to send? What file type are you using in the reports? PDFs seem to be particularly problematic when it comes to time out issues. What the actual report type you are trying to send?

Are there any specific time frames (a year, a month) that are not emailing? When you say you are able to send the reports manually, do you mean with the "Email this Report" button or downloading and attaching to an email?

What version of XI are you running?
sampath.krb
Posts: 23
Joined: Fri Dec 09, 2016 3:07 pm

Re: NagiosXI not emailing scheduled reports

Post by sampath.krb »

Dear dwhitfield,

Thank you for the quick reply.

What time of day are the reports scheduled to send?
-- There is no particular time. I have scheduled a report to trigger in next 10-15 mins, but no luck.

What file type are you using in the reports?
-- Since I created these reports, I do not see any other file types other than PDFs. I do not see any other format I can select when scheduling a report.

What the actual report type you are trying to send?
-- I have some dashboards which I created and am looking to email those dashboards as reports.

Are there any specific time frames (a year, a month) that are not emailing?
-- Not really. I tried even this morning by creating a report with schedule to email me around the time frame when I create the report.

When you say you are able to send the reports manually, do you mean with the "Email this Report" button or downloading and attaching to an email?
-- "Email this Report" works. The other manual way am trying is, after scheduling a report based on an existing dashboard, there is a button "Send Now". Please see the attached screenshot.

What version of XI are you running?
-- Nagios XI 5.4.2

Thank You.
You do not have the required permissions to view the files attached to this post.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: NagiosXI not emailing scheduled reports

Post by dwhitfield »

What's the output of systemctl status crond? (and if no systemd service crond status)

Also, what's the output of the following:

Code: Select all

cat /etc/cron.d/nagiosxi
ll /usr/local/nagiosxi/html/includes/components/scheduledreporting
tail /usr/local/nagiosxi/tmp/phpmailer.log
tail /var/log/maillog
On the maillog, schedule a report for just before, or probably you'll need to give me more output like tail -100. It's hard to say without knowing how many emails you are sending.

The reason I asked about the time of day is because if it is a load issue, then sending them in off hours can be useful.

If you click on the report, you should be able to see what file types are being sent.

UPDATE: info received and shared with techs
Sampath.Basireddy
Posts: 252
Joined: Wed Dec 14, 2016 12:30 pm

Re: NagiosXI not emailing scheduled reports

Post by Sampath.Basireddy »

@dwhitfield, By mistake I have submitted this case via my personal ID. I sent you a Private Message with the requested details.

Apologies for the inconvenience.

Thank You,
Sampath.
sampath.krb
Posts: 23
Joined: Fri Dec 09, 2016 3:07 pm

Re: NagiosXI not emailing scheduled reports

Post by sampath.krb »

@dwhitfield, Please let me know if you need any additional details.

Thank You.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: NagiosXI not emailing scheduled reports

Post by dwhitfield »

Please provide the output of crontab -u apache -l

Also, whatever command is displayed there, run it from the command line and display the output. It should be something like /usr/bin/php /usr/local/nagiosxi/html/includes/components/scheduledreporting/sendreport.php --report=FfCRU0 --username="nagiosadmin"

To be clear, we want the whole crontab output, not just the command output. Thanks!
sampath.krb
Posts: 23
Joined: Fri Dec 09, 2016 3:07 pm

Re: NagiosXI not emailing scheduled reports

Post by sampath.krb »

Here is the output. Basically no results.

root@<srv_name>:[~]: crontab -u apache -l
#crontab for apache user
root@<srv_name>:[~]:
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: NagiosXI not emailing scheduled reports

Post by dwhitfield »

Please run the following two commands and see if they resolve your issue

Code: Select all

chmod 755 /usr/local/nagiosxi/html/includes/components/scheduledreporting/schedulereport.php
chmod 755 /usr/local/nagiosxi/html/includes/components/scheduledreporting/sendreport.php
If not, what email(s) are these supposed to be going to? You can PM that if you like.

Also, can you provide your sudoers? Again, PM is fine.

That crontab not having anything in it is a problem. We need to fix that. However, right now it's not clear why your rescheduled reports are not getting listed there.

UPDATE: latest PM received and shared with techs
sampath.krb
Posts: 23
Joined: Fri Dec 09, 2016 3:07 pm

Re: NagiosXI not emailing scheduled reports

Post by sampath.krb »

No luck even after following the mentioned steps...

-rwxr-xr-x 1 nagios nagios 74695 Feb 13 15:22 sendreport.php
-rwxr-xr-x 1 nagios nagios 249721 Feb 13 15:22 schedulereport.php


I have PM'd you the other details you asked for.
Locked