SAM Listener - 7.1

Talend ESB Infrastructure Services Configuration Guide

Version
7.1
Language
English (United States)
Product
Talend Data Fabric
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Open Studio for ESB
Talend Real-Time Big Data Platform
Module
Talend ESB
Talend Runtime
Content
Design and Development
Installation and Upgrade

The SAM Listener allows the user to get the Service Activity Monitoring Events from the Talend Service Activity Monitoring Agent into the Event Logging Agent, with the ability to use all the features of the Event Logging for Service Activity Monitoring Events, and to combine easily Service Activity Monitoring Events with other Event Logging events into a single search or audit list.

To enable Event Logging via the SAM Listener, only the related listener bundle needs to be started and, as usual for the Service Activity Monitoring, the related design time configuration to use it must be applied (or as with Talend ESB version 5.4 and higher), and the related Service Activity Monitoring Custom policy must be used at runtime via the Service Registry to enable Service Activity Monitoring for the related ESB Consumer/Provider.

The SAM Listener is implemented using Apache Camel, via the cxf: component, and exposes a SOAP Service which is exactly the same as the Service Activity Monitoring Server one (SOAP Service - MonitoringServiceSOAP, with the putEvents operation). See the WSDL below for a real example.

To use the SAM Listener, you first need to stop the Service Activity Monitoring Server, if the service is already started on the current container. To do so, use the tesb:stop-sam command.

The WSDL of the Service Activity Monitoring Server, used to retrieve Service Activity Monitoring Events, is available at http://localhost:8040/services/MonitoringServiceSOAP?wsdl.

<wsdl:definitions name="MonitoringWebServiceService" targetNamespace="http:
//service.server.sam.esb.talend.org/">
    <wsdl:import location="http://localhost:8040/services/MonitoringService
SOAP?wsdl=MonitoringService.wsdl" namespace="http://www.talend.org/esb/sam/
MonitoringService/v1">
    </wsdl:import>
    <wsdl:binding name="MonitoringWebServiceServiceSoapBinding" type="ns1:M
onitoringService">
        <soap:binding style="document" transport="http://schemas.xmlsoap.or
g/soap/http"/>
        <wsdl:operation name="putEvents">
            <soap:operation soapAction="http://www.talend.org/esb/sam/Monit
oringService/v1/putEvents" style="document"/>
            <wsdl:input name="putEvents">
                <soap:body use="literal"/>
            </wsdl:input>
            <wsdl:output name="putEventsResponse">
                <soap:body use="literal"/>
            </wsdl:output>
            <wsdl:fault name="PutEventsFault">
                <soap:fault name="PutEventsFault" use="literal"/>
            </wsdl:fault>
        </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="MonitoringWebServiceService">
        <wsdl:port binding="tns:MonitoringWebServiceServiceSoapBinding" 
name="MonitoringWebServicePort">
            <soap:address location="http://localhost:8040/services/Monitori
ngServiceSOAP"/>
        </wsdl:port>
    </wsdl:service>
</wsdl:definitions>

Basically, the SAM Listener exposes the Service Activity Monitoring Server API, so the SAM-Agent just needs to use the right URL to send the SAM-Events to the SAM Listener instead of the Service Activity Monitoring Server. In both cases, it can be a localhost or remote host. This means that a single server side Event Logging Agent with one SAM Listener can be used as a remote replacement to the standard Service Activity Monitoring Server. This is the only listener so far which can be used both locally and remotely.

The Event Logging SAM Listener only supports the following two configuration settings which is used in the "SAM to Event" converter in the org.talend.eventlogging.listener.sam.cfg configuration file:

# By default all events captured by the SAM Listener will be assigned 
# to the sam category
category=sam

# if SAM events from this container would be treated as audit events
audit=false

# if map the subject of the SAML token to the subject attribute of the even
t
map.subject.samltoken=false
# if map the user name of the UsernameToken to the subject attribute of the 
# event
map.subject.usernametoken=false
  • category=sam means that all events captured by the SAM Listener will be assigned to the sam Event Category and that all those events will be set to audit=false but can be easily changed.

  • audit=true means that if SAM events from this container would be treated as audit events, the above configuration will be used as default: category=sam; audit=false.

  • map.subject. The SAM Event Listener particularly gives access to information about the user or about the subject of the Service call and enables to map this user or subject as an Event Subject, or not, with the following options. For performance reasons, the search will be performed from the top of the log message (exchange body) by string search to the related element name, and the values will be retrieved by pure string search to avoid an explicit XML document creation.

    • map.subject.samltoken=true will map the subject of the SAML token to the subject attribute of the event (true /false).

    • map.subject.usernametoken=true will map the user name of the UsernameToken to the subject attribute of the event (true /false).

If you want to use the dashboard specific to Service Activity Monitoring in addition to the ESB SAM one available the Logging page in Talend Administration Center, use the tesb:start-sam-retrieval-service command.