DSB Monitoring

Short view

A collection of modules routers are in charge of intercepting messages on request, response and ACK (more details on what is a router module are given here). At these different steps, the modules add some monitoring information such as timestamp and other KPIs. One module is then dedicated of collecting these data and sending reports to a monitoring layer at different message exchange phases.

Implementations

The DSB has its own monitoring collectors and APIs and is totally independent from any monitoring tools. This API can be found in module dsb-monitoring-api. Different implementations are provided by default and are listed below.

The global configuration file for monitoring stuff is located under DSB/conf/monitoring.conf. Change the active flag to activate monitoring or not.

EasierBSM implementation

A default implementation shipped with the default distribution is based on top of EASIERBSM. At the implementation level, it means that every time an endpoint is activated in the DSB, an endpoint registry listener sends a registration message to easierBSM in order to create a new monitoring endpoint. Then, each time a message is exchanged between a service consumer and provider, the DSB monitoring modules will send reports to easierBSM layer, translating DSB monitoring data to easierBSM one. EasierBSM also needs the easyResource API to work, so the DSB provides it as described in the easyResource implementation section.

Configuration

The easierBSM monitoring configuration file is available at DSB_HOME/conf/easierbsm.cfg (a standard property file with key/value pairs). Parameters are:

  • easierbsm.active=BOOLEAN where BOOLEAN is true or false: Activate or not monitoring by static configuration. Note: Changing this parameter value at runtime has no effect.
  • easierbsm.base=URL is the base URL of the BSM endpoints. As described in the BSM documentation, each DSB endpoint enable a monitoring endpoint which address is built from the easierbsm base URL plus the endpoint name + a suffix. By default, the base value is set to http://localhost:8180/services/
  • easierbsm.admin=URL where URL is the URL of the monitoring management endpoint ie the one which will receive the new registration query as described above. By default this value is set to http://localhost:8180/services/adminExternalEndpoint
    Note that the global configuration file (monitoring.cfg) is used to activate or not all the monitoring implementation.

Code

The DSB related code for easierBSM implementation can be found at:

  • modules/dsb-eaiserbsm-connector/ : easierBSM client implementation. 
  • modules/dsb-kernel-easierbsmservice/ : easierBSM client factory
  • modules/dsb-kernel-monitoringservice/ : Abstract monitoring kernel service which listens to new endpoints and notify the monitoring bus, send monitoring reports using the 2 modules above.
  • modules/dsb-monitoring-easierbsm-jaxws/ and modules/dsb-monitoring-easierbsm-admin-jaxws/
    : JAXWS interfaces generated from schemas

Web service notification implementation

Another monitoring implementation is based on Web service notification (WSN). Each time a message is exchanged between a service consumer and provider, a report is generated and sent to the internal WSN engine. If there are some subscribers which are interested in the monitoring data, they will be notified by the WSN engine with the monitoring data inside a WSN notify message such as:

Monitoring notification

Configuration

  • The WSN implementation provides an API to activate/deactivate monitoring (org.petalslink.dsb.ws.api.PubSubMonitoringManager) and get some additional information about the WSN monitoring stuff. This API is automatically exposed by the DSB as a Web service at startup and is available at http://HOST:PORT/petals/ws/PubSubMonitoringManager.
  • To receive notifications containing the monitoring data, interested parties must subscribe to the monitoring topic which is defined as a complete QName:

An example of subscription payload can be

In the previous snippet, each time a monitoring message is published to the MonitoringTopic, the subscriber will receive a notification at http://localhost:9001/MonitoringSubscriber.

More information on how to use WSN stuff and clients are explained in the WSN Page.

Code

All the code of this implementation is located in the dsb-kernel-pubsubmonitoringservice module.

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.