Re: [Dev] WSO2 ESB LoadBalanced Endpoint Logging

2015-01-09 Thread Bhathiya Jayasekara
Hi Alessio,

On Mon, Jan 5, 2015 at 9:51 PM, Aliosha  wrote:

> i'm using WSO2 ESB 4.8.1.
>
> In my usecase i use a proxy (MyProxy) sending each request towards a
> loadbalanced endpoint. Inside the loadBalanced endpoint there are 3
> endpoints (E1, E2, E3) and the balancing algorithm is the standard "round
> robin". In this structure i need to log exactly:
>
> 1) Who is sendig the request (the client IP for example)
>
 
  
 


> 2) the payload of the request (maybe i can obtain this setting the log
> level = full)
>
Yes, you can use 


> 3) which of the 3 endpoints the request is sent to (E1, E2 or E3 ?)
>
I don't think you can achieve this using log mediator. As a workaround, if
you enable DEBUG logs for your Endpoints (HTTPEndpoint, AddressEndpoint
etc.), you can see to which endpoint each request is sent.

Thanks,
Bhathiya


> How can i achieve this? thanx
>



-- 
*Bhathiya Jayasekara*
*Software Engineer,*
*WSO2 inc., http://wso2.com *

*Phone: +94715478185*
*LinkedIn: http://www.linkedin.com/in/bhathiyaj
*
*Twitter: https://twitter.com/bhathiyax *
*Blog: http://movingaheadblog.blogspot.com
*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] WSO2 ESB LoadBalanced Endpoint Logging

2015-01-09 Thread Malaka Silva
Hi,

You can get the used endpoint using following configuration.

 
 var endpoint = mc.getProperty('last_endpoint');
 mc.setProperty('used_endpoint',endpoint.toString());
 
 

 

On Fri, Jan 9, 2015 at 3:39 PM, Bhathiya Jayasekara 
wrote:

> Hi Alessio,
>
> On Mon, Jan 5, 2015 at 9:51 PM, Aliosha  wrote:
>
>> i'm using WSO2 ESB 4.8.1.
>>
>> In my usecase i use a proxy (MyProxy) sending each request towards a
>> loadbalanced endpoint. Inside the loadBalanced endpoint there are 3
>> endpoints (E1, E2, E3) and the balancing algorithm is the standard "round
>> robin". In this structure i need to log exactly:
>>
>> 1) Who is sendig the request (the client IP for example)
>>
>  
>expression="get-property('axis2','REMOTE_ADDR')"/>
>  
>
>
>> 2) the payload of the request (maybe i can obtain this setting the log
>> level = full)
>>
> Yes, you can use 
>
>
>> 3) which of the 3 endpoints the request is sent to (E1, E2 or E3 ?)
>>
> I don't think you can achieve this using log mediator. As a workaround, if
> you enable DEBUG logs for your Endpoints (HTTPEndpoint, AddressEndpoint
> etc.), you can see to which endpoint each request is sent.
>
> Thanks,
> Bhathiya
>
>
>> How can i achieve this? thanx
>>
>
>
>
> --
> *Bhathiya Jayasekara*
> *Software Engineer,*
> *WSO2 inc., http://wso2.com *
>
> *Phone: +94715478185 <%2B94715478185>*
> *LinkedIn: http://www.linkedin.com/in/bhathiyaj
> *
> *Twitter: https://twitter.com/bhathiyax *
> *Blog: http://movingaheadblog.blogspot.com
> *
>



-- 

Best Regards,

Malaka Silva
Senior Tech Lead
M: +94 777 219 791
Tel : 94 11 214 5345
Fax :94 11 2145300
Skype : malaka.sampath.silva
LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77
Blog : http://mrmalakasilva.blogspot.com/

WSO2, Inc.
lean . enterprise . middleware
http://www.wso2.com/
http://www.wso2.com/about/team/malaka-silva/


Save a tree -Conserve nature & Save the world for your future. Print this
email only if it is absolutely necessary.
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] WSO2 ESB LoadBalanced Endpoint Logging

2015-01-09 Thread Isuru Udana
Hi Malaka,

On Fri, Jan 9, 2015 at 6:06 PM, Malaka Silva  wrote:

> Hi,
>
> You can get the used endpoint using following configuration.
>
>  
>  var endpoint = mc.getProperty('last_endpoint');
>  mc.setProperty('used_endpoint',endpoint.toString());
>  
>
 
>  expression="get-property('used_endpoint')"/>
>  
>
This has to be done at the outSequence. isn't it ? We can only log the
child endpoint name which the request is sent, when the response is
received.

