Follow the procedure below to view reports in WSO2 Log Analyzer.
Start the WSO2 Analytics - APIM 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
APIM_LOGANALYZER_SCRIPTscript as follows. This script is automatically run every 15 minutes.
- Log into the Analytics - APIM Management Console using the
- In the Main tab, click Scripts to open the Available Analytics Scripts page.
- Click Execute for the
- On Windows:
- Access the WSO2 API Manager Admin Portal using the
https://<Host_Name>:<Port_Name>/adminURL. Log into the portal using your credentials.
- 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 admin portal of API Manager, follow the below additional steps to configure Log Analyzer.
Configure API Manager to work with reverse proxy as described in Adding a Reverse Proxy Server.
Documentation describe how to apply reverse proxy to store and publisher applications. You can follow the same for admin portal(not WSO2 carbon management console) also.
Add two entries in your Load Balancer level for portal and shindig apps. 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 functionality of admin portal.
Navigate to API Manager node where you are accessing admin portal and open file <APIM_HOME>/repository/deployment/server/jaggeryapps/portal/store/carbon.super/fs/gadget/gadget-commons/js/gadget-utils.js file.
Comment out the following line.
Add a new line representing reverse proxy URL for admin portal which replaces location.hostname +":"+ location.port in above commented out line.
If your admin portal URL is https://myhost/apimanager/admin after applying reverse proxy new line would look like below.
Final configuration will look like below.
In the same APIM instance, open up <APIM_HOME>/repository/deployment/server/webapps/shindig/WEB-INF/web.xml and navigate to following section.
Here you have to set values as per your load balancer configuartion as shindig.host and shindig.port. Enter Server hostname as host and server HTTPS port as port.
If you use the same load balancer configuration used in this documentation, resulting configuration will look like below.
Save the configurations and start up API Manager.