Show TOC

 Creating the Software Version Version MonitorLocate this document in the navigation structure

Procedure
  1. BankMBean:
    public VersionInfo getSoftwareVersion();

 

  1. Bank:
    public VersionInfo getSoftwareVersion() {
       return BankProperties.getSoftwareVersion();
    }

 

  1. Modify the monitor-configuration.xml:
    1. Define the monitor-semantics:
      <version-configuration-group name="SoftwareVersion">
        <description ID="Software version">Software Version</description>
        <data-collection>
           <polled-by-monitor period="1" unit="MINUTE"/>
        </data-collection>
      </version-configuration-group>

 

  1. Define the monitor-tree:
    <version-monitor name="Software version" configuration-group="SoftwareVersion">
        <monitored-resource name="BankMBean" type="APPLICATION"/>
        <version-attribute-mapping>
          <version-attribute>
            <observed-resource-attribute name="SoftwareVersion"/>
          </version-attribute>
        </version-attribute-mapping>
    </version-monitor>

 

The monitoring framework expects a VersionInfo value for Version monitors, that is why the return value of the getSoftwareVersion() method is VersionInfo . 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 a version-configuration-group is declared with name SoftwareVersion, which is used for creating the node in the monitor tree (the monitor-tree part in the XML).

Result

The Software Version monitor appears in the monitoring tree under Applications → Bank Information → General Information.