Show TOC Start of Content Area

Procedure documentation Creating the All Clients Integer Monitor  Locate the document in its SAP Library structure

Procedure

...

       1.      BankMBean:

public int getCurrentServingDesks();

 

       2.      Bank:

public int getCurrentServingDesks() {

   return transaction.getServedClients();

}

 

       3.      Modify the monitor-configuration.xml:

                            a.      Define the monitor-semantics:

<integer-configuration-group name="ServedClients" unit="clients">

    <description ID="Currently served clients">Current number of clients served at counter desks.</description>

    <data-collection>

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

    </data-collection>

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

</integer-configuration-group>

 

                            b.      Define the monitor-tree:

<integer-monitor name="Currently served clients" configuration-group="ServedClients">

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

    <integer-attribute-mapping>

        <integer-attribute>

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

          </integer-attribute>

    </integer-attribute-mapping>

</integer-monitor>

 

The monitoring framework expects an integer value for integer monitors, that is why the return value of the getCurrentServingDesks() method is integer. 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 an integer-configuration-group is declared with name ServedClients, which is used for creating the node in the monitor tree (the monitor-tree part in the XML). The ID in the Currently served clients description is the name of the monitor shown in the tree.

Result

The All Clients monitor appears in the monitoring tree under Applications Bank Information General Information Currently served clients.

 

 

End of Content Area