dubbo-admin icon indicating copy to clipboard operation
dubbo-admin copied to clipboard

服务统计有json数据返回,但是页面不显示,dubbo版本2.7.0以上,dubbo-admin为最新的develop

Open dmtd78 opened this issue 7 years ago • 9 comments

[{"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数据结果返回如上截图,但是页面什么都没有。

dmtd78 avatar Sep 29 '19 08:09 dmtd78

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"/>

麻烦知道什么原因的给与答复,谢谢!

dmtd78 avatar Sep 29 '19 08:09 dmtd78

如图所示 TIM图片20190929171318

dmtd78 avatar Sep 29 '19 09:09 dmtd78

我也碰到相同的问题,使用的是dubbo-sample-metrics中的例子。 debug的时候发现后端正常返回了数据,但是前段无法显示,页面是白屏。

lisan04 avatar Sep 30 '19 01:09 lisan04

我也碰到相同的问题,使用的是dubbo-sample-metrics中的例子。 debug的时候发现后端正常返回了数据,但是前段无法显示,页面是白屏。

最终选择用阿里的dubbo,不用Apache的了,然后问题就解决了。

dmtd78 avatar Sep 30 '19 04:09 dmtd78

我也碰到相同的问题,使用的是dubbo-sample-metrics中的例子。 debug的时候发现后端正常返回了数据,但是前段无法显示,页面是白屏。

之前没有服务关系这个特性的时候,服务统计是可以在页面显示的,最近的一次更新增加了服务关系这个特性,我也不能显示了

zxh19920616 avatar Oct 16 '19 07:10 zxh19920616

我这也是得,空白,有数据返回,不知道什么原因啊

zhang259 avatar Nov 06 '19 08:11 zhang259

同问

qiu122 avatar Nov 14 '19 00:11 qiu122

将 ServiceMetrics.vue 中的 338行 的 submit: function () { this.searchByIp(this.filter, true) } 中的 this.searchByIp(this.filter, true) 改为 this.searchByIp(this.filter, false) 然后重新生成js文件就好了

luoqidunwu avatar Jan 17 '20 08:01 luoqidunwu

this.$router.push({path: '/metrics', query: {ip: this.filter}}) 应该是这个路由跳转有问题,正确的路由应该是/metrics/index

liunancun avatar Jun 10 '20 00:06 liunancun