!--a11y-->
Integer Monitor - "All Clients" 
...
1. BankMBean
public int getCurrentServingDesks(); |
2. Bank
public int getCurrentServingDesks() { return transaction.getServedClients(); } |
3. monitor-configuration.xml
a. 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. 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.
Representation in the monitoring tree (Visual Administrator):

The next step is to create a frequency monitor named “Transaction Frequency”
