The Log Analytics in WSO2 API Manager helps you to view your API related statistics and helps you to analyze it.
This feature is deprecated (to be removed in a future release) and is disabled by default. To enable the WSO2 Log Analyzer,
Follow the procedure below to view reports in WSO2 Log Analyzer.
Start the WSO2 API-M Analytics server. Then start the WSO2 API Manager server by running one of the following commands from the
- On Windows:
On Linux/Mac OS:
To update the Log Analyzer with the most recent information, execute the
APIM_LOGANALYZER_SCRIPTscript as follows. This script is automatically run every 15 minutes based on the cron job.
- Log into the API-M Analytics Management Console using the
- In the Main tab, click Scripts to open the Available Analytics Scripts page.
- Click Execute for the
APIM_LOGANALYZER_SCRIPTscript to update the Log Analyzer.
- On Windows:
- Access the WSO2 API Manager Admin Portal using the
https://<Host_Name>:<Port_Name>/adminURL. Log into the portal using your credentials. As default credentials use both username and password as "admin".
- In the left navigator, click Log Analyzer to expand the Log Analyzer section. Then click on one of the following depending on the information you want to view.
- LIVE LOG VIEWER: To view logs that are currently being generated. For more information about how to use the gadgets in this page, see Viewing Live Logs.
- OVERVIEW: To view the overall statistics for each log category generated. For more information about how to use the gadgets in this page, see Analyzing the Log Overview.
- APPLICATION ERRORS: To view detailed information about different categories of errors that have occurred. For more information about how to use the gadgets in this page, see Analyzing Application Errors.
- API DEPLOYMENT STATS: To view overall statistics relating to all the APIs that are deployed in WSO2 API Manager. For more information about how to use the gadgets in this page, see Analyzing API Deployment Statistics.
- LOGIN ERRORS: To view overall statistics for login errors that have occurred for your WSO2 API Manager installation. For more information about how to use the gadgets in this page, see Analyzing Login Errors.
- NUMBER OF API FAILURES: To view statistics relating to instances where the APIs deployed in your WSO2 API Manager installation have failed. For more information about how to use the gadgets in this page, see Analyzing the Number of API Failures.
- ACCESS TOKEN ERRORS: To view detailed statistics relating to access token errors. For more information about how to use the gadgets in this page, see Analyzing Access Token Errors.
Configuring Log Analyzer for reverse proxy enabled Admin Portal
If you have enabled a reverse proxy for the Admin Portal of API Manager, follow the additional steps below to configure the Log Analyzer.
Configure API Manager to work with reverse proxy as described in Configuring the Proxy Server and the Load Balancer.
The documentation page linked above describes how to apply a reverse proxy to the Store and Publisher applications. You can follow the same steps for the Admin Portal as well.
Add two entries in your load balancer level for the portal and shindig apps. An example Nginx configuration is shown below.
Note that, at the moment you have to use a context with no prefixes/suffixes as mapping for these two apps. These entries are internal but needed for the functionality of the Admin Portal.
In the API Manager node from which you are accessing the Admin Portal, open the
Comment out the following line.
Add a new line representing the reverse proxy URL for the Admin Portal, which replaces
location.hostname +":"+ location.portin the above commented out line.
If your Admin Portal URL is
https://myhost/apimanager/admin, after applying a reverse proxy, the new line looks like the following:
The final configuration looks like the following.
In the same API Manager instance, open the
<API-M_HOME>/repository/deployment/server/webapps/shindig/WEB-INF/web.xmlfile and navigate to the following section.
Set values as per your load balancer configuration for the
shindig.portparameters. Enter the server hostname as
hostand the server HTTPS port as
If you use the same load balancer configuration used in this documentation, the resulting configuration looks like the following:
Save the configurations and start the API Manager server.