Hey,
sorry for a very late reply
Unfortunately it expects a simple numeric priority field not the “!!!
– HIGH” that RHQ puts out. Can anyone point us to the code that formats this subject line?
I have been unable to find it. This chunk of code appears to build the email:
747 alertDefinition.getName(), //
748 alertDefinition.getPriority().toString(), //
AlertDefiition.getPriority() is an enum in the Domain module, where the toString()
method returns the displayName.
See org.rhq.core.domain.alert.AlertPriority
public enum AlertPriority {
LOW("Low"), MEDIUM("Medium"), HIGH("High");
private String displayName;
private AlertPriority(String displayName) {
this.displayName = displayName;
}
Easiest could be to copy the email alert sender source and modify above code
around 748 to something like
int prio;
switch( alertDefinition.getPriority())
case HIGH: prio=2; break;
case MEDIUM: prio=1; break;
default: prio=0;
}
and then in line 748 use the prio variable.
749 new Date(alert.getCtime()).toString(), //
750 prettyPrintAlertConditions(alert.getConditionLogs(), false), //
751 prettyPrintAlertURL(alert));
So it seems like the Priority class’s toString() method builds it.
Our alternative to customizing the code is passing the email through some sort of
transforming filter. Suggestions are welcome!
I apologize if this is a newbie question – it’s been a while since I looked at the code
and I only have rudimentary Java knowledge
Al Amyot | Consultant
Sierra Systems
(eHealth): 204-926-4257 (T): 204-942-2575 (C): 204-230-7911 (F): 204-942-2047
444 St. Mary Avenue, Suite 1050
Winnipeg, MB R3C 3T1
Management Consulting | System Integration | Managed Services
website:
www.SierraSystems.com
facebook -
www.sierrasystems.com/facebook
google+ -
www.sierrasystems.com/google+
linkedin -
www.sierrasystems.com/linkedin
twitter -
www.sierrasystems.com/twitter
This email and/or any documents in this transmission is intended for the
addressee(s) only and may contain legally privileged or confidential information. Any
unauthorized use, disclosure, distribution, copying or dissemination is strictly
prohibited. If you receive this transmission in error, please notify the sender
immediately and return the original.
Ce courriel et tout document dans cette transmission est destiné à la personne ou aux
personnes à qui il est adressé. Il peut contenir des informations privilégiées ou
confidentielles. Toute utilisation, divulgation, distribution, copie, ou diffusion non
autorisée est strictement défendue. Si vous n'êtes pas le destinataire de ce message,
veuillez en informer l'expéditeur immédiatement et lui remettre l'original.
_______________________________________________
rhq-users mailing list
rhq-users(a)lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/rhq-users
--
Reg. Adresse: Red Hat GmbH, Technopark II, Haus C,
Werner-von-Siemens-Ring 14, D-85630 Grasbrunn
Handelsregister: Amtsgericht München HRB 153243
Geschaeftsführer: Mark Hegarty, Charlie Peters, Michael Cunningham, Charles Cachera