This is an automated email from the ASF dual-hosted git repository.

ningjiang pushed a commit to branch asf-site
in repository 
https://gitbox.apache.org/repos/asf/incubator-servicecomb-website.git

commit e0d10fb50a30fb0dcf93234e90f07b62744e95e1
Merge: 36d1ab3 da90d48
Author: Willem Jiang <jiangni...@huawei.com>
AuthorDate: Wed Apr 4 15:52:01 2018 +0800

    Merge branch 'master' into asf-site

 _data/navigation.yml                               |   6 +-
 _docs/cn/distributed-tracing.md                    |   4 +-
 _docs/cn/flow-control.md                           |   2 +-
 _docs/cn/quick-start-bmi.md                        |  12 +-
 _docs/cn/quick-start-dataconsistency.md            |   2 +-
 _docs/cn/service-management.md                     |   2 +-
 _docs/distributed-tracing.md                       |   4 +-
 _docs/flow-control.md                              |   2 +-
 _docs/quick-start-bmi.md                           |  12 +-
 _docs/quick-start-dataconsistency.md               |   2 +-
 _docs/service-management.md                        |   2 +-
 _faqs/cn/faq.md                                    |   6 +-
 _faqs/faq.md                                       |   4 +-
 _posts/2017-06-15-linuxcon-workshop-demo.md        |   4 +-
 _posts/2017-07-17-tracing-with-servicecomb.md      |   4 +-
 _posts/2018-01-10-howto-upgrade-to-zipkin-v2.md    |  12 +-
 _posts/cn/2017-06-15-linuxcon-workshop-demo.md     |   4 +-
 _posts/cn/2017-07-17-tracing-with-servicecomb.md   |   4 +-
 .../cn/2017-09-14-maven-dependency-management.md   |   8 +-
 _users/application-boot-process.md                 |   2 +-
 _users/cn/application-boot-process.md              |   2 +-
 _users/cn/communicate-protocol.md                  |  16 +-
 _users/cn/customized-tracing.md                    |   4 +-
 _users/cn/define-service-contract.md               |   2 +-
 _users/cn/deployment.md                            |  10 +-
 _users/cn/develop-with-jax-rs.md                   |   8 +-
 _users/cn/develop-with-rest-template.md            |   8 +-
 _users/cn/develop-with-rpc.md                      |  10 +-
 _users/cn/develop-with-springmvc.md                |   8 +-
 _users/cn/develop-with-transparent-rpc.md          |  10 +-
 _users/cn/distributed-tracing.md                   |   4 +-
 _users/cn/metrics-in-1.0.0-m1.md                   | 259 ++++++++++++++-------
 ...rics-integration-with-prometheus-in-1.0.0-m1.md |  75 +++---
 ...-write-file-extension-and-sample-in-1.0.0-m1.md |   6 +-
 _users/cn/service-configurations.md                |   8 +-
 _users/cn/service-definition.md                    |   4 +-
 _users/cn/service-heartbeat.md                     |   2 +-
 _users/cn/setup-environment.md                     |  10 +-
 _users/cn/use-servicecomb-in-spring-boot.md        |   4 +-
 _users/cn/use-tls.md                               |   4 +-
 _users/cn/zuul.md                                  |   2 +-
 _users/communicate-protocol.md                     |  16 +-
 _users/customized-tracing.md                       |   4 +-
 _users/define-service-contract.md                  |   2 +-
 _users/deployment.md                               |  10 +-
 _users/develop-with-jax-rs.md                      |   8 +-
 _users/develop-with-rest-template.md               |   8 +-
 _users/develop-with-rpc.md                         |  10 +-
 _users/develop-with-springmvc.md                   |   8 +-
 _users/develop-with-transparent-rpc.md             |  10 +-
 _users/distributed-tracing.md                      |   4 +-
 _users/edge-in-1.0.0-m1.md                         |  99 ++++++++
 _users/faq.md                                      |   4 +-
 _users/metrics-in-1.0.0-m1.md                      | 248 +++++++++++++-------
 ...rics-integration-with-prometheus-in-1.0.0-m1.md |  73 +++---
 _users/service-configurations.md                   |   8 +-
 _users/service-definition.md                       |   4 +-
 _users/service-heartbeat.md                        |   2 +-
 _users/setup-environment.md                        |  16 +-
 _users/use-servicecomb-in-spring-boot.md           |   6 +-
 _users/use-tls.md                                  |   4 +-
 _users/zuul.md                                     |   2 +-
 assets/images/MetricsDependency.png                | Bin 10921 -> 10323 bytes
 assets/images/MetricsInGrafana.png                 | Bin 35400 -> 108063 bytes
 assets/images/MetricsInPrometheus.png              | Bin 60061 -> 47642 bytes
 assets/images/MetricsWriteFileResult.png           | Bin 59021 -> 74432 bytes
 66 files changed, 659 insertions(+), 441 deletions(-)

