Alert message configuration with XSL
You can customize the formatting for your alert messages by modifying one of the default XSL style sheets, or creating your own XSL template. The default XSL style sheets are divided into different sections for each type of alert messages. Discover administrators who are comfortable with XSL can modify the text and formatting of each type of alert.
Before you begin
About this task
- If the Discover server cannot access the customized template that you specified, the default alert template is used and a message is logged in the log file.
- The alert service identifies a template by the file name. To avoid overwriting a template, the administrators can follow a specific naming scheme for your templates.
- The template XSLs must have the following tags to generate the
subject and body of the email:The following section lets the server select the email body or email subject from template:
<xsl:template match="AlertServiceAlertMessage"> <xsl:choose> <xsl:when test="@MessageType[.='Default']"> <xsl:call-template name="MailBodyDefault" /> </xsl:when> <xsl:when test="@MessageType[.='SubjectDefault']"> <xsl:call-template name="MailSubjectDefault" /> </xsl:when> </xsl:choose> </xsl:template>
The following sections defines the email body:<xsl:template name="MailBodyDefault"> <HTML> <HEAD> ... ... ... </BODY> </HTML> </xsl:template>
The following sections defines the email subject:<xsl:template name="MailSubjectDefault"> Discover Event Test Email <xsl:value-of select="ThresholdCategory" /> <xsl:value-of select="EventTitle" /> </xsl:template>
Procedure
Complete the following steps to use your customized template
for alert messages: