tietang / javamelody

Automatically exported from code.google.com/p/javamelody
0 stars 1 forks source link

In the collector server, send an email when an application becomes unavailable #333

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In the optional collector server, send an email to admins when an application 
becomes unavailable or available again (and not every minute).

From the users' group:
https://groups.google.com/forum/#!topic/javamelody/2QV0CeTTiAg

Original issue reported on code.google.com by evernat@free.fr on 19 Aug 2013 at 10:28

GoogleCodeExporter commented 9 years ago
In the CollectorServer.collectWithoutErrors() method, we could add something 
like:

final Mailer mailer = new 
Mailer(Parameters.getParameter(Parameter.MAIL_SESSION));
final String adminEmails = Parameters.getParameter(Parameter.ADMIN_EMAILS);
mailer.send(adminEmails, subject, message, null, false);

Original comment by evernat@free.fr on 19 Aug 2013 at 10:30

GoogleCodeExporter commented 9 years ago
It's done in trunk (revision 3501) and ready for the next release (1.47).

I have made a new build of the war file of the collector server and it is 
available at:
https://javamelody.googlecode.com/files/javamelody-20130901.war

For this, it will be needed to configure a mail session and 2 parameters like 
for the reports by mail (for example, in the Tomcat context of the collector 
webapp): 
https://code.google.com/p/javamelody/wiki/UserGuide#13._Weekly,_daily_or_monthly
_reports_by_mail

Original comment by evernat@free.fr on 1 Sep 2013 at 12:53