Skip Headers
Oracle® Enterprise Manager Installation and Configuration Guide for CA Service Desk Connector
Release 12.1.0.3.0

E28577-05
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

5 Using Default Templates

This chapter provides details on the default ticket templates shipped along with the CA Service Desk Connector. The ticket templates specify the mappings between Enterprise Manager incident attributes and Service Desk ticket attributes.

5.1 Understanding the Template Process

All out-of-box templates cause the following actions to occur when you create or update a ticket for an incident:

  • Write incident information to Description (Service Desk ticket description).

  • Set the Service Desk ticket summary based on the incident message.

  • Add a Log Comment to the Incident Activity Log List that shows the incident details. This provides a record of the changes that have occurred to the incident.

  • Sets the Service Desk priority based on the severity of the incident in Enterprise Manager.

The out-of-box templates are as follows:

  • CASD_Default_Incident.xsl

    The CASD_Default_Incident.xls template creates, updates, or reopens a Service Desk ticket using the default field mapping. The template does not close the ticket when the event severity value becomes Clear.

  • CASD_Default_Incident_AutoClose.xsl

    The CASD_Default_Incident_AutoClose.xsl template creates, updates, or reopens a Service Desk ticket using the default field mapping. The template sets the ticket status to Closed when the event severity value becomes Clear.

5.2 Reading and Mapping Ticket Templates

Table 5-1 illustrates the creation of a ticket using the default templates. This illustration will help you to read a ticket template. In the tables, * denotes a literal string and ** indicates whether the attribute applies.

Ticket creation mappings are the same for CASD_Default_Incident_AutoClose.xsl and CASD_Default_Incident.xsl.

Table 5-1 shows Service Desk ticket attributes and corresponding Enterprise Manager incident values for ticket creation mappings.

Table 5-1 Ticket Creation Mappings (for all templates)

Service Desk Ticket Attributes Enterprise Manager incident Attributes Value

Summary

Message

N/A

Description

For incidents:

EMUser - Notification rule owner when the ticket is created through auto-ticketing, and is the Enterprise Manager log-in user when the ticket is created through manual-ticketing.

Other Incident information includes:

Source Name

Source Owner - Example: Sysman

Source Type

Source SubType

Target Name

Target Type

Target URL

TargetProperties** - name:value pairs of defined target properties. For example:

Line of business:

Finance

Owner:

Finance-DB Team

Severity

Priority

Creation Date - Incident Creation Date

Last Updated Date

Owner - Incident Owner

Notification Rule Name

URL - URL to the metric details page in the context of the incident.

Incident Status

Incident Acknowledge Flag

Incident Auto Close

Incident Escalation Level

Values from incident context

Priority

Based on Severity Code

For metric incidents:

  • If severity is Fatal, set Priority to Medium-High (2).

  • If severity is Critical, set Priority to Medium (3).

  • If severity is Warning, set Priority to Medium-Low (4).

  • Otherwise, set Priority to Low (5).

Reported By

N/A

Administrator

Activity Log

Same content as the Description attribute.

See the Description attribute above.

z_em_connector_id (Custom field)

Connector GUID

Only set for the CASD Connector. This field is not set for the CASD No Publish Connector.


Table 5-2 shows Service Desk ticket attributes and corresponding Enterprise Manager alert incident attributes for ticket update mappings. The CASD_Default_Incident.xsl and CASD_Default_Incident_AutoClose.xsl mappings templates are almost identical. The only difference is in the status field. The AutoClose template sets it to CL, and the other template does not set the field. This difference is noted in the table.

Table 5-2 Ticket Updates (For All Templates)

Service Desk Ticket Attributes Enterprise Manager incident Attributes Value

Identifier

TicketID - Extracts only the internal identifier from the ticket id

N/A

Summary

Message

N/A

Description

Same content as the Description attribute for create transactions.

See Table 5-1.

Priority

Based on Severity code.

JobStatus - Applies to job status events

For metric incidents:

  • If severity is Fatal, set Priority to Medium-High (2).

  • If severity is Critical, set Priority to Medium (3).

  • If severity is Warning, set Priority to Medium-Low (4).

  • Otherwise, set Impact to Low (5).

Status

For metric incidents:

