Skip to content

Commit

Permalink
update blog
Browse files Browse the repository at this point in the history
  • Loading branch information
ginuerzh committed Sep 19, 2024
1 parent 8419769 commit b239142
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 4 deletions.
11 changes: 10 additions & 1 deletion docs/blog/posts/log.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,13 @@ recorders:
"sid":"crk3evaohhhk8lipb8qg"}
```

通过这些数据可以更加方便的统计和分析请求的状态。更进一步,可以在记录器服务中基于实时的状态数据进行业务扩展,例如之前提到的[动态分流功能](https://gost.run/blog/2022/dynamic-bypass/)等。
通过这些数据可以更加方便的统计和分析请求的状态。更进一步,可以在记录器服务中基于实时的状态数据进行业务扩展,例如之前提到的[动态分流功能](https://gost.run/blog/2022/dynamic-bypass/)等。

你也可以选择直接使用[gost-plugins](https://github.com/ginuerzh/gost-plugins)中的记录器插件服务,其会将接收到的记录数据保存在MongoDB数据库中或推送给Loki服务。


![Loki - HTTP](../../images/loki01.png)

![Loki - DNS](../../images/loki02.png)


11 changes: 8 additions & 3 deletions docs/concepts/recorder.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,18 @@ recorders:
http:
url: http://192.168.1.1:80
timeout: 10s
header:
foo: bar
```

`http.url` (string)
: HTTP URL地址
: HTTP URL地址

`http.timeout` (duration)
: 请求超时时长
: 请求超时时长。

`http.header` (object)
: 自定义HTTP请求头。

### Redis

Expand Down Expand Up @@ -192,7 +197,7 @@ services:
```json
{"service":"service-0","network":"tcp",
"remote":"[::1]:59234","local":"[::1]:8080",
"host":"www.example.com","client":"user1",
"host":"www.example.com","client":"user1","clientIP":"192.168.1.2",
"http":{"host":"www.example.com","method":"GET","proto":"HTTP/1.1","scheme":"http","uri":"http://www.example.com/","statusCode":200,
"request":{"contentLength":0,"header":{"Accept":["*/*"],"Proxy-Authorization":["Basic dXNlcjE6cGFzczE="],"Proxy-Connection":["Keep-Alive"],"User-Agent":["curl/8.5.0"]}},
"response":{"contentLength":1256,"header":{"Age":["525134"],"Cache-Control":["max-age=604800"],"Content-Length":["1256"],"Content-Type":["text/html; charset=UTF-8"],"Date":["Sat, 14 Sep 2024 01:56:59 GMT"],"Etag":["\"3147526947+ident\""],"Expires":["Sat, 21 Sep 2024 01:56:59 GMT"],"Last-Modified":["Thu, 17 Oct 2019 07:18:26 GMT"],"Server":["ECAcc (sac/2538)"],"Vary":["Accept-Encoding"],"X-Cache":["HIT"]}}},
Expand Down
Binary file added docs/images/loki01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/loki02.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions en/docs/concepts/recorder.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ recorders:
http:
url: http://192.168.1.1:80
timeout: 10s
header:
foo: bar
```

`http.url` (string)
Expand All @@ -88,6 +90,9 @@ recorders:
`timeout` (duration)
: Timeout for establishing a connection

`http.header` (object)
: HTTP request header.

### Redis

Redis recorder records data to the redis server.
Expand Down

0 comments on commit b239142

Please sign in to comment.