Show TOC Start of Content Area

Procedure documentation Developing the Resource MBean and the monitor-configuration.xml  Locate the document in its SAP Library structure

Use

This procedure describes how to develop the resource MBean (which will provide the monitoring information) and create the monitor-configuration.xml (which will describe the monitors in a way that the monitoring framework can understand). You will learn how this is done in parallel, as each of the monitors described in the XML file is mapped to a method or attribute in the resource MBean.

For the resource MBean we use a standard MBean. As such, it consists of a statically specified management interface that lists all the methods available for monitoring and an implementation class. According to the naming convention for standard MBeans imposed by the JMX specification, the interface and the class are named BankMBean and Bank respectively.

Procedure

...

       1.      Use a passive provision of data type collection (polled-by-monitor) and set the period for retrieval to one minute (for more information, see Interaction between the Monitoring Framework and the Monitored Resource):

<data-collection>

    <polled-by-monitor period="1" unit="MINUTE"/>

</data-collection>

       2.      Specify the name of the monitored resource in the xml file.

The resource MBean is registered as APPLICATION type (in BankServlet), that is why in the XML we use the short name “BankMBean“ for monitor-resource name (for more information, see Building ObjectName(s) for the Resource MBean(s)).

<monitored-resource name="BankMBean" type="APPLICATION"/>

 

The following steps provide details for each of the monitors installed – which methods from the resource MBean are used and how is the respective monitor described in the monitor-configuration.xml. The monitors are sorted by type. For more information, see Creating the Bank Name Text Monitor.

 

 

End of Content Area