Class Monitor

java.lang.Object
edu.suffolk.litlab.efspserver.Monitor

public class Monitor extends Object
  • Field Details

    • EXTERNAL_DOMAIN

      public static final String EXTERNAL_DOMAIN
  • Constructor Details

    • Monitor

      public Monitor()
  • Method Details

    • sendErrorNotification

      public static void sendErrorNotification(String errorStr)
      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 template
      context - the mapping of jinja variables in `template` to the strings they should become.
      See Also: