Reports plugin not sending mail

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
User avatar
AndyStewart
Cacti User
Posts: 102
Joined: Thu Sep 29, 2005 5:21 am
Location: Edinburgh, Scotland

Reports plugin not sending mail

Post by AndyStewart »

Currently have the reports plugin installed (v0.1b) and have a report set up as a test.

Report looks ok, and preview looks ok as well.

But the scheduled mail never arrives.

I've checked the function report_mail in functions.php and noticed there were a few differences between it and the report_mail function in the thold plugin, so modified the code to look the same but to no avail - still no mail.

I know its a beta plugin, but is there any way i can test the report_mail function? can't find anything appearing in the cacti.log file and can't seem to find where the report_mail function is called from?

the thold mails work perfectly btw...
I don't care if the glass is half full or half empty, i want to know, who's been drinking my pint!!!

[size=75][Windows 2003 & IIS6] [Cacti 0.8.7b] [ActivePerl 5.8.8.817] [MySql 5.0.19] [NetSNMP 5.2.1.2-1] [PHP 5.1.2] [RRDTool 1.2.11]
[Plugins: PluginArchitecture, Monitor, Discovery, Threshold, Update, Reports, Manage, RealTime][/size]
blackakashi
Posts: 11
Joined: Mon Feb 13, 2006 7:51 am

Post by blackakashi »

Hi Andy,

It may be a poller bug.
Can you try with the cmd.php ?

Greetings.
Boris
User avatar
AndyStewart
Cacti User
Posts: 102
Joined: Thu Sep 29, 2005 5:21 am
Location: Edinburgh, Scotland

Post by AndyStewart »

this is running with cmd.php ;) never managed to get cactid working as the poller properly yet....
I don't care if the glass is half full or half empty, i want to know, who's been drinking my pint!!!

[size=75][Windows 2003 & IIS6] [Cacti 0.8.7b] [ActivePerl 5.8.8.817] [MySql 5.0.19] [NetSNMP 5.2.1.2-1] [PHP 5.1.2] [RRDTool 1.2.11]
[Plugins: PluginArchitecture, Monitor, Discovery, Threshold, Update, Reports, Manage, RealTime][/size]
User avatar
AndyStewart
Cacti User
Posts: 102
Joined: Thu Sep 29, 2005 5:21 am
Location: Edinburgh, Scotland

Post by AndyStewart »

bump - anyone got any ideas? could REALLY do with getting this working ;)
I don't care if the glass is half full or half empty, i want to know, who's been drinking my pint!!!

[size=75][Windows 2003 & IIS6] [Cacti 0.8.7b] [ActivePerl 5.8.8.817] [MySql 5.0.19] [NetSNMP 5.2.1.2-1] [PHP 5.1.2] [RRDTool 1.2.11]
[Plugins: PluginArchitecture, Monitor, Discovery, Threshold, Update, Reports, Manage, RealTime][/size]
User avatar
NHDave
Cacti User
Posts: 61
Joined: Sun Mar 20, 2005 9:14 am
Contact:

Post by NHDave »

Start by turning on debug logging for one pass near the time you schedule a report to be sent and check for errors.
User avatar
AndyStewart
Cacti User
Posts: 102
Joined: Thu Sep 29, 2005 5:21 am
Location: Edinburgh, Scotland

Post by AndyStewart »

ok had debug logging on for a poll (scheduled task running E:\PHP\php-win.exe e:\inetpub\wwwroot\cacti\poller.php)

Cannot find any reference in the cacti.log to any files in the reports plugin folder.

I'm assuming that there should be a call somewhere in there to the check-reports.php file, but there isn't.
I don't care if the glass is half full or half empty, i want to know, who's been drinking my pint!!!

[size=75][Windows 2003 & IIS6] [Cacti 0.8.7b] [ActivePerl 5.8.8.817] [MySql 5.0.19] [NetSNMP 5.2.1.2-1] [PHP 5.1.2] [RRDTool 1.2.11]
[Plugins: PluginArchitecture, Monitor, Discovery, Threshold, Update, Reports, Manage, RealTime][/size]
User avatar
NHDave
Cacti User
Posts: 61
Joined: Sun Mar 20, 2005 9:14 am
Contact:

Post by NHDave »

What I get in mine anyways. Won't be anything related to a filename in reports folder.

07/06/2006 08:30:08 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select * from reports"
07/06/2006 08:30:08 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select * from reports_data where reportid=3 order by gorder"
07/06/2006 08:30:09 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "update reports set lastsent = 1152189009 where id = 3"
User avatar
AndyStewart
Cacti User
Posts: 102
Joined: Thu Sep 29, 2005 5:21 am
Location: Edinburgh, Scotland

Post by AndyStewart »

...i get the 1st 2 lines in my logs, but not the 3rd line...
I don't care if the glass is half full or half empty, i want to know, who's been drinking my pint!!!

[size=75][Windows 2003 & IIS6] [Cacti 0.8.7b] [ActivePerl 5.8.8.817] [MySql 5.0.19] [NetSNMP 5.2.1.2-1] [PHP 5.1.2] [RRDTool 1.2.11]
[Plugins: PluginArchitecture, Monitor, Discovery, Threshold, Update, Reports, Manage, RealTime][/size]
User avatar
NHDave
Cacti User
Posts: 61
Joined: Sun Mar 20, 2005 9:14 am
Contact:

Post by NHDave »

Since you don't have the "lastsent" I would first go back to and restore the original functions file you edited or reinstall the plugin altogether and ensure you have the db tables in place.
NetAdmin
Cacti User
Posts: 98
Joined: Wed Aug 30, 2006 8:45 pm

Post by NetAdmin »

I'm in the exact same boat. I've got the report functionality installed and I'm able to create reports just fine, but nothing is getting emailed. (Kind of defeats the purpose.)

My Thold plugin is sending email just fine.

I would really like to get this report plugin to send emails as well. Has anyone got this working, even though it is still in beta?????

Thanks!
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

Did anyone ever get a response to this question ? I have a need to send reports via email, and can generate the reports fine (preview) etc, but can't email them - anyone have any ideas ?

Thanks
cigamit
Developer
Posts: 3369
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Post by cigamit »

Look at your PHP.ini mail settings. The reports plugin doesn't have all the extra sending options of thold, so it only tries sending out via PHP's Mail function. If your PHP isn't set to properly send mail, it won't make it out the door.
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

Could you give me an example of what I need to change ? THOLD works fine - I'd like to have the REPORTS plugin working too, as I have at least one immediate requirement for a daily management report.

Thanks
argon0
Cacti User
Posts: 460
Joined: Fri Mar 12, 2004 1:22 pm

Post by argon0 »

What you need to do is to get Sendmail working from your box, as the PHPMail function uses Sendmail to send stuff out.

Then Choose PHPmail in the THold/Alerting part of the settings, then give it a try.

I'd give a quick tutorial on how to get Sendmail working, if I knew what I had done to get it working!!!

However there is fair (if not complete) documentation in the Webmin manual...

Argon0
No longer a n00by, probably, by now an 0ldby

Now Head of Technology at RSCH, back to the prickly subject of Monitorring....
NetAdmin
Cacti User
Posts: 98
Joined: Wed Aug 30, 2006 8:45 pm

Post by NetAdmin »

Just wondering if there were any plans on updating the reports plugin so that it has the same sending functions as Thold. I'm using the SVN version of Reports which is very nice, but I'm unable to send email since my Cacti is configured to use SMTP. I don't have SendMail installed.

Thanks.

NetAdmin
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest