样本公共基本事件实例
此 XML 文档是 WebSphere® Application Server 应用程序生成的公共基本事件实例的示例。
使用以下示例作为参考:
<CommonBaseEvent creationTime="2004-09-18T04:03:28.484Z"
globalInstanceId="myhost:1095479647062:1899"
msg="WSVR0024I: Server server1 stopped"
severity="10"
version="1.0.1">
... several extendedDataElements for internal use only ...
<sourceComponentId component="com.ibm.ws.runtime.component.ServerCollaborator"
componentIdType="Unknown"
executionEnvironment="Windows Vista[x86]#5.0"
instanceId="myhost\myhost\server1"
location="myhost"
locationType="Hostname"
processId="1095479647062"
subComponent="Unknown"
threadId="Alarm : 0"
componentType="http://www.ibm.com/namespaces/autonomic/WebSphereApplicationServer"/>
<msgDataElement msgLocale="en_US">
<msgCatalogTokens value="server1"/>
<msgId>WSVR0024I< /msgId>
<msgCatalogId>WSVR0024I< /msgCatalogId>
<msgCatalog>com.ibm.ws.runtime.runtime< /msgCatalog>
</msgDataElement>
<situation categoryName="ReportSituation">
<situationType xsi:type="ReportSituation" reasoningScope="EXTERNAL" reportCategory="LOG"/>
</situation>
</CommonBaseEvent>
XML 中的一些 extendedDataElement 元素由 WebSphere Application Server 使用,但由于这些元素可能更改,所以不能供应用程序使用。
CommonBaseEvent 元素定义公共基本事件实例。此元素有一组所有公共基本事件公用的属性。此组包括 extensionName 属性,用于定义公共基本事件实例的类型或类、创建时间、严重性和优先级。
嵌套在 CommonBaseEvent 元素中的是给出关于这种情况更多详细信息的元素。这些元素中的第一个是 situation 元素。此分类已标准化。
CommonBaseEvent 元素还包括 sourceComponentId 和(可选的)reporterComponentId 元素。sourceComponentId 元素描述出现情况的位置;reporterComponentId 描述检测到情况的位置。如果 sourceComponentId 元素和 reporterComponentId 元素相同,那么省略 reporterComponentId 元素。
sourceComponentId 和 reporterComponentId 元素的属性是相同的。它们标识组件类型、名称、操作系统和网络位置。这些属性的内容提供创建公共基本事件时处于活动状态的 IT 资源堆栈的垂直相关性。
CommonBaseEvent 元素中还包括 contextDataElements 元素,它们描述出现情况的上下文。此上下文使包含在同一工作中的公共基本事件实例相关。此关联称为水平关联,这是因为特定上下文类型的实例使处于同一抽象级别(如业务级别、应用程序级别或中间件级别)的事件相关联。
扩展数据元素包含用于描述情况的其他数据。在此示例中,WebSphere Application Server 添加了扩展数据元素,以描述生成公共基本事件实例和某些应用程序数据的 Java™ 2 平台企业修订版 (J2EE) 组件。