Configuring monitoring interceptors

IBM z/OS Connect provides a framework that enables interceptors (exit programs) to be invoked to provide request monitoring data. Interceptors are OSGi services that implement the com.ibm.zosconnect.spi.Interceptor Service Provider Interface (SPI) that is provided by z/OS Connect.

About this task

zosConnect-3.0 Applies to zosConnect-3.0.

Interceptors are configured for API provider APIs by including the z/OS Connect zosconnect:monitoring-1.0 feature and setting the apiProviderInterceptorsRef and apiRequesterInterceptorsRef attributes on the zosconnect_monitoring element to provide the lists of interceptors to be called for API provider and API requester APIs. Interceptors can only be configured globally for all APIs in a server.

Procedure

  1. Update the server.xml file to use the monitoring-1.0 feature.
    Add the feature to the <featureManager> section.
    For example:
    <featureManager>
        <feature>zosconnect:monitoring-1.0</feature>
    </featureManager>
  2. Define one or more monitoring interceptors.
    For third party interceptors, refer to their documentation for the configuration specification. Then add a zosconnect_zosConnectInterceptors element to list the interceptors to call for API provider. If required, add another zosconnect_zosConnectInterceptors element to list the interceptors to call for API requester. Finally, add a zosconnect_monitoring element to reference the interceptor lists to be called for API provider and API requester.
    For example:
    
    <!-- Monitoring interceptor definitions --> 
    <usr_monitoringInterceptorOne id="monInt1"/> 
    <usr_monitoringInterceptorTwo id="monInt2"/>
    <zosconnect_zosConnectInterceptors id="apiProviderList" interceptorRef="monInt1, monInt2"/>
    <zosconnect_zosConnectInterceptors id="apiRequesterList" interceptorRef="monInt1"/> 
    
    <zosconnect_monitoring apiProviderInterceptorsRef="apiProviderList" apiRequesterInterceptorsRef="apiRequesterList"/>