AlertManagerLocal alertManager = LookupUtil.getAlertManager();
ResourceManagerLocal resourceManager = LookupUtil.getResourceManager();
List lineage = resourceManager.getResourceLineage(alert.getAlertDefinition().getResource().getId());
String platformName = ((Resource)lineage.get(0)).getName();
String conditions = alertManager.prettyPrintAlertConditions(alert, false).replace('\n', ' ');
String alertURL = alertManager.prettyPrintAlertURL(alert);
StringBuilder message = new StringBuilder();
message.append("ALERT,");
message.append(alert.getAlertDefinition().getPriority().getName());
message.append(',');