Using the Generic Configuration Reporter

Use

The Generic Configuration Reporter enables you to build configuration monitors that display properties obtained from the property files stored in the database in the monitoring tree.

At the Monitoring Service startup, a resource MBean (hereafter called Generic Configuration Reporter) is created with object name com.sap.default:name=ConfigurationReporter,j2eeType=GenericConfigurationResourceMBean .This MBean provides methods with which the properties data is extracted from the database in a generic way. On top of this, configuration monitors that report data from property sheets (kept in the database) can be easily created without the need to instantiate and register resource MBeans at the server side (the role of the resource MBeans is taken by the Generic Configuration Reporter).

Procedure

To complete this procedure use the monitor-configuration.xml.

  1. Create a group in the monitoring semantics section of the XML in the same way as for a standard configuration monitor.
  2. Describe the configuration monitor in the monitor-tree section of the XML:
    1. As the resource MBean in this case is the generic configuration reporter, the name and type of the monitored resource must be:
      <monitored-resource
      
         name="com.sap.default:name=ConfigurationReporter,j2eeType=GenericConfigurationResourceMBean"
      
         type="MBEAN"/>
  3.  
    1. Specify the location of the properties file in the <observed-property-sheet> tag.

      The following options are available for specifying the location:

      1. You can enter the absolute path, that is, the path to the property file in the database. To do this, use the <absolute-path path="<your_path>"> tag.

        Using this approach, you will receive all the global properties that are under this path.

    2. If you do not want to monitor all properties but just a subset of them, specify the properties to be displayed. Do this in the <reported-properties> tag:
      <reported-properties>
      
            <name>CCMS_Mapping</name>
      
            <name>CCMS_System_Mode</name>
      
      </reported-properties>

    If you leave the <reported-properties> tag empty, no property will be listed; but if this tag is missing, all properties from the specified file will be listed.

Example

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE monitor-configuration SYSTEM "monitor-configuration.dtd">

<monitor-configuration>

<monitor-semantics>

    <simple-configuration-group name="GenericConfigurationReporter">

      <description ID="Generic Configuration Reporter">Generic Configuration Reporter Example</description>

    </simple-configuration-group>

 

   <config-configuration-group name="GenericConfigurationMonitor.absolute-path">

       <description ID="Generic Configuration Monitor">Generic Configuration Monitor using absolute-path</description>

      <data-collection>

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

      </data-collection>

   </config-configuration-group>

 

   <config-configuration-group name="GenericConfigurationMonitor.service-name">

       <description ID="Generic Configuration Monitor">Generic Configuration Monitor using service-name</description>

      <data-collection>

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

      </data-collection>

     </config-configuration-group>

    

</monitor-semantics>

 

 

<monitor-tree>

  <applications>

      <object name="Generic Configuration Reporter" configuration-group="GenericConfigurationReporter">

 

      <configuration-monitor name="Generic Configuration abs.path" configuration-group="GenericConfigurationMonitor.absolute-path">

          <monitored-resource name="com.sap.default:name=ConfigurationReporter,j2eeType=GenericConfigurationResourceMBean" type="MBEAN"/>

          <configuration-attribute-mapping>

            <configuration-attribute>

             <observed-property-sheet>

               <absolute-path path="cluster_data/server/cfg/element-info">

               </absolute-path>

             </observed-property-sheet>

            </configuration-attribute>

           </configuration-attribute-mapping>

      </configuration-monitor>

     

      <configuration-monitor name="Generic Configuration service-name" configuration-group="GenericConfigurationMonitor.service-name">

          <monitored-resource name="com.sap.default:name=ConfigurationReporter,j2eeType=GenericConfigurationResourceMBean" type="MBEAN"/>

          <configuration-attribute-mapping>

            <configuration-attribute>

             <observed-property-sheet>

               <service-properties service-name="monitor">           

               </service-properties>

             </observed-property-sheet>

            </configuration-attribute>

               </configuration-attribute-mapping>

      </configuration-monitor>

 

      </object>

  </applications>

</monitor-tree>

 

</monitor-configuration>