Grace Period

Severity

For metric incidents:

If Grace Period is set to "Yes" set Status to Open (OP).

If an Autoclose template and Severity is set to Clear, set Status to Close (CL).

Otherwise do not set Status.

Activity Log

Same content as the Description attribute.

See Table 5-1.

z_em_connector_id (Custom field)

Connector GUID

Only set for the CASD Connector. This field is not set for the CASD No Publish Connector.


Use the mapping tables (Table 5-1 and Table 5-2) as a reference to read the XSLT file in .

Example 5-1 CASD_Default_Incident_AutoClose.xsl Source Code with Annotations

<?xml version='1.0' encoding='UTF-8'?>
<xsl:stylesheet version="1.0" 
              xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
              xmlns:ns0="http://xmlns.oracle.com/sysman/connector">
 
  <!--
This template creates an incident type ticket within CA Service Desk with default settings. On update, the ticket summary is updated with the latest event message and priority information as an activity log entry. 
  
  -->
  
  <xsl:template match="ns0:EMIncident">
    <xsl:choose>
      <xsl:when test="normalize-space(ns0:TicketID) = ''">
        <!-- EDIT THE TAG VALUES BELOW TO CHANGE HOW A CASD INCIDENT IS FILLED               DURING INCIDENT CREATION -->    
        <iwaveaf:create xmlns:iwaveaf=
         "http://iwavesoftware.com/services/adapter-framework">
          <incident>
 
            <!-- Set the CASD Incident Priority-->
            <!--     Possible values for priority: -->
            <!--       1 = High                    -->
            <!--       2 = Medium-High             -->
            <!--       3 = Medium                  -->
            <!--       4 = Medium-Low              -->
            <!--       5 = Low                     -->
            <!--       None                        -->
            <xsl:choose>
              <xsl:when test="ns0:SystemAttributes/ns0:SeverityCode = 'FATAL'">  
                <priority>2</priority> <!-- CASD Medium-High -->
              </xsl:when>
              <xsl:when test="ns0:SystemAttributes/ns0:SeverityCode = 'CRITICAL'">  
                <priority>3</priority> <!-- CASD Medium -->
              </xsl:when>
              <xsl:when test="ns0:SystemAttributes/ns0:SeverityCode = 'WARNING'">  
                <priority>4</priority>  <!-- CASD Medium-Low -->
              </xsl:when>
              <xsl:otherwise>
                <priority>5</priority> <!-- CASD Low -->
              </xsl:otherwise>
            </xsl:choose>
 
            <!-- Set the CASD Incident Description -->
            <description>
              <xsl:call-template name="getDescription">
                      <xsl:with-param name="message">Incident created by Oracle Enterprise                 Manager CA Service Desk Connector</xsl:with-param>    
                <xsl:with-param name="addHref">true</xsl:with-param>    
              </xsl:call-template>
            </description>
 
            <!-- Set the CASD Incident Reported By -->
            <!-- This field is defaulted to Administrator but can be changed to               any to any valid -->
            <!-- CASD account. A lookup will be performed based on the first,                middle and last names. -->
            <customer>
              <firstName></firstName>
              <middleName></middleName>
              <lastName>Administrator</lastName>
            </customer>

            <!-- Set the CASD Incident Priority-->
            <!--     Possible values for priority: -->
            <!--       1 = High                    -->
            <!--       2 = Medium-High             -->
            <!--       3 = Medium                  -->
            <!--       4 = Medium-Low              -->
            <!--       5 = Low                     -->
            <!--       None                        -->
            <xsl:choose>
              <xsl:when test="ns0:SystemAttributes/ns0:SeverityCode = 'FATAL'">  
                <priority>2</priority> <!-- CASD Medium-High -->
              </xsl:when>
              <xsl:when test="ns0:SystemAttributes/ns0:SeverityCode = 'CRITICAL'">  
                <priority>3</priority> <!-- CASD Medium -->
              </xsl:when>
              <xsl:when test="ns0:SystemAttributes/ns0:SeverityCode = 'WARNING'">  
                <priority>4</priority>  <!-- CASD Medium-Low -->
              </xsl:when>
              <xsl:otherwise>
                <priority>5</priority> <!-- CASD Low -->
              </xsl:otherwise>
            </xsl:choose>
 
            <!-- Set the CASD Incident Description -->
            <description>
              <xsl:call-template name="getDescription">
                      <xsl:with-param name="message">Incident created by Oracle Enterprise                  Manager CA Service Desk Connector</xsl:with-param>    
                <xsl:with-param name="addHref">true</xsl:with-param>    
              </xsl:call-template>
            </description>
 
            <!-- Set the CASD Incident Reported By -->
            <!-- This field is defaulted to Administrator but can be changed to               any to any valid -->
            <!-- CASD account. A lookup will be performed based on the first,               middle and last names. -->
            <customer>
              <firstName></firstName>
              <middleName></middleName>
              <lastName>Administrator</lastName>
            </customer>
 
            <!-- Set the CASD Incident Summary -->
            <summary><xsl:value-of               select="ns0:SystemAttributes/ns0:Summary"/></summary>
 
            <!-- Add a CASD Activity log entry -->
            <logs>
              <log>
                <description>
                  <xsl:call-template name="getDescription">
                    <xsl:with-param name="message">Incident created by Oracle                      Enterprise Manager CA Service Desk Connector</xsl:with-param>
                    <xsl:with-param name="addHref">false</xsl:with-param>    
                  </xsl:call-template>
                </description>
              </log>
            </logs>
 
<!-- Set the z_em_connector_id custom field in CASD to the EM event identifier. The custom field is required for the publishTicket operation and must be added by an CASD administrator -->
<!-- If the publishTicket operation is not going to be used, this code can be commented out. -->
            <extended-fields>
              <string-field name="z_em_connector_id"><xsl:value-of                 select="ns0:ConnectorGUID"/></string-field>
            </extended-fields>
 
        <!--  UNCOMMENT THE TAGS YOU WISH TO HAVE MODIFIED WHENEVER   -->
        <!--  THE INCIDENT IS CREATED, AND GIVE THEM DESIRED VALUES   --> 
 
            <!-- <status></status> -->
            <!--     Possible values for status: -->
            <!--         ACK (Acknowledged) -->
            <!--         CL (Closed) -->
            <!--         OP (Open) -->
            <!--         WIP (Work In Progress) -->
            <!--         AVOID (Avoided) -->
            <!--         FIP (Fix in Progress) -->
            <!--         CLREQ (Close Requested) -->
            <!--         KE (Known Error) -->
            <!--         CNCL (Cancelled) -->
            <!--         HOLD (Hold) -->
            <!--         CLUNRSLV (Closed-Unresolved) -->
            <!--         PRBAPP (Problem-Approved) -->
            <!--         PC (Problem-Closed) -->
            <!--         PF (Problem-Fixed) -->
            <!--         PRBANCOMP (Problem-Analysis Complete) -->
            <!--         PO (Problem-Open) -->
            <!--         RSCH (Researching) -->
            <!--         RE (Resolved) -->
            <!--         PRBREJ (Problem-Rejected) -->
 
            <!-- <impact></impact> -->
            <!--     Possible values for impact: -->
            <!--         1-Entire Organization -->
            <!--         2-Multiple Groups -->
            <!--         3-Single Group -->
            <!--         4-Small Group -->
            <!--         5-One person -->
            <!--         None -->
 
            <!-- <urgency></urgency> -->
            <!--     Possible values for urgency: -->
            <!--         1-As Possible -->
            <!--         2-Soon -->
            <!--         3-Quickly -->
            <!--         4-Very Quickly -->
            <!--         5-Immediate -->
 
            <!-- <severity></severity> -->
            <!--     Possible values for severity: -->
            <!--         1-Escalated -->
            <!--         2-Superviser Escal. -->
            <!--         3-Mgr Escal. -->
            <!--         4-HD Mgr Escalation -->
            <!--         5-All Hands Escalation -->
 
          </incident>
        </iwaveaf:create>
      </xsl:when>
      <xsl:otherwise>
        <iwaveaf:update xmlns:           iwaveaf="http://iwavesoftware.com/services/adapter-framework">
          <incident>
            <identifier><xsl:value-of select=               "normalize-space(substring-before(substring-after(ns0:TicketID,                 '('), ')'))"/></identifier>

            <!-- Set the CASD Incident Summary -->
            <summary><xsl:value-of select=               "ns0:SystemAttributes/ns0:Summary"/></summary>
 
            <!-- Set the CASD Incident Description -->
            <description>
              <xsl:call-template name="getDescription">
                <xsl:with-param name="message">Incident updated by Oracle                  Enterprise Manager CA Service Desk Connector</xsl:with-param>
                <xsl:with-param name="addHref">true</xsl:with-param>    
              </xsl:call-template>
            </description>
 
            <!-- Set the CASD Incident Priority-->
            <!--     Possible values for priority: -->
            <!--       1 = High                    -->
            <!--       2 = Medium-High             -->
            <!--       3 = Medium                  -->
            <!--       4 = Medium-Low              -->
            <!--       5 = Low                     -->
            <!--       None                        -->
            <xsl:choose>
              <xsl:when test="ns0:SystemAttributes/ns0:SeverityCode = 'FATAL'">  
                <priority>2</priority> <!-- CASD Medium-High -->
              </xsl:when>
              <xsl:when test="ns0:SystemAttributes/ns0:SeverityCode = 'CRITICAL'">  
                <priority>3</priority> <!-- CASD Medium -->
              </xsl:when>
              <xsl:when test="ns0:SystemAttributes/ns0:SeverityCode = 'WARNING'">  
                <priority>4</priority>  <!-- CASD Medium-Low -->
              </xsl:when>
              <xsl:otherwise>
                <priority>5</priority>  <!-- CASD Low -->
              </xsl:otherwise>
            </xsl:choose>
 
 
        <!--  UNCOMMENT THE TAGS YOU WISH TO HAVE MODIFIED WHENEVER   -->
        <!--  THE INCIDENT IS UPDATED, AND GIVE THEM DESIRED VALUES   --> 
 
            <!-- <status></status> -->
            <!--     Possible values for status: -->
            <!--         ACK (Acknowledged) -->
            <!--         CL (Closed) -->
            <!--         OP (Open) -->
            <!--         WIP (Work In Progress) -->
            <!--         AVOID (Avoided) -->
            <!--         FIP (Fix in Progress) -->
            <!--         CLREQ (Close Requested) -->
            <!--         KE (Known Error) -->
            <!--         CNCL (Cancelled) -->
            <!--         HOLD (Hold) -->
            <!--         CLUNRSLV (Closed-Unresolved) -->
            <!--         PRBAPP (Problem-Approved) -->
            <!--         PC (Problem-Closed) -->
            <!--         PF (Problem-Fixed) -->
            <!--         PRBANCOMP (Problem-Analysis Complete) -->
            <!--         PO (Problem-Open) -->
            <!--         RSCH (Researching) -->
            <!--         RE (Resolved) -->
            <!--         PRBREJ (Problem-Rejected) -->
 
            <!-- <impact></impact> -->
            <!--     Possible values for impact: -->
            <!--         1-Entire Organization -->
            <!--         2-Multiple Groups -->
            <!--         3-Single Group -->
            <!--         4-Small Group -->
            <!--         5-One person -->
            <!--         None -->
 
            <!-- <urgency></urgency> -->
            <!--     Possible values for urgency: -->
            <!--         1-As Possible -->
            <!--         2-Soon -->
            <!--         3-Quickly -->
            <!--         4-Very Quickly -->
            <!--         5-Immediate -->
 
            <!-- <severity></severity> -->
            <!--     Possible values for severity: -->
            <!--         1-Escalated -->
            <!--         2-Superviser Escal. -->
            <!--         3-Mgr Escal. -->
            <!--         4-HD Mgr Escalation -->
            <!--         5-All Hands Escalation -->
 
            <!-- <resolution>
                   <resolutionDate></resolutionDate>
                 </resolution> -->
            <!-- Resolution date must be formatted using the ISO 8601 format code.                    -->
            <!--     Sample format: 2009-11-24T09:57:01Z -->
            <!--     Sample format: 2009-11-24T03:57:01-06:00 -->
 
            <xsl:choose>
              <xsl:when test="ns0:ReopenTicket = 'Yes'">
                <!-- Set the CASD Incident Status back to Open -->
                <status>OP</status>
 
                <!-- Add a CASD Activity log entry -->
                <logs>
                  <log>
                    <description>
                      <xsl:call-template name="getDescription">
                        <xsl:with-param name="message">Incident reopened by Oracle                     Enterprise Manager CA Service Desk Connector</xsl:with-param>
                        <xsl:with-param name="addHref">false</xsl:with-param>    
                      </xsl:call-template>
                    </description>
                  </log>
                </logs>
              </xsl:when>
 
              <!-- Close the incident if the EM Severity is set to Clear. -->
              <xsl:when test="ns0:SystemAttributes/ns0:SeverityCode = 'CLEAR'">
                <!-- Set the CASD Incident Status to Closed -->
                <status>CL</status>
 
                <!-- Add a CASD Activity log entry -->
                <logs>
                  <log>
                    <description>
                      <xsl:call-template name="getDescription">
                        <xsl:with-param name="message">Incident closed by Oracle                   Enterprise Manager CA Service Desk Connector</xsl:with-param>
                        <xsl:with-param name="addHref">false</xsl:with-param>    
                      </xsl:call-template>
                    </description>
                  </log>
                </logs>
              </xsl:when>
              
              <xsl:otherwise>
                <!-- Add activity log entry with a standard update message since                    this is not a reopen.-->
                <logs>
                  <log>
                    <description>
                      <xsl:call-template name="getDescription">
                        <xsl:with-param name="message">Incident updated by Oracle                    Enterprise Manager CA Service Desk Connector</xsl:with-param>
                        <xsl:with-param name="addHref">false</xsl:with-param>    
                      </xsl:call-template>
                    </description>
                  </log>
                </logs>
              </xsl:otherwise>
            </xsl:choose>
          </incident>
        </iwaveaf:update>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>
 
  <xsl:template name="getDescription">
    <xsl:param name="message"/>
    <xsl:param name="addHref"/>
    
    <xsl:variable name="msg">
      <xsl:choose>
        <xsl:when test="normalize-space(ns0:SystemAttributes/ns0:UpdatedAttributes) != ''">
<xsl:value-of select="$message"/> for change in attributes : <xsl:value-of select="ns0:SystemAttributes/ns0:UpdatedAttributes"/>
        </xsl:when>
        <xsl:otherwise>
<xsl:value-of select="$message"/>
        </xsl:otherwise>
      </xsl:choose> 
    </xsl:variable>
    
<xsl:value-of select="$msg"/>.
-----------------------------------------------------------------------------------------
EM User: <xsl:value-of select="ns0:NotificationRuleOwner"/>
    
Incident Information:
<xsl:for-each select="ns0:SystemAttributes/ns0:SourceInfo"><xsl:text>&#xa;</xsl:text>    Source Name: <xsl:value-of select="./ns0:SourceObjInfo/ns0:ObjName" />
      <xsl:choose>
        <xsl:when test="normalize-space(./ns0:SourceObjInfo/ns0:ObjOwner) != ''">
    Source Owner: <xsl:value-of select="./ns0:SourceObjInfo/ns0:ObjOwner" />
        </xsl:when>
      </xsl:choose>
    Source Type: <xsl:value-of select="./ns0:SourceObjInfo/ns0:SourceObjType"/>
    Source SubType: <xsl:value-of select="./ns0:SourceObjInfo/ns0:SourceObjSubType"/>
    Target Name: <xsl:value-of select="./ns0:TargetInfo/ns0:TargetName"/>
    Target Type: <xsl:value-of select="./ns0:TargetInfo/ns0:TargetType"/>
    Target Type Label: <xsl:value-of select="./ns0:TargetInfo/ns0:TargetTypeLabel"/>
  <xsl:choose>
    <xsl:when test="$addHref = 'true' and ./ns0:TargetInfo/ns0:TargetURL != ''">
    Target URL: &lt;a href="<xsl:value-of select="./ns0:TargetInfo/ns0:TargetURL"/>" target="_blank"&gt;<xsl:value-of select="./ns0:TargetInfo/ns0:TargetURL"/>&lt;/a&gt;<xsl:text/>
    </xsl:when>
    <xsl:otherwise>
    Target URL: <xsl:value-of select="./ns0:TargetInfo/ns0:TargetURL"/>
    </xsl:otherwise>
  </xsl:choose> 
  <xsl:if test="position() &lt; last()">
    <xsl:text>&#xa;</xsl:text>
  </xsl:if>
