This setion explains how to download and install the OB Monitoring Tool, and then use it to monitor your APIs.
Downloading and installing the Monitoring Tool
To download and install the monitoring tool, follow the steps below:
- Apply the latest WUM update to the following product packs. For more information, see WSO2 Administration Guide - Using WSO2 Update Manager.
- WSO2 Open Banking - API Manager 2.6.0
- WSO2 OPen Banking - API Manager Analytics 2.6.0
To enable the publisher to publish monitoring statistics, open the
<WSO2OB_AM_HOME>/repository/conf/api-manager.xml
file and update thePublisherClass
element underAnalytics
as shown below.<PublisherClass> com.wso2.finance.open.banking.gateway.uk.monitoring.publisher.OBUsageDataBridgeDataPublisher </PublisherClass>
- Restart WSO2 Open Banking - API Manager 2.6.0 server.
- Download the zip file with the Monitoring Tool from here.
- Unzip the file you downloaded to extract the Monitoring Tool.
Creating a report in CSV format
Once you have downloaded and extracted the Monitoring Tool, you can create a report that consists of two CSV files as follows:
Open the
config.properties
file in the extracted zip file and update the properties.Information about the properties that can be configured are included as code comnments in the
config.properties
file.Copy your database driver class jar to the
libs
directory of your extracted directory. Then rename the jar it todb.jar
.
This allows the Monitoring tool to connect to the Consent DB database that is already set up for WSO2 Open Banking.Issue the following command to create the two CSV files of the report.
java -jar com.wso2.finance.open.banking.analytics.uk.monitoring.tool-1.2.0.jar
The report
The report generated as described above consists of the following two files:
apiresponsetimeresourcepath_<year>_<month>_<generatedtimestamp>.csv
This file contains data related to the API response time. The format of the file is as shown in the following sample.Date (dd/mm/yy), Brand, API Context, API Resource Path, API Response times in milliseconds 2018-12-05,WSO2OB,/AccountsInfoAPI/v2.0.0,GET /accounts,192 2018-12-05,WSO2OB,/AccountsInfoAPI/v2.0.0,POST /account-requests,1049 2018-12-06,WSO2OB,/AccountsInfoAPI/v2.0.0,GET /account-requests/{AccountRequestId},693 2018-12-06,WSO2OB,/AccountsInfoAPI/v2.0.0,GET /accounts,285 2018-12-06,WSO2OB,/AccountsInfoAPI/v2.0.0,POST /account-requests,631
apiusageresourcepath_<year>_<month>_<generatedtimestamp>.csv
This file contains count data related to the API resource path. The format of the file is as shown in the following sample.Date (dd/mm/yy), ASPSP, Brand, API Type, API Context, API Resource Path, # of Successful API Calls(200 201 or 204 codes), # of API Calls failed for Business Reasons (4xx codes), # of API Calls failed for Technical Reasons (5xx codes),# of TPPs Calling API, # of API Calls with Rejected Status, # of API Calls Not Authorised by PSU 2018-12-05,WSO2OB,WSO2OB,AIS,/AccountsInfoAPI/v2.0.0,POST /account-requests,2,0,0,1,1,0 2018-12-05,WSO2OB,WSO2OB,AIS,/AccountsInfoAPI/v2.0.0,GET /accounts,0,1,0,1,, 2018-12-06,WSO2OB,WSO2OB,AIS,/AccountsInfoAPI/v2.0.0,POST /account-requests,8,3,0,3,0,7 2018-12-06,WSO2OB,WSO2OB,AIS,/AccountsInfoAPI/v2.0.0,GET /account-requests/{AccountRequestId},2,1,0,1,, 2018-12-06,WSO2OB,WSO2OB,AIS,/AccountsInfoAPI/v2.0.0,GET /accounts,0,1,0,1,,