Show TOC Start of Content Area

Procedure documentation Creating the Served Clients Long Monitor  Locate the document in its SAP Library structure

Procedure

...

       1.      BankMBean:

public long getAllServedClients();

 

       2.      Bank:

public long getAllServedClients() {

   return transaction.getAllClients();

}

 

       3.      Modify the monitor-configuration.xml:

                            a.      Define the monitor-semantics:

<long-configuration-group name="AllClients" unit="clients">

   <description ID="Served clients">Number of all clients served.</description>

   <data-collection>

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

   </data-collection>

   <thresholds green-to-yellow="" yellow-to-red="" red-to-yellow="" yellow-to-green=""/>

</long-configuration-group>

 

                            b.      Define the monitor-tree:

<long-monitor name="Served clients" configuration-group="AllClients">

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

    <long-attribute-mapping>

        <long-attribute>

            <observed-resource-attribute name="AllServedClients"/>

        </long-attribute>

    </long-attribute-mapping>

</long-monitor>

 

The monitoring framework expects a long value for Long monitors, that is why the return value of the getAllServedClients() method is long. This method is declared in the BankMBean interface and is implemented in the class Bank. In the monitor-semantics part of the monitor-configuration.xml a long-configuration-group is declared with name AllClients, which is used for creating the node in the monitor tree (the monitor-tree part in the XML). The ID in the Served clients description is the name of the monitor shown in the tree.

 

Result

The Served Clients monitor appears in the monitoring tree under Applications Bank Information General Information.

 

 

End of Content Area