</xsl:for-each>
<xsl:for-each select="ns0:SystemAttributes/ns0:SourceInfo/ns0:TargetInfo/ns0:TargetProperty">
  <xsl:if test="position() = 1">
    <xsl:text>&#xa;&#xa;    Target Properties:&#xa;</xsl:text>
  </xsl:if>
  <xsl:text>        </xsl:text><xsl:value-of select="./ns0:Name"/>: <xsl:value-of select="./ns0:Value"/>
      <xsl:if test="position() &lt; last()">
        <xsl:text>&#xa;</xsl:text>
      </xsl:if>
    </xsl:for-each>
<!-- EDIT THE FOLLOWING CODE TO LIST A SPECIFIC TARGET PROPERTY, SUCH AS "Line of Business"
        <xsl:choose>
          <xsl:when test="ns0:SystemAttributes/ns0:SourceInfo/ns0:TargetInfo/ns0:TargetProperty/ns0:Name='Line of Business'">
            Line of Business: <xsl:value-of select="ns0:ns0:SystemAttributes/ns0:SourceInfo/ns0:TargetInfo/ns0:TargetProperty/ns0:value"/>
          </xsl:when>
        </xsl:choose>
-->
    Severity: <xsl:value-of select="ns0:SystemAttributes/ns0:Severity"/>
    Priority: <xsl:value-of select="ns0:SystemAttributes/ns0:Priority" />
    CreationDate: <xsl:value-of select="ns0:SystemAttributes/ns0:CreationDate"/>
    LastUpdatedDate: <xsl:value-of select="ns0:SystemAttributes/ns0:LastUpdatedDate"/>
    Owner: <xsl:value-of select="ns0:SystemAttributes/ns0:Owner" />
    <xsl:choose>
      <xsl:when test="normalize-space(ns0:NotificationRuleName) != ''">
    Notification Rule: <xsl:value-of select="ns0:NotificationRuleName"/>
      </xsl:when>
    </xsl:choose>  
    <xsl:choose>
      <xsl:when test="$addHref = 'true' and ns0:SystemAttributes/ns0:IncidentURL != ''">
    URL: &lt;a href="<xsl:value-of select="ns0:SystemAttributes/ns0:IncidentURL"/>" target="_blank"&gt;<xsl:value-of select="ns0:SystemAttributes/ns0:IncidentURL"/>&lt;/a&gt;<xsl:text/>
      </xsl:when>
      <xsl:otherwise>
    URL: <xsl:value-of select="ns0:SystemAttributes/ns0:IncidentURL"/>
      </xsl:otherwise>
    </xsl:choose> 
    
    EM Incident Status: <xsl:value-of select="ns0:SystemAttributes/ns0:ResolutionState"/>
    EM Acknowledge: <xsl:value-of select="ns0:SystemAttributes/ns0:Acknowledge"/>
    EM Auto Close: <xsl:value-of select="ns0:SystemAttributes/ns0:AutoClose"/>
    EM Escalation Level: <xsl:value-of select="ns0:SystemAttributes/ns0:EscalationLevel"/>
 
    <xsl:for-each select="ns0:SystemAttributes/ns0:AdditionalDetails">
      <xsl:text>&#xa;    </xsl:text><xsl:value-of select="./ns0:VariableName"/>: <xsl:value-of select="./ns0:VariableValue"/>
    </xsl:for-each>
  </xsl:template>
 
