I have integrated WSO2 ESB and BAM. Greatly, I'm able to monitor the Service Proxy. But I wonder if there is anyway to monitor the operator/WebMethod of proxy. Please give me some advice.
I already use Bam mediator to collect ESB data for monitoring Webmethod. But my problem is there is not payload_request_count/response_count... data to sent to bam_service_data_publisher. Whereby the dashboard is always empty.
So how could I do to send those properties?
You can add the BAM mediator to a sequence (when adding a mediator, choose Agent -> BAM) and specify the BAM server profile and stream you want to use to start capturing and sending data events to the BAM server. Be sure to enable statistics on the sequence to start collecting the data.
https://docs.wso2.com/display/BAM250/Setting+up+BAM+Mediator
https://docs.wso2.com/display/ESB481/BAM+Mediator
In addition you can use Api Manager to control and monitor your web method.
http://wso2.com/api-management/
Related
I want to limit the number of connection received by WSO2 ESB. Is there any property to be able to limit by properties (axis2, carbon, etc.)?
This answer is based on the understanding gained from your comment. So, I assumed your backend has a limit of requests which can be processed which is less than what the ESB can accept.
There are two option:
Similar to catalina-server.xml for tomcat, there is pass-thru.properties file in the conf folder where you can tune certain parameters to suite the load you expect and also to match the capabilities of the VM you have hosted the ESB.
https://docs.wso2.com/display/ESB490/Configuring+passthru-http.properties
One disadvantage of above option would be, some of your requests will not be accepted by the ESB if its too busy. To overcome that, you can use a queueing mechanism. i.e. You accept all the requests and store them in a message store (a queue). Then configure a message processor to retrieve those messages and process. Disadvantage of this option is, its difficult to cater a request response scenario.
As Bhathiya has mentioned, you can front your ESB with a WSO2 API Manager and throttle the requests too.
Until ESB 4.8.1, it had throttling feature. You also can use Throttling Mediator in each service.
Another option is to front ESB by WSO2 API Manager which has complete throttling support.
I'm not receiving any input on the Transport Statistics metrics page on the API Manager web page. Is this supposed to work out of the box? Please help me with how to setup this up so I receive data. I'm looking to identify how much data (size) is being transferred during API calls. Is there a different way?
API Manager is not provided Transport Statistics by default. We can configure Wso2 API Manger 1.9 with WSO2 BAM (Business Activity Monitor) or Google Analytics to achieve your requirement.
You can follow the steps mentioned in the document [1] to configure API manager with BAM or Google Analytics.
[1]- https://docs.wso2.com/display/AM190/Working+with+Statistics
I'm now using WSO2 ESB for creating WebService Proxy and Bam for monitoring. I can seee the data in Bam explorer, but the payload_operation_name is always be "mediate".
How could I config to see the real name of the operation?
According to your description, I think you are using the Service Data Agent [1] to capture the proxy related statistics here where as you actually need to us the Mediation Data Agent for that. Because the Service Data Agent is mainly for statistics monitoring of the axis2 services, and hence you are getting the operation name as 'mediate' always when accessing the proxy service. The correct way to go forward is to use, Mediation Data Agent, but it will not publish the operation name what you are accessing, and if your backend services is axis2 service then you could use WSO2 Application server and use the Service Data Agent to collect the operation level stats of the web service. If your back end service is not within WSO2 servers, then you can use BAM mediator [3] or Publish Event Mediator (if ESB 4.9.0) [4] to publish this information to BAM.
[1] https://docs.wso2.com/display/BAM250/Setting+up+Service+Statistics+Data+Agent
[2] https://docs.wso2.com/display/BAM250/Setting+up+Mediation+Stat+Data+Agent
[3] https://docs.wso2.com/display/BAM250/Setting+up+BAM+Mediator
[4] https://docs.wso2.com/display/ESB490/Publish+Event+Mediator
I would like to monitor the logins/logouts (and perhaps other admin services) from a WSO2 Identity Server to WSO2 Buisness Activity Monitor. I found a couple of articles on how to do it, using an WSO2 ESB or/and WSO2 AS. However I would like to do it without the ESB/AS.
Is this possible? And if so how?
Generic way of monitoring a server by BAM is through a custom data agent. Follow [1] for referring how to write a BAM data agent. You can write a data agent to monitor WSO2 Identity Server (IS) which publishes events from IS to BAM.
[1] http://docs.wso2.org/display/BAM230/Data+Publisher
I assume you are referring to the articles explaining how to configure log4j logging to log to the BAM server for storage in Cassandra. They are applicable to the IS server as well since the IS is, just as all WSO2 products, based on the same base product called 'Carbon'.
If you specifically want to log only the login/logout events and not any additional logging you could adjust the appender in such a way that only the following class will log to that appender (as shown here: log4j: Log output of a specific class to a specific appender):
log4j.logger.org.wso2.carbon.core.services.util.CarbonAuthenticationUtil=INFO, LOGEVENT
log4j.additivity.org.wso2.carbon.core.services.util.CarbonAuthenticationUtil=false
In a scenario where I monitoring my proxy services in ESB 4.5.0 using BAM 2.0.1 with WSO2 products, how I can define that the dynamic endpoints and sequences used in this proxy services have their statistic enable?. So I can see their statistics in BAM.
I can anable sequences statistics in the defined sequences in the synapse configuration but I can not use them for example in chaining scenarios, and I can use dynamic sequences in chaining scenarios but I cannot enable their statistics.
This is due to in the Send Mediator I can only specified dynamic endpoints or sequences that exist in the registry, not in the synapse configuration.
What can I do to make my scenario work?
In the same scenario with a proxy service that implement a service chaining I can see the right response when I consume the service using SOAPUI but in BAM 2.0.1 appear as fail all the time.
You can enable statistics for dynamic endpoints and dynamic sequences by this way:
1. Go to the registry resource,
eg:- /_system/config/Hello
2. Content -> Edit as text
3. Add statistics="enable" to address element
Then if you have used that endpoint, statistics will be fired to BAM and you can see those if the Mediation statistics toolbox is installed.
I have carried out a test on a Chaining service in WSO2 ESB and monitored it through the WSO2 BAM 2.0.1. It seems to work fine and did not encounter any statistics mismatch. The statistics matched with esb invocations.
ESB Statistics:
BAM Mediation Stats: