Open dmtd78 opened 5 years ago
provider配置
<dubbo:application name="provider" />
<!-- zookeeper作为注册中心 -->
<dubbo:registry protocol="zookeeper"
address="zookeeper://192.168.192.137:2181?backup=192.168.192.136:2181,192.168.192.135:2181"/>
<!-- 用dubbo协议在20880端口暴露服务 -->
<dubbo:protocol name="dubbo" port="20880" />
<dubbo:config-center address="zookeeper://192.168.192.137:2181?backup=192.168.192.136:2181,192.168.192.135:2181" />
<dubbo:monitor protocol="registry" />
<dubbo:provider filter="metrics" group="dubbo"/>
<!-- 生成远程服务代理,可以和本地bean一样使用demoService -->
<dubbo:service interface="com.sunwin.dubbozkpdemo.service.DemoService" ref="demoService"/>
<dubbo:metrics port="20880" protocol="dubbo" />
<bean id="demoService" class="com.sunwin.dubbozkpdemo.service.impl.DemoServiceImpl" />
consumer配置
<dubbo:application name="consumer" />
<dubbo:monitor protocol="registry"/>
<!-- zookeeper作为注册中心 -->
<dubbo:registry protocol="zookeeper"
address="zookeeper://192.168.192.137:2181?backup=192.168.192.136:2181,192.168.192.135:2181" />
<!-- 生成远程服务代理,可以和本地bean一样使用demoService -->
<dubbo:metrics port="20880" protocol="dubbo"/>
<dubbo:consumer filter="metrics" group="dubbo"/>
<dubbo:reference
interface="com.sunwin.dubbozkpdemo.service.DemoService" id="demoService" group="dubbo"/>
麻烦知道什么原因的给与答复,谢谢!
如图所示
我也碰到相同的问题,使用的是dubbo-sample-metrics中的例子。 debug的时候发现后端正常返回了数据,但是前段无法显示,页面是白屏。
我也碰到相同的问题,使用的是dubbo-sample-metrics中的例子。 debug的时候发现后端正常返回了数据,但是前段无法显示,页面是白屏。
最终选择用阿里的dubbo,不用Apache的了,然后问题就解决了。
我也碰到相同的问题,使用的是dubbo-sample-metrics中的例子。 debug的时候发现后端正常返回了数据,但是前段无法显示,页面是白屏。
之前没有服务关系这个特性的时候,服务统计是可以在页面显示的,最近的一次更新增加了服务关系这个特性,我也不能显示了
我这也是得,空白,有数据返回,不知道什么原因啊
同问
将 ServiceMetrics.vue 中的 338行 的 submit: function () { this.searchByIp(this.filter, true) } 中的 this.searchByIp(this.filter, true) 改为 this.searchByIp(this.filter, false) 然后重新生成js文件就好了
this.$router.push({path: '/metrics', query: {ip: this.filter}}) 应该是这个路由跳转有问题,正确的路由应该是/metrics/index
[{"metric":"dubbo.provider.success_bucket_count","timestamp":1569359160000,"value":0.0,"metricType":"DELTA","tags":{},"metricLevel":"MAJOR","meterName":null,"interval":5,"service":null},{"metric":"dubbo.provider.bucket_count","timestamp":1569359160000,"value":0.0,"metricType":"DELTA","tags":{},"metricLevel":"MAJOR","meterName":null,"interval":5,"service":null},{"metric":"dubbo.provider.bucket_sum","timestamp":1569359160000,"value":0.0,"metricType":"DELTA","tags":{},"metricLevel":"MAJOR","meterName":null,"interval":5,"service":null},{"metric":"dubbo.provider.qps","timestamp":1569359160000,"value":0.0,"metricType":"GAUGE","tags":{},"metricLevel":"MAJOR","meterName":null,"interval":5,"service":null},{"metric":"dubbo.provider.rt","timestamp":1569359160000,"value":0.0,"metricType":"GAUGE","tags":{},"metricLevel":"MAJOR","meterName":null,"interval":5,"service":null},{"metric":"dubbo.provider.success_rate","timestamp":1569359160000,"value":0.0,"metricType":"GAUGE","tags":{},"metricLevel":"MAJOR","meterName":null,"interval":5,"service":null},{"metric":"dubbo.provider.method.success_bucket_count","timestamp":1569359145000,"value":0.0,"metricType":"DELTA","tags":{"method":"DemoDTO test(String)","service":"com.sunwin.dubbozkpdemo.service.DemoService"},"metricLevel":"NORMAL","meterName":null,"interval":15,"service":"com.sunwin.dubbozkpdemo.service.DemoService"},{"metric":"dubbo.provider.method.bucket_count","timestamp":1569359145000,"value":0.0,"metricType":"DELTA","tags":{"method":"DemoDTO test(String)","service":"com.sunwin.dubbozkpdemo.service.DemoService"},"metricLevel":"NORMAL","meterName":null,"interval":15,"service":"com.sunwin.dubbozkpdemo.service.DemoService"},{"metric":"dubbo.provider.method.bucket_sum","timestamp":1569359145000,"value":0.0,"metricType":"DELTA","tags":{"method":"DemoDTO test(String)","service":"com.sunwin.dubbozkpdemo.service.DemoService"},"metricLevel":"NORMAL","meterName":null,"interval":15,"service":"com.sunwin.dubbozkpdemo.service.DemoService"},{"metric":"dubbo.provider.method.qps","timestamp":1569359145000,"value":0.0,"metricType":"GAUGE","tags":{"method":"DemoDTO test(String)","service":"com.sunwin.dubbozkpdemo.service.DemoService"},"metricLevel":"NORMAL","meterName":null,"interval":15,"service":"com.sunwin.dubbozkpdemo.service.DemoService"},{"metric":"dubbo.provider.method.rt","timestamp":1569359145000,"value":0.0,"metricType":"GAUGE","tags":{"method":"DemoDTO test(String)","service":"com.sunwin.dubbozkpdemo.service.DemoService"},"metricLevel":"NORMAL","meterName":null,"interval":15,"service":"com.sunwin.dubbozkpdemo.service.DemoService"},{"metric":"dubbo.provider.method.success_rate","timestamp":1569359145000,"value":0.0,"metricType":"GAUGE","tags":{"method":"DemoDTO test(String)","service":"com.sunwin.dubbozkpdemo.service.DemoService"},"metricLevel":"NORMAL","meterName":null,"interval":15,"service":"com.sunwin.dubbozkpdemo.service.DemoService"},{"metric":"threadPool.active","timestamp":null,"value":1.0,"metricType":null,"tags":{},"metricLevel":"MAJOR","meterName":null,"interval":-1,"service":null},{"metric":"threadPool.core","timestamp":null,"value":200.0,"metricType":null,"tags":{},"metricLevel":"MAJOR","meterName":null,"interval":-1,"service":null},{"metric":"threadPool.max","timestamp":null,"value":200.0,"metricType":null,"tags":{},"metricLevel":"MAJOR","meterName":null,"interval":-1,"service":null},{"metric":"threadPool.current","timestamp":null,"value":9.0,"metricType":null,"tags":{},"metricLevel":"MAJOR","meterName":null,"interval":-1,"service":null}]
json数据结果返回如上截图,但是页面什么都没有。