プライマリ・コンテンツに移動
Oracle® Enterprise Manager CA Service Deskチケッティング・コネクタ構成ガイド
Enterprise Manager 13cリリース3
E95148-02
目次へ移動
目次

前
次
機械翻訳について

5 デフォルト・テンプレートの使用

この章では、CA Service Deskコネクタに付属のデフォルト・チケット・テンプレートについて詳しく説明します。 チケット・テンプレートは、Enterprise Managerインシデントの各属性と、Service Deskチケットの各属性との間のマッピングを指定するものです。

5.1 テンプレート・プロセスの理解

あらかじめ用意されているテンプレートのいずれを使用した場合も、インシデントに対してチケットを作成または更新すると、次のアクションが実行されます。

  • インシデント情報が説明(Service Deskチケットの説明)に書き込まれます。

  • インシデント・メッセージに基づいてService Deskチケットの概要が設定されます。

  • インシデントの詳細を示すインシデント・アクティビティ・ログ・リストにログのコメントが追加されます。 これによって、インシデントに対して生じた変更の記録が提供されます。

  • Enterprise Managerでのインシデントの重大度に基づいてService Deskの優先度が設定されます。

あらかじめ用意されているテンプレートは次のとおりです。

  • CASD_Default_Incident.xsl

    CASD_Default_Incident.xlsテンプレートは、デフォルトのフィールド・マッピングを使用してService Deskチケットを作成、更新または再オープンします。 このテンプレートでは、イベント重大度の値がクリアになったときに、チケットをクローズしません。

  • CASD_Default_Incident_AutoClose.xsl

    CASD_Default_Incident_AutoClose.xslテンプレートは、デフォルトのフィールド・マッピングを使用してService Deskチケットを作成、更新または再オープンします。 このテンプレートでは、イベント重大度の値がクリアになったときに、チケット・ステータスをクローズに設定します。

5.2 チケット・テンプレートの読取りおよびマッピング

表5-1は、デフォルト・テンプレートを使用したチケットの作成を示しています。 この表は、チケット・テンプレートの内容の解釈に役立ちます。 表内の*はリテラル文字列を示し、**は属性が適用されるかどうかを示します。

CASD_Default_Incident_AutoClose.xslCASD_Default_Incident.xslでは、チケット作成マッピングは同じです。

表5-1は、チケット作成に対するService Deskチケット属性と、対応するEnterprise Managerインシデント値のマッピングを示しています。

表5-1 チケット作成マッピング(すべてのテンプレート)

Service Deskチケットの属性 Enterprise Managerインシデントの属性

Summary

Message

該当なし

Description

インシデントの場合:

EMUser - チケットの自動発行によってチケットが作成された場合の通知ルール所有者、およびチケットの手動発行によってチケットが作成された場合のEnterprise Managerログイン・ユーザー。

その他のインシデント情報には次のものがあります。

Source Name

Source Owner - 例: Sysman

Source Type

Source SubType

Target Name

Target Type

Target URL

TargetProperties** - 定義されたターゲット・プロパティの名前と値のペア。 次に例を示します。

Line of business:

Finance

Owner:

Finance-DB Team

Severity

Priority

Creation Date - インシデント作成日

Last Updated Date

Owner - インシデント所有者

Notification Rule Name

URL - インシデント・コンテキストのメトリック詳細ページへのURL。

Incident Status

Incident Acknowledge Flag

Incident Auto Close

Incident Escalation Level

インシデント・コンテキストからの値

Priority

重大度コードに基づく

メトリック・インシデントの場合:

  • 重大度がFatalの場合、PriorityはMedium-High (2)に設定されます。

  • 重大度がCriticalの場合、PriorityはMedium (3)に設定されます。

  • 重大度がWarningの場合、PriorityはMedium-Low (4)に設定されます。

  • それ以外の場合、PriorityはLow (5)に設定されます。

Reported By

該当なし

Administrator

Activity Log

Description属性と同じ内容です。

前述のDescription属性を参照してください。

z_em_connector_id (カスタム・フィールド)

Connector GUID

CASDコネクタにのみ設定されます。 このフィールドは、CASD未公開コネクタには設定されません。

表5-2は、チケット更新に対するService Deskチケット属性と、対応するEnterprise Managerインシデント属性のマッピングを示しています。 CASD_Default_Incident.xslとCASD_Default_Incident_AutoClose.xslのマッピング・テンプレートはほぼ同じです。 唯一の違いはステータス・フィールドです。 AutoCloseテンプレートではステータスがCLに設定され、もう1つのテンプレートではフィールドが設定されません。 この違いは表に記載されています。

表5-2 チケット更新(すべてのテンプレート)

Service Deskチケットの属性 Enterprise Managerインシデントの属性

Identifier

TicketID - チケットIDから内部識別子のみを抽出します。

該当なし

Summary

Message

該当なし

Description

作成トランザクションのDescription属性と同じ内容です。

表5-1を参照してください。

Priority

重大度コードに基づきます。

JobStatus - ジョブ・ステータス・イベントに適用されます。

メトリック・インシデントの場合:

  • 重大度がFatalの場合、PriorityはMedium-High (2)に設定されます。

  • 重大度がCriticalの場合、PriorityはMedium (3)に設定されます。

  • 重大度がWarningの場合、PriorityはMedium-Low (4)に設定されます。

  • それ以外の場合、ImpactはLow (5)に設定されます。

Status

メトリック・インシデントの場合:

猶予期間

Severity

メトリック・インシデントの場合:

Grace PeriodがYesに設定されている場合、StatusはOpen (OP)に設定されます。

AutocloseテンプレートでSeverityがClearに設定されている場合、StatusはClose (CL)に設定されます。

それ以外の場合、Statusは設定されません。

Activity Log

Description属性と同じ内容です。

表5-1を参照してください。

z_em_connector_id (カスタム・フィールド)

Connector GUID

CASDコネクタにのみ設定されます。 このフィールドは、CASD未公開コネクタには設定されません。

例5-1のXSLTファイルを解読する際の参照として、マッピング表(表5-1および表5-2)を使用してください。

例5-1 CASD_Default_Incident_AutoClose.xslの注釈付きソース・コード

<?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 チケット・テンプレートのカスタマイズ

あらかじめ用意されているチケット・テンプレートが要件を満たしていない場合は、使用環境にあわせてカスタマイズしたカスタム・テンプレートを作成できます。 変更するには、既存のテンプレートのいずれかを基本テンプレートとして使用することをお薦めします。

カスタム・テンプレートを作成するには、次のステップを実行します。

  1. Enterprise ManagerからデフォルトのテンプレートXSLTファイルをエクスポートし、ベースラインとして使用します。 チケット・テンプレート・ファイルのエクスポートの手順に従って、デフォルトのテンプレート・ファイルのコピーを取得します。

  2. ベースラインとして使用するファイルを決定し、ファイルを別の名前で新しいファイルにコピーします。

  3. 新しいテンプレート・ファイルに必要なマッピング変更を追加します。 マッピングの変更の詳細は、チケット・テンプレートの変更を参照してください。

  4. チケット・テンプレートの追加の指定に従って、新しいテンプレートをEnterprise Managerに登録します。

5.4 チケット・テンプレートの変更

テンプレートは細かくカスタマイズできます。 ただし、複雑な変更は、XSLTに習熟したユーザーのみが行うことをお薦めします。

通知ルールは、インシデントに適切なチケット・テンプレートを関連付けるためのフィルタとして使用できます。 チケット・テンプレートは、必要な数だけ使用できます。 1つの通知ルールには、1つのチケット・テンプレートのみを使用できます。

通常、チケット・テンプレートを変更するときは、既存のマッピングのみを変更します。 次の例は、この概念を示しています。

例5-2 緊急度要素を設定するテンプレートの作成

デフォルトでは、Service Deskでインシデントが作成されるたびに緊急度フィールドは設定されません。 デフォルトの両方のテンプレートでは、緊急度フィールドの設定に使用できるUrgency要素はコメントになっています。

UrgencyをSoonに設定するテンプレートを作成するには、デフォルトのテンプレートの1つを新しいファイルにコピーします。 次に示すように、新しいファイルを編集し、テンプレートのUrgency要素のコメントを解除して、コンテンツを2-Soonに設定します。 新しいチケット・テンプレートを登録します。 テンプレートを通知ルールで使用、またはチケットを手動で作成するためのテンプレートとして使用する準備が整いました。

<urgency>2-Soon</urgency>

例5-3 メッセージ・タイプの変更

アラート・メッセージを、メッセージと重大度の両方ではなくチケット・サマリーとしてのみ表示する場合は、デフォルトのテンプレートの1つを新しいファイルにコピーし、次の属性を変更して登録します。

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

5.5 チケット・テンプレート・ファイルのエクスポート

コネクタのインストールjarファイルは、コネクタのインストールでインストールした自己更新アーカイブに含まれています。

インストール・ファイルを抽出する手順は、次のとおりです。

  1. アダプタ・インストール・ファイルのエクスポートに必要なコマンドを判別します。 これを行うには、次のステップを実行します:

    1. Enterprise Managerコンソールの設定メニューから拡張性自己更新の順に選択します。

    2. 管理コネクタリンクをクリックします。

    3. CASDコネクタをクリックし、アクションリストからエクスポートを選択します。

      ポップアップ・ウィンドウに、ファイルをエクスポートするために必要なコマンドが表示されます。 図5-1に、ウィンドウの例を示します。

      図5-1 エクスポート・コマンドの例


      エクスポート・コマンドの例

  2. 管理サーバーのホスト・システムでコマンド・ウィンドウを開き、ファイルをコピーできる一時ディレクトリに移動します。

  3. 次のコマンドを使用して、EM CLIにログインします。 sysmanアカウントのパスワード情報の入力を求めるプロンプトが表示されます。

    emcli login -username=sysman
    

    EM CLIは、OMSホストから実行する必要があります。 EM CLIの設定に関する詳細は、Oracle Enterprise Managerコマンドライン・インタフェースを参照してください。

  4. <dirname>を一時ディレクトリのフルパスに変更して、システムからEM CLI export_updateコマンドを実行します。

    zipファイルが作成されます。 ファイル名は、export_updateコマンドで指定されたid値と.zip拡張子で構成されます。 図5-1のコマンドの例では、zipファイル名は次のようになります。

    E9F684312AE7A18E98340715D079E58D.zip
    
  5. 次のコマンドを使用して、zipファイルからアダプタのインストールjarファイルを抽出します。

    unzip *.zip archives/*connector.jar
    
  6. 次のコマンドを使用して、コネクタjarファイルからテンプレートを抽出します。

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

    注意:

    コネクタ・ファイルがあるシステムにJDKがインストールされていない場合は、jarファイルの内容を抽出できません。 JDKがインストールされているシステムにjarファイルをコピーして内容を抽出した後に、そのテンプレート・ファイルを転送する必要があります。

5.6 チケット・テンプレートの追加

カスタム・テンプレートを作成する場合は、Enterprise Managerで認識されるようにするために、チケット・テンプレートを追加しておく必要があります。 新しいカスタム・テンプレートごとに、emctlに対する実行権限およびテンプレートの読取り権限があるユーザーとして、次のemctl register_template connectorコマンドを実行する必要があります。

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

説明 -

<template.xsl>は、テンプレート・ファイルのフル・パス名です。

<reposPassword>は、Enterprise Managerのルート(SYSMAN)パスワードです。

<connectorName>は、コネクタ・インスタンスの作成のステップ3でインストールしたコネクタ・インスタンスの名前です。

<internalName>は、テンプレートに使用する内部名です。

<templateName>は、テンプレートに表示する名前です。

<description>は、テンプレートの説明です。

たとえば、次のコマンドは、コネクタ・インスタンスに新しいアウトバウンド・テンプレート(newTemplate.xsl)を追加します。

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"