Friday, June 17, 2016

Adding an output logger event adapter to WSO2 DAS event stream

Working in WSO2 Cloud Team was capable of putting me through events which I wondered what should I do now ? Specially while in Cloud Support. Once there was an issue (L1) we got reported that API Statistics are not visible on WSO2 API Manager. Oh great by this time I was not much of an expert in this area and I was like HOW ?

WSO2 API Cloud uses WSO2 APIM 1.10 and DAS 3.0.1 by that time was and I knew that DAS is working in a cluster which has two receivers, analyzers and indexers. It wasn't hard to realize that DAS analyzers aren't having required raw data stored for the time being. HOw to check whether API Gateway is publishing data to das analyzers ? Here is what was suggested to me from a DAS team member to check whether data is getting published to das receiver node. Here what I used was a adding an Output logger event adapter [1] to the Input stream that I wanted to check whether the data is getting published to DAS receiver nodes.

1. Login to DAS management console
2. Go to Main -> Event -> Publishers -> Add event publisher


3. On the Create a New Event Publisher add the Event Publisher Name and select the Event stream which needs to be logged from Event Source
4. Then from Output Event Adapter Type select logger as the value and click Add Event Publisher.



5. You will see a message Event publisher added successfully and the added Event publisher will be visible on Available Event Publishers.



6. Start publishing to the stream and you will see logs getting printed on <DAS-HOME>/repository/logs/wso2carbon.log



[1] https://docs.wso2.com/display/CEP300/Output+logger+Event+Adapter



Saturday, June 11, 2016

Deleting Admin users from your organization in WSO2 Cloud

Currently in WSO2 Cloud the Organization owners can add multiple Admin users to his organization. It is a common scenario that some people leave the organizations and if he is an admin of your organization you should remove the Admin from the organization.

In current implementation of WSO2 Cloud you are not able to delete an Admin through the Members page. As you can notice on the below image the users with Admin Role doesn't have the check box in front of them. Therefore we are not able to edit or delete the specific Admin from the organization directly.


In order to delete them the Organization owner (The creator of the organization on WSO2 Cloud) should revoke the Amin role from the user. This is not provided through WSO2 Cloud UI directly. Here is how you can achieve this.

1. You can log in to WSO2 Cloud management console using the steps described in
https://docs.wso2.com/display/APICloud/FAQ#FAQ-HowcanIlogintotheCloud'sManagementConsole?


2. On the left menu of management console go to Main -> User and Roles -> List -> Users. This will list out the Users in your organization.


3. Select the preferred user with Admin role and select View Roles and remove the admin role from that user privileges from that user and update.


4. Afterwards log out of the management console and re login through cloud ui and go to members page. You will see the check box in front of the particular user will be enabled and you will be able to delete the user (Due to caching on server side it will take some time for the changes to be depicted on UI).



* Note that you must not delete the user through management console since there are records which are not getting deleted for the user which is explicitly used in for WSO2 Cloud data in the front end. Therefore you should delete the user through UI after removing the role.