+

Search Tips   |   Advanced Search

Multiple components monitoring

We can filter the components to monitor using the monitor-1.0 feature in the Liberty profile. The components to be filtered must be configured in server.xml.

  1. To specify the components to filter, add the following code to server.xml.
    <server description="new server">
    
         <featureManager>
         <feature>jsp-2.2</feature> 
         <feature>jdbc-4.0</feature> 
         <feature>monitor-1.0</feature> 
     
         <monitor filter="JVM,ThreadPool,WebContainer,Session,ConnectionPool"/>
    </server> 

    By default, if the filters are not provided in the <monitor> tag, all the components that are currently monitored as part of the monitor-1.0 feature are monitored. If the <monitor> tag is present but without any filters specified, then no component is monitored. We can also specify the components to monitor by providing the group name as part of the filter.

    For example: To monitor only the JVM and WebContainer components, specify the components in server.xml as follows:

  2. To remove components from monitoring.

    To stop monitoring a component, we must remove the component from the filter group at run time.

    For example: The following filter configuration monitors the JVM, ThreadPool, WebContainer, Session and ConnectionPool components:

      <monitor filter="JVM,ThreadPool,WebContainer,Session,ConnectionPool"/>

    To stop monitoring the components WebContainer and Session, remove those components from the filter configuration:

  3. To enable monitoring of components at run time.

    To enable monitoring for specific components at run time, we can specify the components in the monitor tag at run time.

    The data that is collected by the filtering components is available as MXBeans. For more information about the various MXBeans, see Monitoring the Liberty profile.

    Currently, fine-grained monitoring is supported only at the component level (such as WebContainer, ThreadPool, JVM) and not at the counter level.


Parent topic: Monitoring the Liberty profile