Entering content frame

Procedure documentation Quality-Rate Monitor - "Transactions Over 10,000 EUR" 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.      monitor-configuration.xml

                            a.      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.      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

Representation in the monitoring tree (Visual Administrator):

This graphic is explained in the accompanying text

 

The next step is to create a duration monitor named “Transaction Duration”

 

Leaving content frame