>
> On Fri, Jan 9, 2015 at 3:39 PM, Bhathiya Jayasekara 
> wrote:
>
>> Hi Alessio,
>>
>> On Mon, Jan 5, 2015 at 9:51 PM, Aliosha  wrote:
>>
>>> i'm using WSO2 ESB 4.8.1.
>>>
>>> In my usecase i use a proxy (MyProxy) sending each request towards a
>>> loadbalanced endpoint. Inside the loadBalanced endpoint there are 3
>>> endpoints (E1, E2, E3) and the balancing algorithm is the standard "round
>>> robin". In this structure i need to log exactly:
>>>
>>> 1) Who is sendig the request (the client IP for example)
>>>
>>  
>>   > expression="get-property('axis2','REMOTE_ADDR')"/>
>>  
>>
>>
>>> 2) the payload of the request (maybe i can obtain this setting the log
>>> level = full)
>>>
>> Yes, you can use 
>>
>>
>>> 3) which of the 3 endpoints the request is sent to (E1, E2 or E3 ?)
>>>
>> I don't think you can achieve this using log mediator. As a workaround,
>> if you enable DEBUG logs for your Endpoints (HTTPEndpoint, AddressEndpoint
>> etc.), you can see to which endpoint each request is sent.
>>
>> Thanks,
>> Bhathiya
>>
>>
>>> How can i achieve this? thanx
>>>
>>
>>
>>
>> --
>> *Bhathiya Jayasekara*
>> *Software Engineer,*
>> *WSO2 inc., http://wso2.com *
>>
>> *Phone: +94715478185 <%2B94715478185>*
>> *LinkedIn: http://www.linkedin.com/in/bhathiyaj
>> *
>> *Twitter: https://twitter.com/bhathiyax *
>> *Blog: http://movingaheadblog.blogspot.com
>> *
>>
>
>
>
> --
>
> Best Regards,
>
> Malaka Silva
> Senior Tech Lead
> M: +94 777 219 791
> Tel : 94 11 214 5345
> Fax :94 11 2145300
> Skype : malaka.sampath.silva
> LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77
> Blog : http://mrmalakasilva.blogspot.com/
>
> WSO2, Inc.
> lean . enterprise . middleware
> http://www.wso2.com/
> http://www.wso2.com/about/team/malaka-silva/
> 
>
> Save a tree -Conserve nature & Save the world for your future. Print this
> email only if it is absolutely necessary.
>



-- 
*Isuru Udana*
Senior
*Software Engineer*
WSO2 Inc.; http://wso2.com
email: isu...@wso2.com cell: +94 77 3791887
blog: http://mytecheye.blogspot.com/
twitter: http://twitter.com/isudana
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] WSO2 ESB LoadBalanced Endpoint Logging

2015-01-09 Thread Malaka Silva
Hi Isuru,

Yes. This needs to be configured in out path, (OutSequence) after sending
the request to the Back-end service.

On Fri, Jan 9, 2015 at 7:13 PM, Isuru Udana  wrote:

> Hi Malaka,
>
> On Fri, Jan 9, 2015 at 6:06 PM, Malaka Silva  wrote:
>
>> Hi,
>>
>> You can get the used endpoint using following configuration.
>>
>>  
>>  var endpoint = mc.getProperty('last_endpoint');
>>  mc.setProperty('used_endpoint',endpoint.toString());
>>  
>>
>  
>> > expression="get-property('used_endpoint')"/>
>>  
>>
> This has to be done at the outSequence. isn't it ? We can only log the
> child endpoint name which the request is sent, when the response is
> received.
>
>>
>> On Fri, Jan 9, 2015 at 3:39 PM, Bhathiya Jayasekara 
>> wrote:
>>
>>> Hi Alessio,
>>>
>>> On Mon, Jan 5, 2015 at 9:51 PM, Aliosha  wrote:
>>>
 i'm using WSO2 ESB 4.8.1.

 In my usecase i use a proxy (MyProxy) sending each request towards a
 loadbalanced endpoint. Inside the loadBalanced endpoint there are 3
 endpoints (E1, E2, E3) and the balancing algorithm is the standard "round
 robin". In this structure i need to log exactly:

 1) Who is sendig the request (the client IP for example)

>>>  
>>>   >> expression="get-property('axis2','REMOTE_ADDR')"/>
>>>  
>>>
>>>
 2) the payload of the request (maybe i can obtain this setting the log
 level = full)

>>> Yes, you can use 
>>>
>>>
 3) which of the 3 endpoints the request is sent to (E1, E2 or E3 ?)

>>> I don't think you can achieve this using log mediator. As a workaround,
>>> if you enable DEBUG logs for your Endpoints (HTTPEndpoint, AddressEndpoint
>>> etc.), you can see to which endpoint each request is sent.
>>>
>>> Thanks,
>>> Bhathiya
>>>
>>>
 How can i achieve this? thanx

>>>
>>>
>>>
>>> --
>>> *Bhathiya Jayasekara*
>>> *Software Engineer,*
>>> *WSO2 inc., http://wso2.com *
>>>
>>> *Phone: +94715478185 <%2B94715478185>*
>>> *LinkedIn: http://www.linkedin.com/in/bhathiyaj
>>> *
>>> *Twitter: https://twitter.com/bhathiyax *
>>> *Blog: http://movingaheadblog.blogspot.com
>>> *
>>>
>>
>>
>>
>> --
>>
>> Best Regards,
>>
>> Malaka Silva
>> Senior Tech Lead
>> M: +94 777 219 791
>> Tel : 94 11 214 5345
>> Fax :94 11 2145300
>> Skype : malaka.sampath.silva
>> LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77
>> Blog : http://mrmalakasilva.blogspot.com/
>>
>> WSO2, Inc.
>> lean . enterprise . middleware
>> http://www.wso2.com/
>> http://www.wso2.com/about/team/malaka-silva/
>> 
>>
>> Save a tree -Conserve nature & Save the world for your future. Print this
>> email only if it is absolutely necessary.
>>
>
>
>
> --
> *Isuru Udana*
> Senior
> *Software Engineer*
> WSO2 Inc.; http://wso2.com
> email: isu...@wso2.com cell: +94 77 3791887
> blog: http://mytecheye.blogspot.com/
> twitter: http://twitter.com/isudana
>



-- 

Best Regards,

Malaka Silva
Senior Tech Lead
M: +94 777 219 791
Tel : 94 11 214 5345
Fax :94 11 2145300
Skype : malaka.sampath.silva
LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77
Blog : http://mrmalakasilva.blogspot.com/

WSO2, Inc.
lean . enterprise . middleware
http://www.wso2.com/
http://www.wso2.com/about/team/malaka-silva/


Save a tree -Conserve nature & Save the world for your future. Print this
email only if it is absolutely necessary.
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev