Show TOC Start of Content Area

Procedure documentation Creating the Transactions Over 10,000 EUR Quality-Rate Monitor  Locate the document in its SAP Library structure

Procedure

The quality-rate monitors use two methods to calculate their values.

...

       1.      BankMBean:

public long getTotalClientTransactions(); // all transactions

and

public long getExceededTransactions();  // transactions exceeding 10 000 euro

 

       2.      Bank:

public long getTotalClientTransactions() {

   return transaction.getTotalTransactionNumber();

}

and

public long getExceededTransactions() {

   return transaction.getExcededTransactionNumber();

}

 

The total transaction number are all transactions made in the bank since the startup of the threads. It is equal to the number of clients. Exceeded transactions are transactions over 10,000 EUR. This both are variables in class Transaction: private long totalTransactionNumber and private long exceededTransactionNumber.

totalTransactionNumber increments with one each time a client goes to a counter desk (gotoCounter(Client client) in class Transaction).

exceededTransactionNumber increments only when the amount is greater than 10,000.

 

       3.      Modify the monitor-configuration.xml:

                            a.      Define the monitor-semantics:

<quality-rate-configuration-group name="ExpensiveTransactions" unit="transactions">

    <description ID="Expensive transactions">Clients transactions exceeding 10 000 euro.</description>

    <data-collection react-on-failure="IGNORE" >

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

    </data-collection>

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

</quality-rate-configuration-group>

 

                            b.      Define the monitor-tree:

<quality-rate-monitor name="Transactions over 10,000 EUR" configuration-group="ExpensiveTransactions">

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

   <quality-rate-attribute-mapping>

                     <total-tries-attribute>

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

         </total-tries-attribute>

         <total-hits-attribute>

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

         </total-hits-attribute>

   </quality-rate-attribute-mapping>

</quality-rate-monitor>

 

The monitoring framework expects two methods for frequency monitors, both returning long values. That is why the return values of the getTotalClientTransactions() and getExceededTransactions() methods are long. These methods are declared in the BankMBean interface and are implemented in the class Bank. In the monitor-semantics part of the monitor-configuration.xml a quality-rate-configuration-group is declared with name ExpensiveTransactions, which is used for creating the node in the monitor tree (monitor-tree part in the XML). The ID in the Transactions over 10,000 EUR description is the name of the monitor shown in the tree.

 

Result

The Transactions Over 10,000 EUR monitor appears in the monitoring tree under Applications Bank Information General Information.

 

 

End of Content Area