You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by me...@apache.org on 2021/04/01 07:35:54 UTC

[shardingsphere] branch master updated: add agent doc (#9902)

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

menghaoran pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
     new 9158d6d  add agent doc (#9902)
9158d6d is described below

commit 9158d6d499732a919f1cb3aa8dad1e2327a879b3
Author: xiaoyu <54...@qq.com>
AuthorDate: Thu Apr 1 15:35:07 2021 +0800

    add agent doc (#9902)
---
 .../features/governance/observability/agnet.cn.md  | 76 ++++++++++++++++++++++
 .../features/governance/observability/agnet.en.md  | 75 +++++++++++++++++++++
 2 files changed, 151 insertions(+)

diff --git a/docs/document/content/features/governance/observability/agnet.cn.md b/docs/document/content/features/governance/observability/agnet.cn.md
new file mode 100644
index 0000000..9b384d5
--- /dev/null
+++ b/docs/document/content/features/governance/observability/agnet.cn.md
@@ -0,0 +1,76 @@
++++
+title = "Agent集成"
+weight = 2
++++
+
+## 背景
+
+ShardingSphere-Agent 是独立自主设计,基于`Bytebuddy`字节码增加的项目,基于插件化的设计,可以无缝隙的与ShardingSphere集成,
+
+目前有提供 Log, metrics, APM 等可观测性功能。
+
+## 使用方法
+
+### 本地构建
+
+```
+ > cd shardingsphere/shardingsphere-agent
+ > mvn clean install
+
+```
+
+### 远程下载(暂未发布)
+
+```
+ > weget http://xxxxx/shardingsphere-agent.tar.gz
+ > tar -zxvcf shardingsphere-agent.tar.gz
+
+```
+
+启动时添加参数
+
+```
+-javaagent: \absolute path\shardingsphere-agent.jar
+```
+
+## Agent配置
+
+在本地打包目录和解压缩目录下找到: `agent.yaml` 
+
+```yaml
+applicationName: shardingsphere-agent # 应用名称
+ignoredPluginNames: #忽略的插件集合,表示集合里面的插件不生效
+  - Opentracing
+  - Jaeger
+  - Zipkin
+  - Prometheus
+  - Logging
+
+plugins:
+  Prometheus:
+    host:  "localhost" #prometheus暴露的host
+    port: 9090 #prometheus暴露的端口
+    props:
+      JVM_INFORMATION_COLLECTOR_ENABLED : "true"
+  Jaeger:
+    host: "localhost" #jaeger服务的host
+    port: 5775 #jaeger服务的端口
+    props:
+      SERVICE_NAME: "shardingsphere-agent"
+      JAEGER_SAMPLER_TYPE: "const"
+      JAEGER_SAMPLER_PARAM: "1"
+      JAEGER_REPORTER_LOG_SPANS: "true"
+      JAEGER_REPORTER_FLUSH_INTERVAL: "1"
+  Zipkin:
+    host: "localhost" #zipkin服务的host
+    port: 9411 #zipkin服务的prot
+    props:
+      SERVICE_NAME: "shardingsphere-agent"
+      URL_VERSION: "/api/v2/spans" #zipkin服务的抓取span的uri
+  Logging:
+    props:
+      LEVEL: "INFO" #打印的日志级别
+
+``
+
+以上为agent的所有配置,注意:当配置 ignoredPluginNames时候,表示集合里面的插件会被忽略!
\ No newline at end of file
diff --git a/docs/document/content/features/governance/observability/agnet.en.md b/docs/document/content/features/governance/observability/agnet.en.md
new file mode 100644
index 0000000..0307cfe
--- /dev/null
+++ b/docs/document/content/features/governance/observability/agnet.en.md
@@ -0,0 +1,75 @@
++++
+title = "Agent Integration"
+weight = 2
++++
+
+## Background
+
+ShardingSphere-Agent is an independent and independently designed project based on ByteBuddy bytecode increase. Based on plugin design, it can integrate seamlessly with ShardingSphere.
+There are currently Log, metrics, APM and other observability capabilities available.
+
+## Usage
+
+### Local build
+
+```
+ > cd  shardingsphere/shardingsphere-agent
+ > mvn clean install
+
+```
+
+### Remote download(No release)
+
+```
+ > weget http://xxxxx/shardingsphere-agent.tar.gz
+ > tar -zxvcf shardingsphere-agent.tar.gz
+
+```
+
+Add startup arguments
+
+```
+-javaagent:\absolute path\shardingsphere-agent.jar
+```
+
+## Agent Configuration
+
+It is found under the local package directory and unzip directory : `agent.yaml` 
+
+```yaml
+applicationName: shardingsphere-agent # application name 
+ignoredPluginNames: # A collection of ignored plugins, indicating that the plugins in the collection are not active
+  - Opentracing
+  - Jaeger
+  - Zipkin
+  - Prometheus
+  - Logging
+
+plugins:
+  Prometheus:
+    host:  "localhost" #prometheus host
+    port: 9090 #prometheus port 
+    props:
+      JVM_INFORMATION_COLLECTOR_ENABLED : "true"
+  Jaeger:
+    host: "localhost" #jaeger host
+    port: 5775 #jaeger prot
+    props:
+      SERVICE_NAME: "shardingsphere-agent"
+      JAEGER_SAMPLER_TYPE: "const"
+      JAEGER_SAMPLER_PARAM: "1"
+      JAEGER_REPORTER_LOG_SPANS: "true"
+      JAEGER_REPORTER_FLUSH_INTERVAL: "1"
+  Zipkin:
+    host: "localhost" #zipkin host
+    port: 9411 #zipkin prot
+    props:
+      SERVICE_NAME: "shardingsphere-agent"
+      URL_VERSION: "/api/v2/spans" #zipkin uri
+  Logging:
+    props:
+      LEVEL: "INFO" #log level
+
+``
+
+ When ignoredPluginNames is configured, plugins in the collection are ignored!
\ No newline at end of file