</xsl:stylesheet>

5.3 Customizing Ticket Templates

If the out-of-box ticket templates do not satisfy your requirements, you can create custom templates tailored to your environment. To do this, Oracle recommends that you use one of the existing templates as the base template.

To create a custom template:

  1. Export the default template XSLT files from Enterprise Manager to use as a baseline. Follow the instructions in Section 5.5, "Exporting the Ticket Template Files" to obtain copies of the default template files.

  2. Determine which file you want to use as a baseline and copy the file to a new file with a different name.

  3. Make the desired mapping changes to the new template file. See Section 5.4, "Modifying Ticket Templates" for information on mapping changes.

  4. Register the new template with Enterprise Manager as specified in Section 5.6, "Adding Ticket Templates".

5.4 Modifying Ticket Templates

The templates are highly customizable. However, Oracle recommends that only users with advanced knowledge of XSLT make complex changes.

You can use notification rules as a filter to associate proper ticket templates with incidents. You can have as many tickets templates as desired. One notification rule can have only one ticket template.

Generally, when you modify the ticket template, you might only be changing the existing mappings. The following examples illustrate this concept.

Example 5-2 Creating a Template to Set the Urgency Element

By default, the Urgency field is not set whenever an incident is created in Service Desk. Both out-of-box templates have an Urgency element commented out that you can use to set the Urgency field.