diff --cc _users/cn/metrics-integration-with-prometheus-in-1.0.0-m1.md
index 1781eb2,b5100dc..315ba99
mode 100755,100644..100755
--- a/_users/cn/metrics-integration-with-prometheus-in-1.0.0-m1.md
+++ b/_users/cn/metrics-integration-with-prometheus-in-1.0.0-m1.md
@@@ -35,54 -35,9 +35,9 @@@ Prometheus推荐Pull模式拉取Metrics
    </dependency>
  ```
  因此一旦集成Prometheus引入了metrics-prometheus依赖后,不再需要添加metrics-core的依赖。
- ### 与metrics-core Publish的关系
- 
文档[1.0.0-m1版本中的监控](/cn/users/metrics-in-1.0.0-m1/)中已经提到,metrics-core会伴随微服务启动内置的数据发布,如果你在microservice.yaml中配置了rest
 provider,例如:  
- ```yaml
- cse:
-   service:
-     registry:
-       address: http://127.0.0.1:30100
-   rest:
-     address: 0.0.0.0:8080
- ```
- 你就可以通过http://localhost:8080/metrics 
直接获取到Metrics数据,它返回的是io.servicecomb.metrics.common.RegistryMetric实体对象,输出格式为:
- ```json
- {"instanceMetric":{
- 
"systemMetric":{"cpuLoad":10.0,"cpuRunningThreads":39,"heapInit":266338304,"heapMax":3786407936,"heapCommit":626524160,"heapUsed":338280024,"nonHeapInit":2555904,"nonHeapMax":-1,"nonHeapCommit":60342272,"nonHeapUsed":58673152},
- 
"consumerMetric":{"operationName":"instance","prefix":"servicecomb.instance.consumer","consumerLatency":{"total":0,"count":0,"min":0,"max":0,"average":0.0},"consumerCall":{"total":0,"tps":0.0}},
- 
"producerMetric":{"operationName":"instance","prefix":"servicecomb.instance.producer","waitInQueue":0,"lifeTimeInQueue":{"total":0,"count":0,"min":0,"max":0,"average":0.0},"executionTime":{"total":0,"count":0,"min":0,"max":0,"average":0.0},"producerLatency":{"total":0,"count":0,"min":0,"max":0,"average":0.0},"producerCall":{"total":1,"tps":0.0}}},
- "consumerMetrics":{},
- 
"producerMetrics":{"calculator.metricsEndpoint.metrics":{"operationName":"calculator.metricsEndpoint.metrics","prefix":"servicecomb.calculator.metricsEndpoint.metrics.producer","waitInQueue":0,"lifeTimeInQueue":{"total":0,"count":0,"min":0,"max":0,"average":0.0},"executionTime":{"total":0,"count":0,"min":0,"max":0,"average":0.0},"producerLatency":{"total":0,"count":0,"min":0,"max":0,"average":0.0},"producerCall":{"total":1,"tps":0.0}}
- }}
- ```
- 使用Prometheus Simple HTTP Server接口发布的数据是Prometheus采集的标准格式:
- ```text
- # HELP Instance Level Instance Level Metrics
- # TYPE Instance Level untyped
- servicecomb_instance_producer_producerLatency_average 0.0
- servicecomb_instance_producer_producerLatency_total 0.0
- servicecomb_instance_consumer_producerLatency_count 0.0
- ...
- servicecomb_instance_producer_producerLatency_min 0.0
- servicecomb_instance_producer_lifeTimeInQueue_average 0.0
- servicecomb_instance_producer_lifeTimeInQueue_count 0.0
- servicecomb_instance_system_heap_init 2.66338304E8
- # HELP calculator.metricsEndpoint.metrics Producer Side 
calculator.metricsEndpoint.metrics Producer Side Metrics
- # TYPE calculator.metricsEndpoint.metrics Producer Side untyped
- 
servicecomb_calculator_metricsEndpoint_metrics_producer_lifeTimeInQueue_average 
0.0
- ...
- servicecomb_calculator_metricsEndpoint_metrics_producer_executionTime_total 
0.0
- servicecomb_calculator_metricsEndpoint_metrics_producer_waitInQueue_count 0.0
- servicecomb_calculator_metricsEndpoint_metrics_producer_lifeTimeInQueue_count 
0.0
- ```
- 所以它们两个是完全独立各有用途的。  
- 
- *Prometheus Simple HTTP 
Server同样使用/metrics作为默认URL,metrics-prometheus会使用9696作为默认端口,因此微服务启动后你可以使用http://localhost:9696/metrics
 访问它。*  
- 
- 
我们可以看到在Prometheus的Metric命名统一使用下划线代替了点,因为需要遵守它的[命名规则](https://prometheus.io/docs/practices/naming/)。
  
  ## 如何配置
 -开启对接普罗米修斯非常简单:
 +开启对接prometheus非常简单:
  ### 全局配置
  microservice.yaml中有如下配置项:  
  ```yaml 

-- 
To stop receiving notification emails like this one, please contact
ningji...@apache.org.

Reply via email to