Entering content frame

Procedure documentation Installation of Template-Based Monitors Locate the document in its SAP Library structure

Procedure

If we look more closely to the monitor-configuration excerpt above, we can see that there are two template-installable monitors described:

Integer Monitor Named “Amount”...

       1.      BankMBean

public int getExceededClientsMoney(String clientName);

 

       2.      Bank

public int getExceededClientsMoney(String clientName) {

     return transaction.getExceededClientsMoney(clientName);

}

 

Given a client name, this method returns the exact amount of money for his transaction.

 

       3.      monitor-configuration.xml

                            a.      monitor-semantics

<integer-configuration-group name="ExceededClientsMoney" unit="EUR">

    <description ID="Exceeded clients money">Money ammount for the exceeded clients.</description>

    <data-collection>

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

    </data-collection>

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

</integer-configuration-group>

 

                            b.      monitor-tree

<integer-monitor name="Amount" configuration-group="ExceededClientsMoney">

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

    <integer-attribute-mapping>

        <integer-attribute>

            <invoked-resource-method name="getExceededClientsMoney">

       <parameter position="0" type="String" value="%0"/>

   </invoked-resource-method>

        </integer-attribute>

    </integer-attribute-mapping>

</integer-monitor>

 

As you can see, for the information that cannot be supplied statically, the placeholder sign “%” is used.

 

Result

Representation in the monitoring tree (Visual Administrator):

...

This graphic is explained in the accompanying text

 

Long Monitor Named “Transaction duration”

       1.      BankMBean

public long getTransactionDuration(String clientName);

 

       2.      Bank

public long getTransactionDuration(String clientName) {

   return transaction.getTransactionDuration(clientName);

}

 

Given a client name, this method returns the duration of his/her transaction.

 

       3.      monitor-configuration.xml

                            a.      monitor-semantics

<long-configuration-group name="tsDuration" unit="ms">

    <description ID="Transaction duration">Duration of the transaction of this client.</description>

    <data-collection>

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

    </data-collection>

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

</long-configuration-group>

 

                            b.      monitor-tree

<long-monitor name="Transaction duration" configuration-group="tsDuration">

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

    <long-attribute-mapping>

        <long-attribute>

            <invoked-resource-method name="getTransactionDuration">

       <parameter position="0" type="String" value="%0"/>

    </invoked-resource-method>

        </long-attribute>

    </long-attribute-mapping>

</long-monitor>

 

Again, the placeholder sign “%” is used to denote the dynamically supplied data.

 

Result

Representation in the monitoring tree (Visual Administrator):

...

This graphic is explained in the accompanying text

 

The next step is to register the MBean

 

Leaving content frame