Skip to content

Commit

Permalink
Merge branch '3.8' of https://github.com/JumpMind/symmetric-ds into 3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Hanes committed Sep 20, 2016
2 parents 25db2b4 + 5e76ab6 commit bce9fb3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Expand Up @@ -78,12 +78,13 @@ public void notify(Notification notification, List<MonitorEvent> monitorEvents)
text.append(nodeString).append("] [");
text.append(event.getHostName()).append("] ");
text.append("Monitor event for ").append(event.getType());
text.append(" exceeded ").append(event.getValue()).append("\n");
text.append(" reached threshold of ").append(event.getThreshold());
text.append(" with a value of ").append(event.getValue()).append("\n");
}

String recipients = notification.getExpression();
if (recipients != null) {
log.debug("Sending email with subject '" + subject + "' to " + recipients);
log.info("Sending email with subject '" + subject + "' to " + recipients);
engine.getMailService().sendEmail(subject, text.toString(), recipients);
} else {
log.warn("Notification " + notification.getNotificationId() + " has no email recipients configured.");
Expand Down
Expand Up @@ -45,8 +45,8 @@ public void notify(Notification notification, List<MonitorEvent> monitorEvents)
for (MonitorEvent monitorEvent : monitorEvents) {
Node node = nodes.get(monitorEvent.getNodeId());
String nodeString = node != null ? node.toString() : monitorEvent.getNodeId();
String message = "Monitor " + monitorEvent.getType() + " on " + nodeString + " recorded "
+ monitorEvent.getValue();
String message = "Monitor " + monitorEvent.getType() + " on " + nodeString + " reached threshold of "
+ monitorEvent.getThreshold() + " with a value of "+ monitorEvent.getValue();
if (monitorEvent.getSeverityLevel() >= Monitor.SEVERE) {
log.error(message);
} else if (monitorEvent.getSeverityLevel() >= Monitor.WARNING) {
Expand Down

0 comments on commit bce9fb3

Please sign in to comment.