Home
Manual
sf.net
Published: 09/09/2005 22:41:43
   

WLWatchman Manual :: wlwatchman-config.xml details and samples

wlwatchman-config.xml

Though it is quite possible to use WLWatchman effectively and never look inside wlwatchman-config.xml, it can be instructive to have a look at the XML document strucure and see some samples.

XML structure

The diagram below shows the structure and ordinance of the wlwatchman-config.xmlfile. Each of these elements is detailed in the table below.

The structure of the elements within wlwatchman-config.xml.
Figure 1. The structure of the elements within wlwatchman-config.xml.

ElementDescription and Attributes
wlwatchman-config Top-level XML element; document root.
monitor-runtime Holds the runtime details of a WLWatchman session.
version
The version of WLWatchman that generated this wlwatchman-config.xml
domain
The name of the WebLogic domain being monitored
admin-url
The URL - usually a t3 URL - on which to contact the admin server for the domain.
username, password
The username and password for the domain system user, eg. "weblogic", "weblogic".
refresh
The period, in seconds, between querying the MBeans on each server for updated state information.
repeat
How many times to query the MBeans; a value of zero means forever.
log Governs some aspects of how data are logged.
filename-root
The suffix applied to all logfiles.
append
True or false: determines whether logfiles are overwritten or appended to.
date-format
The format used for dates in the logfiles. Can be any format understood by java.text.SimpleDateFormat.
alert-manager Contains details common to all alerts
logfile
The file where alert messages are raised.
target-server Container element for (one of) the server(s) being monitored. Holds a list of object tags which represent MBsans.
url
The direct URL to the server, usully t3 and not the same as the admin-url in monitor-runtime (unless, of course, this is the admin server).
name
The server's name.
object-list Holder tag for list of MBean objects.
object Element representing an MBean.All MBean's have a set of "key properties" which are used to construct their names and from which they can be resolved; the key properties common to all MBeans (name, location and type) and stored as attributes on the object.
name
The name of the MBean - note this is not the same as the MBean's ObjectName
location
Within WebLogic, this attribute give the server where this MBean is located.
type
The class name of the MBean, e.g. JVMRuntime.

Samples

The console, when generating a wlwatchman-config.xml, simply retrieves all the attributes but it's plain that some of them (e.g. Name) aren't going to be too good for monitoring purposes. wlwatchman-config.xml doesn't mandate any attributes and it's often a good idea to trim it down somewhat. A future release will probably allow this from the console.

The wlwatchman-config.xml snippets below show some examples of the more "monitorable" attributes on a number of common RuntimeMBeans. Note, these samples are taken from a running WebLogic Server 8.1sp4 instance; the MBean names and attributes may differ somewhat between versions.

Note that none of the below MBeans have either Formatters or Alerts configured.

monitor-runtime

<monitor-runtime domain="portal704Domain"
	admin-url="t3://localhost:7001" 
	username="weblogic" password="weblogic" 
	refresh="5" repeat="0">
  <log filename-root="wlwatchman.csv" append="true" date-format="HH:mm:ss dd/MM/yyyy" />
  <alert-manager logfile="wlwatchman-alerts.log" />
</monitor-runtime>
		

ExecuteQueueRuntime

<object name="default" location="myserver" type="ExecuteQueueRuntime">
  <key-property-list>
	<key-property name="ServerRuntime" value="myserver"/>
  </key-property-list>
  <attribute-list>
	<attribute name="PendingRequestCurrentCount" type="primitive"/>
	<attribute name="ExecuteThreadCurrentIdleCount" type="primitive"/>
	<attribute name="ServicedRequestTotalCount" type="primitive"/>
	<attribute name="StuckExecuteThreads" type="array"/>
	<attribute name="PendingRequestOldestTime" type="time"/>
  </attribute-list>
</object>
		

JDBCConnectionPoolRuntime

<object name="jdbcPool" location="myserver" type="JDBCConnectionPoolRuntime">
  <key-property-list>
	<key-property name="ServerRuntime" value="myserver"/>
  </key-property-list>
  <attribute-list>
	<attribute name="ActiveConnectionsHighCount" type="primitive"/>
	<attribute name="LeakedConnectionCount" type="primitive"/>
	<attribute name="PrepStmtCacheMissCount" type="primitive"/>
	<attribute name="WaitingForConnectionHighCount" type="primitive"/>
	<attribute name="PreparedStatementCacheProfileCount" type="primitive"/>
	<attribute name="FailuresToReconnectCount" type="primitive"/>
	<attribute name="WaitSecondsHighCount" type="primitive"/>
	<attribute name="StatementProfileCount" type="primitive"/>
	<attribute name="ConnectionDelayTime" type="primitive"/>
	<attribute name="PrepStmtCacheHitCount" type="primitive"/>
	<attribute name="ConnectionsTotalCount" type="primitive"/>
	<attribute name="ConnectionLeakProfileCount" type="primitive"/>
	<attribute name="WaitingForConnectionCurrentCount" type="primitive"/>
	<attribute name="ActiveConnectionsCurrentCount" type="primitive"/>
  </attribute-list>
</object>
		

JMSRuntime

<object name="myserver.jms" location="myserver" type="JMSRuntime">
  <key-property-list>
	<key-property name="ServerRuntime" value="myserver"/>
  </key-property-list>
  <attribute-list>
	<attribute name="JMSServersCurrentCount" type="primitive"/>
	<attribute name="JMSServersHighCount" type="primitive"/>
	<attribute name="JMSServersTotalCount" type="primitive"/>
	<attribute name="ConnectionsCurrentCount" type="primitive"/>
	<attribute name="ConnectionsHighCount" type="primitive"/>
	<attribute name="ConnectionsTotalCount" type="primitive"/>
  </attribute-list>
</object>
		

JVMRuntime

<object name="myserver" location="myserver" type="JVMRuntime">
  <key-property-list>
	<key-property name="ServerRuntime" value="myserver"/>
  </key-property-list>
  <attribute-list>
	<attribute name="HeapFreeCurrent" type="primitive"/>
	<attribute name="HeapSizeCurrent" type="primitive"/>
  </attribute-list>
</object>
		

WebAppComponentRuntime

<object name="myserver_myserver_myEar_myWar" location="myserver" type="WebAppComponentRuntime">
  <key-property-list>
	<key-property name="ApplicationRuntime" value="myserver_myEar"/>
	<key-property name="ServerRuntime" value="myserver"/>
  </key-property-list>
  <attribute-list>
	<attribute name="OpenSessionsHighCount" type="primitive"/>
	<attribute name="SessionsOpenedTotalCount" type="primitive"/>
	<attribute name="OpenSessionsCurrentCount" type="primitive"/>
  </attribute-list>
  </object>
</object>