To create a template to set the Urgency to Soon, copy one of the default templates to a new file. Edit the new file and uncomment the Urgency element in the template, setting the contents to 2-Soon as shown below. Register the new ticket template. The template is now ready to use in notification rules or as a template for manual ticket creation.

<urgency>2-Soon</urgency>

Example 5-3 Altering the Message Type

If you only want the alert message to appear as ticket summary instead of both message and severity, copy one of the default templates to a new file, modify the following attribute and register:

<summary><xsl:value-of select="ns0:Message"/></summary>

5.5 Exporting the Ticket Template Files

The connector installation jar file is included in the Self Update archive that was installed in Section 2.2, "Installing the Connector".

To extract the installation file:

  1. Determine the command required to export the adapter installation file. To do this, perform the following steps:

    1. From the Setup menu in the Enterprise Manager console, select Extensibility, then Self Update.

    2. Click on the Management Connector link.

    3. Click on the CASD connector and then select Export from the Actions list.

      A pop-up window appears with the command required to export the file. Figure 5-1 shows an example of the window.

      Figure 5-1 Export Command Example

      Surrounding text describes Figure 5-1 .
  2. Open a command window on the Management Server host system and navigate to a temporary directory where you can copy the file.

  3. Log into EM CLI using the following command. You are asked to provide the password information for the sysman account.

    emcli login -username=sysman
    

    EM CLI must be executed from the OMS host. See the Oracle Enterprise Manager Command Line Interface for information about setting up EM CLI.

  4. Run the EM CLI export_update command from your system, changing <dirname> to the full path of the temporary directory.

    This creates a zip file. The file name is comprised of the id value specified in the export_update command with a .zip extension. In the example command in Figure 5-1, the zip file name would be:

    E9F684312AE7A18E98340715D079E58D.zip
    
  5. Extract the adapter installation jar file from the zip file using the following command:

    unzip *.zip archives/*connector.jar
    
  6. Extract the templates from the connector jar file using the following command:

    $JAVA_HOME/bin/jar xf archives/*.jar templates
    

    Note:

    If the system where the connector file is located does not have the JDK installed, you cannot extract the jar file contents. You must copy the jar file to a system that has the JDK installed and transfer the template files after they have been extracted.

5.6 Adding Ticket Templates

If you want to create a custom template, you need to add ticket templates before they are recognized in Enterprise Manager. For each new custom template, run the following emctl register_template connector command as a user with execute privilege on emctl and the ability to read the ticket template:

$ORACLE_HOME/bin/emctl register_template connector
-t <template.xsl> -repos_pwd <reposPassword>
-cname <connectorName> -iname <internalName>
-tname <templateName> -ttype 2 [-d <description>]

Where —

<template.xsl> is the full path name of the template file.

<reposPassword> is the Enterprise Manager root (SYSMAN) password.

<connectorName> is the name of the connector instance installed in step 3 of Section 3.1, "Creating a Connector Instance".

<internalName> is the internal name to use for the template.

<templateName> is the name to display for the template.

<description> is the description of the template.

For example, the following command adds a new outbound template (newTemplate.xsl) for the connector instance:

emctl register_template connector
-t /home/oracle/custom_templates/template.xml
-repos_pwd sysmanpass
-cname "CASD Connector Instance"
-iname "newTemplate"
-tname "New Template"
-ttype 2
-d "Demo template"