MONITORING IN WSO2

Tested using WSO2 v2.2.0 with Ubuntu16 and Java 1.8.0_171

There are several ways to monitor what is going on in WSO2 as described in the following sections.

Monitoring via the API Publisher interface

It provides a good amount of statistics about the APIs deployed (main website):

API Analytics

  • Created API over time
  • API usage
  • Top API User
  • API last access times
  • Usage by resource path
  • Usage by destination
  • API Usage comparison
  • API Throttled requests
  • Faulty invocations
  • API Latency
  • API Usage across geolocations
  • API Usage across usage agent

APP Analytics

  • App throttled requests
  • Apps created over time

Subscriptions

  • API subscriptions
  • Developers signup over time
  • Subscriptions created over time

Details here.

This monitoring tool is extremely useful to the API-Manager and helps analyze the behavior of the APIs.

how to install

Details on how to install are provided here.

  1. API-M Analytics has to be installed and running similarly as the API Manager.
  2. In the API Manager main folder, go to repository/conf/api-manager.xml and set the following parameter to true instead to false by default (line 134).

    <!-- Enable Analytics for API Manager --> <Enabled>true</Enabled>

  3. make sure the API Manager and API-M Analytics share the same database

  4. (optional) add DAS_AGENT to be able to monitor WSO2 API-M logs
  5. Start API-M Analytics, and then API-Manager

Note: API-M Analytics provides the option to set up alerts with real-time analytics.

how to test

  1. Start WSO2 API-M Analytics and WSO2 API Manager. If everything is successful, the logs of API-M Analytics will show

    INFO {org.wso2.carbon.databridge.core.DataBridge} - user admin connected

  2. Deploy Sample API PizzaShackAPI for testing purposes

  3. If the previous steps were correctly implemented, all analytics tabs are accessible
  4. (optional) use and create APIs to see change in the metrics

Upon testing, everything worked as expected, except for API usage across geolocations. More configuration is required to enable analytics on API usage across geolocations, as explained here.

WSO2 Carbon metrics

The main documentation is provided here. The metrics are accessible via the tab 'monitor' of the API Manager.

We have access to

  1. JVM metrics
    • CPU load,
    • system load,
    • physical/virtual memory usage,
    • threading,
    • class load,
    • file descriptor.
  2. Event metrics
  3. App Logs
  4. System statistics
  5. System Logs
  6. SOAP Tracer
  7. Event Tracer
  8. Message flows

how to install

Nothing has to be installed, as these metrics are already included in the WSO2 API Manager.

To configure, the file /repository/conf/metrics.xml has to be enabled, or the flag -Dmetrics.enabled=true must be specified when starting the API Manager. The metrics are then stored in the following reporters: JMX, CSV and JDBC. Disabling or configuring the storage mode of WSO2 Carbon metric can be done following this link. By modifying the file /repository/conf/metrics.properties we can configure the metric properties.

how to test

Everything should work out-of-the box by going to https://<server addr>:9443/carbon/metrics-view/index.jsp?region=region4&item=metrics_jvm_menu

WSO2 API Manager Log analyzer

The Log Analytics in WSO2 API Manager helps to view your API related statistics and to analyze it. Detailed doc is provided here. It is a centralized point to collect and analyze the log.

In short, it provides

  • LIVE LOG VIEWER
  • OVERVIEW
  • APPLICATION ERRORS
  • API DEPLOYMENT STATS
  • LOGIN ERRORS
  • NUMBER OF API FAILURES
  • ACCESS TOKEN ERRORS

This monitoring tool is required if we have a lot of APIs to monitor, and we need to take actions/decisions based on metric delivered by logs and not delivered by the API-M Analytics.

how to install

API-M Analytics has to installed and running with DAS_AGENT running (see first section, how to install).

how to test

TODO ?

WSO2 IS Analytics

This provides analytics for the identity server (main docs) of WSO2.

In short, it provides:

  • Login Analytics: This refers to generating and analyzing login attempts made via WSO2 IS.
  • Session Analytics: This refers to generating and analyzing analytics relating to specific sessions that have taken place via WSO2 Analytics. A session is a time duration between a successful login and and the subsequent log out by a specific user.

This monitoring tool may be useful if the identity server is used extensively.

how to install

TODO ?

how to test

TODO ?

WSO2 ESB analytics

This tool works on top of WSO2 ESB (Entreprise Service Bus). WSO2 ESB works as a bridge between different applications. ESB Analytics allows to monitor traffic going through this component, and gathering metrics such as latency, % of packet successfully transmitted etc. This monitoring tool can be used if ESB is used in a corporate deployment. This this feature has not been tested with InterIoT deployments, but in principle could be used.

WSO2 DAS JMX Agent

WSO2 DAS provides a JMX agent which allows to monitor system resources of a WSO2 server (CPU/memory/OS) running on Linux. This monitoring tool is only required when managing a cluster of API-Manager, which is currently not the case with InterIoT deployments, but in principle could be used.