You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by jb...@apache.org on 2017/12/12 07:05:55 UTC
[37/51] incubator-servicecomb-website git commit: added metrics
documentation
added metrics documentation
Signed-off-by: zhengyangyong <ya...@huawei.com>
Project: http://git-wip-us.apache.org/repos/asf/incubator-servicecomb-website/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-servicecomb-website/commit/8855a853
Tree: http://git-wip-us.apache.org/repos/asf/incubator-servicecomb-website/tree/8855a853
Diff: http://git-wip-us.apache.org/repos/asf/incubator-servicecomb-website/diff/8855a853
Branch: refs/heads/asf-site
Commit: 8855a85358bf53c22bbf82f5fbd3db1db949bcf9
Parents: 62ec59c
Author: zhengyangyong <ya...@huawei.com>
Authored: Wed Nov 29 12:05:26 2017 +0800
Committer: Willem Jiang <ji...@huawei.com>
Committed: Wed Nov 29 12:46:33 2017 +0800
----------------------------------------------------------------------
_data/navigation.yml | 6 +++
_users/Metrics.md | 73 ++++++++++++++++++++++++++++++++++
_users/cn/Metrics.md | 73 ++++++++++++++++++++++++++++++++++
assets/images/metrics-output.png | Bin 0 -> 69354 bytes
4 files changed, 152 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-servicecomb-website/blob/8855a853/_data/navigation.yml
----------------------------------------------------------------------
diff --git a/_data/navigation.yml b/_data/navigation.yml
index 97fce9f..67fc741 100755
--- a/_data/navigation.yml
+++ b/_data/navigation.yml
@@ -92,6 +92,9 @@ t:
- title: Zuul
url: /users/edging-service/zuul/
+ - title: Metrics
+ url: /users/metrics/
+
- title: Deployment
children:
- title: Run Mode
@@ -208,6 +211,9 @@ t:
- title: 使用Zuul做边缘服务
url: /cn/users/edging-service/zuul/
+ - title: 监控
+ url: /cn/users/metrics/
+
- title: 部署
children:
- title: 运行模式
http://git-wip-us.apache.org/repos/asf/incubator-servicecomb-website/blob/8855a853/_users/Metrics.md
----------------------------------------------------------------------
diff --git a/_users/Metrics.md b/_users/Metrics.md
new file mode 100644
index 0000000..bd96e71
--- /dev/null
+++ b/_users/Metrics.md
@@ -0,0 +1,73 @@
+---
+title: "Metrics Monitor"
+lang: en
+ref: metrics
+permalink: /users/metrics/
+excerpt: "Metrics Monitor"
+last_modified_at: 2017-11-29T10:01:43-04:00
+redirect_from:
+ - /theme-setup/
+---
+
+{% include toc %}
+微服务框架从0.4.1版本开始支持监控功能Metrics,请注意这个功能还处于开发(Preview)阶段,请不要部署到生产环境,并且我们未来会做较大的调整,更多讨论会持续发布在[Google Group](https://groups.google.com/forum/#!forum/servicecomb-developers)中。
+## 如何配置
+请在microservice.yaml中添加如下配置项:
+```yaml
+APPLICATION_ID: demo
+service_description:
+ name: demoService
+ version: 0.0.1
+
+servicecomb:
+ metrics:
+ #metrics数据采集时间(同样是写文件间隔),单位秒
+ polltime: 5
+ #如果metric是浮点数,输出结果保留几位小数,默认为1
+ round_places: 1
+ file:
+ #是否启用文件输出
+ enabled: true
+ #输出文件的根目录
+ root_path: D:/Temp
+ #metrics文件的前缀
+ name_prefix: demo.demoService
+ #metrics文件Rolling最大大小,默认10MB,例如10KB,10MB,10GB
+ max_rolling_size: 10MB
+ #metrics文件Rolling文件保存数量,默认10个
+ max_rolling_count: 10
+```
+
+## 注意事项
+* 如果使用ServiceComb Spring Boot Start快速构建项目,需要排除log4j-over-slf4j依赖
+ ```xml
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter</artifactId>
+ <!--Metric使用log4j输出,屏蔽掉spring-boot-starter中的log4j-over-slf4j-->
+ <exclusions>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>log4j-over-slf4j</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ ```
+
+* 需要在provider治理链中添加bizkeeper-provider,否则TPS和Latency无数据
+ ```yaml
+ APPLICATION_ID: demo
+ service_description:
+ name: demoService
+ version: 0.0.1
+ cse:
+ handler:
+ chain:
+ Provider:
+ default: bizkeeper-provider
+ ```
+
+## 文件输出
+每一个文件就是一个微服务示例级别的metrics数据输出:
+
+![Metrics图片](/assets/images/metrics-output.png)
http://git-wip-us.apache.org/repos/asf/incubator-servicecomb-website/blob/8855a853/_users/cn/Metrics.md
----------------------------------------------------------------------
diff --git a/_users/cn/Metrics.md b/_users/cn/Metrics.md
new file mode 100644
index 0000000..d3436e6
--- /dev/null
+++ b/_users/cn/Metrics.md
@@ -0,0 +1,73 @@
+---
+title: "Metrics监控"
+lang: cn
+ref: metrics
+permalink: /cn/users/metrics/
+excerpt: "Metrics监控"
+last_modified_at: 2017-11-29T10:01:43-04:00
+redirect_from:
+ - /theme-setup/
+---
+
+{% include toc %}
+微服务框架从0.4.1版本开始支持监控功能Metrics,请注意这个功能还处于开发(Preview)阶段,请不要部署到生产环境,并且我们未来会做较大的调整,更多讨论会持续发布在[Google Group](https://groups.google.com/forum/#!forum/servicecomb-developers)中。
+## 如何配置
+请在microservice.yaml中添加如下配置项:
+```yaml
+APPLICATION_ID: demo
+service_description:
+ name: demoService
+ version: 0.0.1
+
+servicecomb:
+ metrics:
+ #metrics数据采集时间(同样是写文件间隔),单位秒
+ polltime: 5
+ #如果metric是浮点数,输出结果保留几位小数,默认为1
+ round_places: 1
+ file:
+ #是否启用文件输出
+ enabled: true
+ #输出文件的根目录
+ root_path: D:/Temp
+ #metrics文件的前缀
+ name_prefix: demo.demoService
+ #metrics文件Rolling最大大小,默认10MB,例如10KB,10MB,10GB
+ max_rolling_size: 10MB
+ #metrics文件Rolling文件保存数量,默认10个
+ max_rolling_count: 10
+```
+
+## 注意事项
+* 如果使用ServiceComb Spring Boot Start快速构建项目,需要排除log4j-over-slf4j依赖
+ ```xml
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter</artifactId>
+ <!--Metric使用log4j输出,屏蔽掉spring-boot-starter中的log4j-over-slf4j-->
+ <exclusions>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>log4j-over-slf4j</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ ```
+
+* 需要在provider治理链中添加bizkeeper-provider,否则TPS和Latency无数据
+ ```yaml
+ APPLICATION_ID: demo
+ service_description:
+ name: demoService
+ version: 0.0.1
+ cse:
+ handler:
+ chain:
+ Provider:
+ default: bizkeeper-provider
+ ```
+
+## 文件输出
+每一个文件就是一个微服务示例级别的metrics数据输出:
+
+![Metrics图片](/assets/images/metrics-output.png)
http://git-wip-us.apache.org/repos/asf/incubator-servicecomb-website/blob/8855a853/assets/images/metrics-output.png
----------------------------------------------------------------------
diff --git a/assets/images/metrics-output.png b/assets/images/metrics-output.png
new file mode 100644
index 0000000..0f629b2
Binary files /dev/null and b/assets/images/metrics-output.png differ