Entering content frame

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

Following our decision about what we will monitor, we now continue by developing the resource MBean (which will provide the monitoring information) and creating monitor-configuration.xml (which will describe the monitors in a way that the monitoring framework can understand). We will see 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.

In our example, passive provision of data type collection (polled-by-monitor) is used and the period for retrieval is set 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>

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, how is the respective monitor described in the monitor-configuration.xml, and how it is visualized in the Visual Administrator tool. The monitors are sorted by type.

 

The next step is to create a text monitor named “Bank Name”

 

 

Leaving content frame