Wso2 ESB and Bam: why operator name is always be "mediate"? - wso2

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

Related

WSO2 1.9 API Manager HTTP Listener - Transports Statistics

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

How to monitor webmethod by using WSO2 BAM?

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/

Monitoring WSO2 IS logins/loguts, using WSO2 bam

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

Concern with the use of dynamic sequences in ESB 4.5.0

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:

Simple WSO2 ESB Soap interface

Myself: New to WSO2, Evaluating multiple ESB products
Here is what I am trying to do with wso2 ESB
Application "A" will send a zipcode (SOAP-WDSL) to WSO2-ESB
WSo2 will use that zip-code and query National WeatherService and obtain
the Lati-Long for zipcode
LatLonListZipCode method at
http://graphical.weather.gov/xml/SOAP_server/ndfdXMLserver.php?wsdl
Return the lat-Lon to Application "A"
Would someone please guide me , like where to start and the components needed so forth?
I am kind of confused by all the terminologies and over complicated product names and hierarchy (carbon, oxygen so forth)
For your requirement what you simply need is to create a Proxy service in WSO2 ESB to invoke this Backend service. (National WeatherService)
If you want to get started with WSO2 ESB I recommend you to 1st go though. WSO2 ESB Sample guide and WSO2 ESB Configuration. Where you can get a head start using that.
For your scenario you can simply follow the below steps to create a simple WSDL Proxy create a working scenario which you can later improve (ex with routing , monitoring etc..)
1) Login to WSO2 ESB.
2) Go to Proxy Service Adding Section
3) Select WSDL Based Proxy as the Template
4) Give a Proxy name , WSDL url , Service name (ndfdXML) , WSDL Port (ndfdXMLPort) and tick Publish Same Service Contract
And create the service.
Now you have exposed the same service though WSO2 ESB. You can go to service list section.Get the Service EPR details and invoke the service using your application.
Below is a nice work done for beginners. Someting similar to your case
http://dakshithar.blogspot.com/2012/07/routing-and-service-chaining-with-wso2.html