com.alibaba.dubbo.monitor.dubbo
Class DubboMonitor

java.lang.Object
  extended by com.alibaba.dubbo.monitor.dubbo.DubboMonitor
All Implemented Interfaces:
Node, Monitor, MonitorService

public class DubboMonitor
extends Object
implements Monitor

DubboMonitor

Author:
william.liangf

Field Summary
 
Fields inherited from interface com.alibaba.dubbo.monitor.MonitorService
APPLICATION, CONCURRENT, CONSUMER, ELAPSED, FAILURE, GROUP, INPUT, INTERFACE, MAX_CONCURRENT, MAX_ELAPSED, MAX_INPUT, MAX_OUTPUT, METHOD, OUTPUT, PROVIDER, SUCCESS, TIMESTAMP, VERSION
 
Constructor Summary
DubboMonitor(Invoker<MonitorService> monitorInvoker, MonitorService monitorService)
           
 
Method Summary
 void collect(URL url)
          监控数据采集.
 void destroy()
          destroy.
 URL getUrl()
          get url.
 boolean isAvailable()
          is available.
 List<URL> lookup(URL query)
          监控数据查询.  1.
 void send()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DubboMonitor

public DubboMonitor(Invoker<MonitorService> monitorInvoker,
                    MonitorService monitorService)
Method Detail

send

public void send()

collect

public void collect(URL url)
Description copied from interface: MonitorService
监控数据采集. 1. 支持调用次数统计:count://host/interface?application=foo&method=foo&provider=10.20.153.11:20880&success=12&failure=2&elapsed=135423423 1.1 host,application,interface,group,version,method 记录监控来源主机,应用,接口,方法信息。 1.2 如果是消费者发送的数据,加上provider地址参数,反之,加上来源consumer地址参数。 1.3 success,faulure,elapsed 记录距上次采集,调用的成功次数,失败次数,成功调用总耗时,平均时间将用总耗时除以成功次数。

Specified by:
collect in interface MonitorService

lookup

public List<URL> lookup(URL query)
Description copied from interface: MonitorService
监控数据查询.  1. 支持按天查询:count://host/interface?application=foo&method=foo&side=provider&view=chart&date=2012-07-03 1.1 host,application,interface,group,version,method 查询主机,应用,接口,方法的匹配条件,缺失的条件的表示全部,host用0.0.0.0表示全部。 1.2 side=consumer,provider 查询由调用的哪一端采集的数据,缺省为都查询。 1.3 缺省为view=summary,返回全天汇总信息,支持view=chart表示返回全天趋势图表图片的URL地址,可以进接嵌入其它系统的页面上展示。 1.4 date=2012-07-03 指定查询数据的日期,缺省为当天。

Specified by:
lookup in interface MonitorService
Returns:
statistics

getUrl

public URL getUrl()
Description copied from interface: Node
get url.

Specified by:
getUrl in interface Node
Returns:
url.

isAvailable

public boolean isAvailable()
Description copied from interface: Node
is available.

Specified by:
isAvailable in interface Node
Returns:
available.

destroy

public void destroy()
Description copied from interface: Node
destroy.

Specified by:
destroy in interface Node


Copyright © 2012–2017 Alibaba. All rights reserved.