Package edu.suffolk.litlab.efspserver
Class Monitor
java.lang.Object
edu.suffolk.litlab.efspserver.Monitor
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
sendErrorNotification
(String errorStr) Sends error notifications, without overwhelming the monitoring channel.static void
Sends an error notification immediately.
-
Field Details
-
EXTERNAL_DOMAIN
-
-
Constructor Details
-
Monitor
public Monitor()
-
-
Method Details
-
sendErrorNotification
Sends error notifications, without overwhelming the monitoring channel. Can be called whenever, and will only send a notification once every 2 minutes.This works because most of the error info is still in the logs.
-
sendImmediateErrorNotification
public static void sendImmediateErrorNotification(String subject, String template, Map<String, Object> context) Sends an error notification immediately. Should only call for scheduled processes, and not anything that can be triggered by an API user.The server needs to be able to send email messages for monitoring to work.
- Parameters:
subject
- The subject of the notification (email subject for now)template
- The body of the notification, as a jinja templatecontext
- the mapping of jinja variables in `template` to the strings they should become.- See Also:
-