WSO2: StatisticsClient

2019-09-08 15:35发布

How can i use StatisticsAdmin of Application Server

My scenario is : i want to get responsetime of a service that deploy on a server(AppServer/DataServer..) and probed by ESB using discoveryproxy of governance regidtry. if is it possible how can i implement it? otherwise i should be get service response time from AppServer in direct using service name. i can create a proxy of ServerAdminMBean using this package and interface

import org.wso2.carbon.server.admin.service.ServerAdminMBean

but i need to use attributes and method of StatisticsAdmin type. how can i implement it?

3条回答
闹够了就滚
2楼-- · 2019-09-08 16:19

you dont need to do your own implementation. it is already in the service statistics page. You can find the service stat details in the monitor-->System Statistics page. If you need more fine grained details about your service,you might need to integrate BAM with AS.

查看更多
Bombasti
3楼-- · 2019-09-08 16:24

Once you deploy any service, there's a log message prints in server back end console.(you may noticed that before). That message handled by the "LoggingAdmin" admin service. In that admin service there's a operation called "getSystemLog" and this operation sends all log messages one by one. you can create simple java class to call that admin service and get the deployed time stamp of each of the service you are deployed. if you know the service deployment start time, with above admin service you can get time taken to each of the service deployment.

查看更多
手持菜刀,她持情操
4楼-- · 2019-09-08 16:26

You can use JMX to access those information. There is StatisticAdmin MBena available for monitoring in . You can refer this to get an idea how to invoke them using Java.

enter image description here

查看更多
登录 后发表回答