monkeyDluffy6017 commented on code in PR #9436:
URL: https://github.com/apache/apisix/pull/9436#discussion_r1198570588


##########
docs/zh/latest/plugins/clickhouse-logger.md:
##########
@@ -74,26 +74,16 @@ curl 
http://127.0.0.1:9180/apisix/admin/plugin_metadata/clickhouse-logger \
 }'
 ```
 
-首先,你需要在 ClickHouse 数据库中创建一个表来存储日志:
-
-```sql
-CREATE TABLE default.test (
-  `host` String,
-  `client_ip` String,
-  `route_id` String,
-  `service_id` String,
-  `@timestamp` String,
-   PRIMARY KEY(`@timestamp`)
-) ENGINE = MergeTree()
+您可以使用 Clickhouse docker 镜像来创建一个容器,如下所示:
+
+```shell
+docker run -d -p 8123:8123 -p 9000:9000 -p 9009:9009 --name 
some-clickhouse-server --ulimit nofile=262144:262144 
clickhouse/clickhouse-server
 ```
 
-在 ClickHouse 中执行`select * from default.test;`,将得到类似下面的数据:
+然后在您的 ClickHouse 数据库中创建一个表来存储日志。
 
-```
-┌─host──────┬─client_ip─┬─route_id─┬─@timestamp────────────────┐
-│ 127.0.0.1 │ 127.0.0.1 │ 1        │ 2022-01-17T10:03:10+08:00 │
-└───────────┴───────────┴──────────┴───────────────────────────┘
-```
+```shell
+echo "CREATE TABLE default.test (\`host\` String, \`client_ip\` String, 
\`route_id\` String, \`service_id\` String, \`@timestamp\` String, PRIMARY 
KEY(\`@timestamp\`)) ENGINE = MergeTree()" | curl 'http://localhost:8123/'
 

Review Comment:
   Need ````` here



##########
docs/zh/latest/plugins/clickhouse-logger.md:
##########
@@ -74,26 +74,16 @@ curl 
http://127.0.0.1:9180/apisix/admin/plugin_metadata/clickhouse-logger \
 }'
 ```
 
-首先,你需要在 ClickHouse 数据库中创建一个表来存储日志:
-
-```sql
-CREATE TABLE default.test (
-  `host` String,
-  `client_ip` String,
-  `route_id` String,
-  `service_id` String,
-  `@timestamp` String,
-   PRIMARY KEY(`@timestamp`)
-) ENGINE = MergeTree()
+您可以使用 Clickhouse docker 镜像来创建一个容器,如下所示:
+
+```shell
+docker run -d -p 8123:8123 -p 9000:9000 -p 9009:9009 --name 
some-clickhouse-server --ulimit nofile=262144:262144 
clickhouse/clickhouse-server
 ```
 
-在 ClickHouse 中执行`select * from default.test;`,将得到类似下面的数据:
+然后在您的 ClickHouse 数据库中创建一个表来存储日志。
 
-```
-┌─host──────┬─client_ip─┬─route_id─┬─@timestamp────────────────┐
-│ 127.0.0.1 │ 127.0.0.1 │ 1        │ 2022-01-17T10:03:10+08:00 │
-└───────────┴───────────┴──────────┴───────────────────────────┘
-```
+```shell
+echo "CREATE TABLE default.test (\`host\` String, \`client_ip\` String, 
\`route_id\` String, \`service_id\` String, \`@timestamp\` String, PRIMARY 
KEY(\`@timestamp\`)) ENGINE = MergeTree()" | curl 'http://localhost:8123/'
 

Review Comment:
   Need ``` here



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to