Configuring the Service Activity Monitoring Agent - 8.0

Talend ESB Infrastructure Services Configuration Guide

Version
8.0
Language
English
Product
Talend Data Fabric
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Real-Time Big Data Platform
Module
Talend ESB
Talend Runtime
Content
Design and Development
Installation and Upgrade
Last publication date
2024-03-13

The main configuration files for Agents are <Talend.runtime.dir>/container/etc/org.talend.esb.sam.agent.cfg and the filter and handler configuration files. The <Talend.runtime.dir>/container/etc/org.talend.esb.sam.agent.cfg is automatically created when executing the Service Activity Monitoring features in the Talend Runtime Container. Filters and handlers are based on Spring bean configuration and can be added to the application's context (for example, beans.xml).

Properties description:

Property

Default

Description

collector.scheduler.interval   Interval (in milliseconds) of Agent built-in scheduler. The Agent will make one or several calls to the Service Activity Monitoring Server sending Events from local queue at this specified value. The number of calls actually made to the Service Activity Monitoring Server when scheduler interval has arrived is decided by the number of events in the local queue and the number of collector.maxEventsPerCall. This interval must be greater than 0.
collector.maxEventsPerCall   The value of this parameter is used to restrict the max number of Events per call to the Service Activity Monitoring Server. Lower values help to avoid sending overly large SOAP body messages to the Service Activity Monitoring server.
collector.lifecycleEvent false Whether the Agent should collect and send the lifecycle events to the Service Activity Monitoring Server. If true, the Service Activity Monitoring Server must be started before the Talend Runtime Container, otherwise connection exceptions will be thrown.
log.messageContent true Whether the Agent should store the Producer and Consumer SOAP message content into Events and send them to the Service Activity Monitoring Server.
log.maxContentLength -1 Sets the maximum SOAP content length per Event. -1 is unlimited.
log.enforceMessageIDTransfer false If true, Service Activity Monitoring will add WS-Addressing functionality implicitly and enforce MessageID transfer between Events. If false, the MessageID will be null in the Events if the user does not enable the WSAddressingFeature or Policy with Addressing explicitly.
log.messageContent.override true

Whether the controlling of the logging behavior at service level is allowed.

If this property is set to true, the logging behavior will be controlled by the org.talend.esb.sam.agent.log.messageContent property at service level. If false, the logging behavior will be controlled by the log.messageContent property at runtime.

service.url   The URL of Service Activity Monitoring Server that the Agent is to communicate with.
service.retry.number 5 Number of retries when a call to the Service Activity Monitoring Server fails.
service.retry.delay 1000 Delay in milliseconds before the next retry to call the Service Activity Monitoring Server.

For example:

collector.scheduler.interval=500
collector.maxEventsPerCall=10
collector.lifecycleEvent=false

log.messageContent=true
log.maxContentLength=-1
log.enforceMessageIDTransfer=true

service.url=http://localhost:8080/sam-server-war/services/MonitoringServiceSOAP
service.retry.number=3
service.retry.delay=5000

To filter or manipulate events, these Filter/Handler spring beans should be added into your Service provider or Service consumer bundle or jar, then these beans will be autowired by Service Activity Monitoring agent.

Some example bean definitions can be found below:

<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="
        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">

    <bean id="stringContentFilter"
        class="org.talend.esb.sam.common.filter.impl.StringContentFilter">
        <property name="wordsToFilter">
            <list>
                <value>abc</value>
            </list>
        </property>
    </bean>

    <bean class="org.talend.esb.sam.common.filter.impl.JxPathFilter">
        <constructor-arg value="content='test' and eventType='FAULT_IN' and customInfo/key1='value1'"/>
    </bean>

    <bean id="passwordHandler"
        class="org.talend.esb.sam.common.handler.impl.PasswordHandler">
        <property name="tagnames">
            <list>
                <value>Password</value>
            </list>
        </property>
    </bean>

    <bean id="fixedPropertiesHandler"
        class="org.talend.esb.sam.common.handler.impl.CustomInfoHandler">
        <property name="customInfo">
            <map>
                <entry key="Application name" value="Placeholder App" />
                <entry key="Stage" value="Dev" />
            </map>
        </property>
    </bean>
</beans>

For more information about how to use Filter/Handler in WAR applications or OSGi bundles, go to the following folder of the Talend ESB: examples/talend/tesb/sam.