Monitors the health state of the deployed applications for a Tomcat 5.x web application server.
The application availability health monitor tracks the state of a deployed application, and uses the following query to find all available applications:
Catalina:j2eeType=WebModule,*
Each MBean's state is examined: 0 implies the application is stopped, 1 implies the application is started. This does not conform with JSR-77.
A warning indicates that the monitored application is either in a stopping or starting state.
A critical indicator means that the monitored application is either in a stopped or failed state.
Applications in a warning state are either starting or stopping. Click the Recalculate Health button to recalculate the health status.
Applications in a critical state can be either stopped or failed. Check the Alert Context tab of the Alert Properties for more information. Stopped applications need only to be restarted, whereas applications that have failed will need to be examined.
Target | Microsoft.JEE.Tomcat.5.Application | ||
Parent Monitor | System.Health.AvailabilityState | ||
Category | AvailabilityHealth | ||
Enabled | True | ||
Alert Generate | True | ||
Alert Severity | MatchMonitorHealth | ||
Alert Priority | Normal | ||
Alert Auto Resolve | True | ||
Monitor Type | Microsoft.JEE.Deep.Application.TwoState.Query.AvailabilityHealth.MonitorType | ||
Remotable | True | ||
Accessibility | Public | ||
Alert Message |
| ||
RunAs | Default |
<UnitMonitor ID="Microsoft.JEE.Tomcat.5.Deep.Application.AvailabilityHealth.UnitMonitor" Accessibility="Public" Enabled="true" Target="Microsoft.JEE.Tomcat.5.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.Tomcat.5.Deep.Application.AvailabilityHealth.UnitMonitor_AlertMessageResourceID">
<AlertOnState>Error</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="Error"/>
</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>Catalina:j2eeType=WebModule,*</JMXQuery>
<AdditionalArguments>&MaxDepth=1</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 Tomcat: -->
<!-- * Healthy : state == 1 -->
<!-- * Critical : state == 0 -->
<HealthyExpression>
<SimpleExpression>
<ValueExpression>
<!-- The XPATH if it were applied directly against the XML in a browser should look like: -->
<!-- /MBeans/org.apache.commons.modeler.BaseModelMBean[@objectName="Catalina:j2eeType=WebModule,name=//localhost/,J2EEApplication=none,J2EEServer=none"]/Properties/state -->
<XPathQuery Type="String">MBeans/MBean[@Name='org.apache.commons.modeler.BaseModelMBean' and @objectName="$Target/Property[Type="JEE!Microsoft.JEE.Application"]/ObjectName$"]/Properties/Property[@Name='state']</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">1</Value>
</ValueExpression>
</SimpleExpression>
</HealthyExpression>
<NotHealthyExpression>
<SimpleExpression>
<ValueExpression>
<!-- The XPATH should look like: -->
<!-- /MBeans/org.apache.commons.modeler.BaseModelMBean[@objectName="Catalina:j2eeType=WebModule,name=//localhost/,J2EEApplication=none,J2EEServer=none"]/Properties/state -->
<XPathQuery Type="String">MBeans/MBean[@Name='org.apache.commons.modeler.BaseModelMBean' and @objectName="$Target/Property[Type="JEE!Microsoft.JEE.Application"]/ObjectName$"]/Properties/Property[@Name='state']</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">0</Value>
</ValueExpression>
</SimpleExpression>
</NotHealthyExpression>
<IntervalSeconds>900</IntervalSeconds>
<TimeoutSeconds>300</TimeoutSeconds>
</Configuration>
</UnitMonitor>