Monitoring Servers

With WSO2 BAM, you can add servers to be monitored. Once you add a monitored server using the management console, a database record will be created for that server in the WSO2 BAM database. This is the primary resource in the database's entity hierarchy that is referenced by all other data storing tables.

Adding a server

Server addition is driven by two types of data collection methods

  1. Polling

    WSO2 BAM will poll the server being monitored on a periodic basis. In the current implementation the polling interval is one minute and is not configurable.
  2. Eventing

    WSO2 BAM will subscribe to the events published by the server being monitored. Event publication is done using WS-Eventing specification. Note that for this method to work, the server being added must have a publisher endpoint. There are three types of publishers, service data publisher for WSO2 Application Server, mediation data publisher for WSO2 ESB that are available as independent components that can be used to publish data from those respective server types. Also another type of publishers called Activity Publishers are available for tracing message flows. See the documentation on data publishers for more details on data publishers.
  3. Generic

    WSO2 BAM will neither poll nor subscribe to the server being monitored. The server can publish data to WSO2 BAM, using user defined data event publisher. This type of a server is useful, when it is desired to store data that does not fall into server data or mediation data categories.

Adding a server for polling data

WSO2 BAM Polling Servers

For this you have to select Polling as the statistics collection method.

WSO2 WSAS instances can be monitored using data polling mechanism. The versions of WSO2 WSAS supported with this model include 3.0.0 and upwards.

You can enter the server URL in the following format

https://[host name]:[port]

For example:

https://localhost:9443

NOTE: If you are running both WSO2 WSAS and WSO2 BAM on the same server, you MUST run one of the servers with a web context name other than root context. See the following document on how to set a web context with a WSO2 Carbon based servers.

If you are running WSO2 WSAS with a Web context, then you have to provide the server URL with the context name.

https://[host name]:[port]/[context name]

For e.g. if wsas is the web context name in use

https://localhost:9443/wsas

When you select the data collection method to be polling, the type of statistics that can be collected is limited to Service. This is because, with polling model, in the current implementation of WSO2 BAM, we only support pulling data from WSO2 WSAS. In other words, polling mediation or message level data is not supported.

Since the polling model uses the statistics administrative service on WSO2 WSAS server, a user name and password with administrative privileges on the WSO2 WSAS server instance is also required to add a server to be polled.

You can also provide a description of the server being added, which could be useful in your future references to the monitored server.

Adding a server for subscribing for events

WSO2 BAM Eventing Servers

For this, you have to select Eventing as the statistics collection method. Like in the case of polling, you can provide the server URL using the format

https://[host name]:[port]</[web context name]>

Also, note that, if you have set the host name setting in the carbon.xml file of the server being added, you must use that host name, and not the server IP, when adding the server as server URL. If you have not set host name setting in carbon.xml file of the server being added, then you must use the IP address of the server being added, in place of the host name. To make sure that you can keep on monitoring the server irrespective of IP changes, due to relocation of a server instance that is being monitored with WSO2 BAM, it is advised that you use the host name setting and use the host name instead of the IP when adding the server to be monitored with WSO2 BAM.

The eventing model supports Service data and Mediation data.

Service data can be collected from service data publishers deployed with WSO2 WSAS instances.Here,you have to select Eventing as the statistics collection method and Type of Data as Service. ServerURL you need to provide as explained above.
eg:https://10.100.1.143:9443/wsas

Mediation data can be collected from mediation data publishers deployed with WSO2 ESB instances.Here,you have to select Eventing as the statistics collection method and Type of Data as Mediation. ServerURL you need to provide as explained above.
eg:https://10.100.1.143:9443/esb

Activity data can be collected from activity data publishers deployed with WSO2 ESB, WSO2 Application Server or WSO2 Data Service Server instances.Here,you have to select Eventing as the statistics collection method and Type of Data as Message. ServerURL you need to provide as explained above.
eg:https://10.100.1.143:9443/esb

The corresponding event message subscribing endpoints are built into WSO2 BAM and will work out of the box. However, you have to ensure that the data publishers are deployed with the server being added so that they can publish the data using WS-Eventing. Data publishers are shipped as separate components, and you can find more information on how to install them in data publishers documentation.

You can also provide a description of the server being added, which could be useful in your future references to the monitored server.

Adding a generic server

WSO2 BAM Generic Servers

For this, you have to select Generic as the data collection method. Once you select Generic, you will have to provide only the server URL and server description. The URL will not be validated for this case. When you are publishing data to WSO2 BAM against a Generic server, all you have to do is to use the server URL given as the data source. See documentation on data publishers for more information.

List Monitored Servers

WSO2 BAM Generic Servers

The monitored server details page list the server URL, stat collection method, stat type, active/inactive status and the description for each server. Based on the current server status, you will be able to either activate or deactivate a monitored server. In the active state, data for the server would be collected, using the corresponding stat collection method, and in the inactive state, no current data would be collected. Note that, in the current implementation of WSO2 BAM, it is not allowed to delete a server, from the management console. This was done purposely, to guard against deleting valuable historical data, collected over time, for a server. Note that, with BAM, even though a server might not be used any more, the data collected against that server would be useful with analytics. Hence, rather than deleting, you can retire a server by deactivating it. Even if you happen to use a given server for a different set of services, over time, it is perfectly fine to use the same server instance in WSO2 BAM, as it captures data along with time dimension.

If it is absolutely necessary to delete a server instance, then it is advised that you do this at the database layer directly.