活动版本状态

Microsoft.JEE.WebLogic.10gR3.Deep.Application.ActiveVersionState.AvailabilityHealth.UnitMonitor (UnitMonitor)

监视 WebLogic 10gR3 应用程序服务器的已部署应用程序的活动版本状态。

Knowledge Base article:

摘要

应用程序活动版本状态可用性运行状况监视器跟踪应用程序运行时的活动版本状态。将使用适用于所有可用应用程序运行时的查询:

原因

警告表示监视的应用程序处于 PREPARED 或 UNPREPARED 状态。

解决方法

处于警告状态的应用程序当前未部署。使用 WebLogic 控制台来完成应用程序的部署过程。

Element properties:

TargetMicrosoft.JEE.WebLogic.10gR3.Application
Parent MonitorSystem.Health.AvailabilityState
CategoryAvailabilityHealth
EnabledTrue
Alert GenerateTrue
Alert SeverityMatchMonitorHealth
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeMicrosoft.JEE.Deep.Application.TwoState.Query.AvailabilityHealth.MonitorType
RemotableTrue
AccessibilityPublic
Alert Message
应用程序未激活
应用程序“{3}”未激活。此应用程序可通过应用程序服务器 ID“{0}”在计算机 {1} 上的对象名“{2}”识别。
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.JEE.WebLogic.10gR3.Deep.Application.ActiveVersionState.AvailabilityHealth.UnitMonitor" Accessibility="Public" Enabled="true" Target="Microsoft.JEE.WebLogic.10gR3.Application" ParentMonitorID="Health!System.Health.AvailabilityState" Remotable="true" Priority="Normal" TypeID="JEE!Microsoft.JEE.Deep.Application.TwoState.Query.AvailabilityHealth.MonitorType" ConfirmDelivery="true">
<Category>AvailabilityHealth</Category>
<AlertSettings AlertMessage="Microsoft.JEE.WebLogic.10gR3.Deep.Application.ActiveVersionState.AvailabilityHealth.UnitMonitor_AlertMessageResourceID">
<AlertOnState>Warning</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>MatchMonitorHealth</AlertSeverity>
<AlertParameters>
<!-- The alert description should include key properties of: -->
<!-- * the application server id -->
<!-- * the application hostname -->
<!-- * the application object name-->
<!-- * the application name -->
<AlertParameter1>$Target/Host/Property[Type="JEE!Microsoft.JEE.ApplicationServer.Monitored.Instance"]/Id$</AlertParameter1>
<AlertParameter2>$Target/Host/Property[Type="JEE!Microsoft.JEE.ApplicationServer.Monitored.Instance"]/HostName$</AlertParameter2>
<AlertParameter3>$Target/Property[Type="JEE!Microsoft.JEE.Application"]/ObjectName$</AlertParameter3>
<AlertParameter4>$Target/Property[Type="JEE!Microsoft.JEE.Application"]/ApplicationName$</AlertParameter4>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="Healthy" MonitorTypeStateID="Healthy" HealthState="Success"/>
<OperationalState ID="NotHealthy" MonitorTypeStateID="NotHealthy" HealthState="Warning"/>
</OperationalStates>
<Configuration>
<ComputerName>$Target/Host/Property[Type="JEE!Microsoft.JEE.ApplicationServer.Monitored.Instance"]/HostName$</ComputerName>
<Protocol>$Target/Host/Property[Type="JEE!Microsoft.JEE.ApplicationServer.Monitored.Instance"]/Protocol$</Protocol>
<Port>$Target/Host/Property[Type="JEE!Microsoft.JEE.ApplicationServer.Monitored.Instance"]/Port$</Port>
<BaseURL/>
<JMXQuery>com.bea:Type=ApplicationRuntime,*</JMXQuery>
<AdditionalArguments>&amp;MaxDepth=2</AdditionalArguments>
<RequestBody/>
<!-- This will query all of the available MBeans and -->
<!-- look for the right MBean and update the state as stated -->
<!-- in the SPEC for WebLogic: -->
<!-- * Healthy : ActiveVersionState == Active -->
<!-- * Warning : ActiveVersionState == Prepared || -->
<!-- ActiveVersionState == Unprepared -->
<HealthyExpression>
<SimpleExpression>
<ValueExpression>
<!-- The XPATH if it were applied directly against the XML in a browser should look like: -->
<!-- /MBeans/weblogic.j2ee.J2EEApplicationRuntimeMBeanImpl/Properties/ActiveVersionState[../ApplicationName = "SimpleApplication"] -->
<XPathQuery Type="String">MBeans/MBean[@Name='weblogic.j2ee.J2EEApplicationRuntimeMBeanImpl']/Properties/Property[@Name='ActiveVersionState' and ../Property[@Name='ApplicationName']="$Target/Property[Type="JEE!Microsoft.JEE.Application"]/ApplicationName$"]</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<!-- 2 == Active -->
<Value Type="String">2</Value>
</ValueExpression>
</SimpleExpression>
</HealthyExpression>
<NotHealthyExpression>
<SimpleExpression>
<ValueExpression>
<!-- The XPATH if it were applied directly against the XML in a browser should look like: -->
<!-- /MBeans/weblogic.j2ee.J2EEApplicationRuntimeMBeanImpl/Properties/ActiveVersionState[../ApplicationName = "SimpleApplication"] -->
<XPathQuery Type="String">MBeans/MBean[@Name='weblogic.j2ee.J2EEApplicationRuntimeMBeanImpl']/Properties/Property[@Name='ActiveVersionState' and ../Property[@Name='ApplicationName']="$Target/Property[Type="JEE!Microsoft.JEE.Application"]/ApplicationName$"]</XPathQuery>
</ValueExpression>
<!-- Not looking for Active state, which implies that the state must either -->
<!-- be PREPARED or UNPREPARED. -->
<Operator>NotEqual</Operator>
<ValueExpression>
<!-- 2 == Active -->
<Value Type="String">2</Value>
</ValueExpression>
</SimpleExpression>
</NotHealthyExpression>
<IntervalSeconds>900</IntervalSeconds>
<TimeoutSeconds>300</TimeoutSeconds>
</Configuration>
</UnitMonitor>