summaryrefslogtreecommitdiff
path: root/docs/connector
diff options
context:
space:
mode:
authorlifengchao <[email protected]>2024-04-11 17:39:31 +0800
committerlifengchao <[email protected]>2024-04-11 17:39:31 +0800
commitdd23817b3fd2fc84bc3fbb29aa6ba7f9e2725aa1 (patch)
tree7296fd890144da3c4e1327e4a7ffa8b2e7a7f562 /docs/connector
parent0e16b559798033f291b714a6bbdc8a3792fb0791 (diff)
[improve][format-msgpack] GAL-536 Groot Stream Data Format支持MessagePack
Diffstat (limited to 'docs/connector')
-rw-r--r--docs/connector/formats/json.md43
-rw-r--r--docs/connector/formats/msgpack.md62
2 files changed, 84 insertions, 21 deletions
diff --git a/docs/connector/formats/json.md b/docs/connector/formats/json.md
index a87afd0..8756e89 100644
--- a/docs/connector/formats/json.md
+++ b/docs/connector/formats/json.md
@@ -88,27 +88,28 @@ Event serialization and deserialization format.
sources:
inline_source:
type: inline
- fields:
- - name: log_id
- type: bigint
- - name: recv_time
- type: bigint
- - name: server_fqdn
- type: string
- - name: server_domain
- type: string
- - name: client_ip
- type: string
- - name: server_ip
- type: string
- - name: server_asn
- type: string
- - name: decoded_as
- type: string
- - name: device_group
- type: string
- - name: device_tag
- type: string
+ schema:
+ fields:
+ - name: log_id
+ type: bigint
+ - name: recv_time
+ type: bigint
+ - name: server_fqdn
+ type: string
+ - name: server_domain
+ type: string
+ - name: client_ip
+ type: string
+ - name: server_ip
+ type: string
+ - name: server_asn
+ type: string
+ - name: decoded_as
+ type: string
+ - name: device_group
+ type: string
+ - name: device_tag
+ type: string
properties:
data: '{"tcp_rtt_ms":128,"decoded_as":"HTTP", "http_version":"http1","http_request_line":"GET / HTTP/1.1","http_host":"www.ct.cn","http_url":"www.ct.cn/","http_user_agent":"curl/8.0.1","http_status_code":200,"http_response_line":"HTTP/1.1 200 OK","http_response_content_type":"text/html; charset=UTF-8","http_response_latency_ms":31,"http_session_duration_ms":5451,"in_src_mac":"ba:bb:a7:3c:67:1c","in_dest_mac":"86:dd:7a:8f:ae:e2","out_src_mac":"86:dd:7a:8f:ae:e2","out_dest_mac":"ba:bb:a7:3c:67:1c","tcp_client_isn":678677906,"tcp_server_isn":1006700307,"address_type":4,"client_ip":"192.11.22.22","server_ip":"8.8.8.8","client_port":42751,"server_port":80,"in_link_id":65535,"out_link_id":65535,"start_timestamp_ms":1703646546127,"end_timestamp_ms":1703646551702,"duration_ms":5575,"sent_pkts":97,"sent_bytes":5892,"received_pkts":250,"received_bytes":333931,"tcp_c2s_ip_fragments":0,"tcp_s2c_ip_fragments":0,"tcp_c2s_rtx_pkts":0,"tcp_c2s_rtx_bytes":0,"tcp_s2c_rtx_pkts":0,"tcp_s2c_rtx_bytes":0,"tcp_c2s_o3_pkts":0,"tcp_s2c_o3_pkts":0,"tcp_c2s_lost_bytes":0,"tcp_s2c_lost_bytes":0,"flags":26418,"flags_identify_info":[100,1,100,60,150,100,1,2],"app_transition":"http.1111.test_1_1","decoded_as":"HTTP","server_fqdn":"www.ct.cn","app":"test_1_1","decoded_path":"ETHERNET.IPv4.TCP.http","fqdn_category_list":[1767],"t_vsys_id":1,"vsys_id":1,"session_id":290538039798223400,"tcp_handshake_latency_ms":41,"client_os_desc":"Windows","server_os_desc":"Linux","data_center":"center-xxg-tsgx","device_group":"group-xxg-tsgx","device_tag":"{\"tags\":[{\"tag\":\"data_center\",\"value\":\"center-xxg-tsgx\"},{\"tag\":\"device_group\",\"value\":\"group-xxg-tsgx\"}]}","device_id":"9800165603247024","sled_ip":"192.168.40.39","dup_traffic_flag":0}'
format: json
diff --git a/docs/connector/formats/msgpack.md b/docs/connector/formats/msgpack.md
new file mode 100644
index 0000000..2184206
--- /dev/null
+++ b/docs/connector/formats/msgpack.md
@@ -0,0 +1,62 @@
+# MessagePack
+> Format MessagePack
+## Description
+MessagePack is a binary serialization format. If you need a fast and compact alternative of JSON, MessagePack is your friend. For example, a small integer can be encoded in a single byte, and short strings only need a single byte prefix + the original byte array. MessagePack implementation is already available in various languages (See also the list in http://msgpack.org) and works as a universal data format.
+
+| Name | Supported Versions | Maven |
+|-------------|--------------------|----------------------------------------------------------------------------------------------------------------------------|
+| Format MessagePack | Universal | [Download](http://192.168.40.153:8099/service/local/repositories/platform-release/content/com/geedgenetworks/format-msgpack/) |
+
+## Format Options
+
+| Name | Type | Required | Default | Description |
+|---------------------------|----------|----------|---------|-----------------------------------------------------------------------------------------------------------------------------------------------------|
+| format | String | Yes | - | Specify what format to use, here should be 'msgpack'. |
+
+# How to use
+## Inline uses example
+data:
+```json
+{
+ "log_id": 1,
+ "recv_time": 1712827485,
+ "client_ip": "192.168.0.1"
+}
+```
+
+```yaml
+sources:
+ inline_source:
+ type: inline
+ schema:
+ fields: "struct<log_id:int, recv_time:bigint, client_ip:string>"
+ properties:
+ data: g6Zsb2dfaWQBqXJlY3ZfdGltZc5mF6xdqWNsaWVudF9pcKsxOTIuMTY4LjAuMQ==
+ type: base64
+ format: msgpack
+
+sinks:
+ print_sink:
+ type: print
+ properties:
+ format: json
+
+application:
+ env:
+ name: example-inline-to-print
+ parallelism: 3
+ pipeline:
+ object-reuse: true
+ topology:
+ - name: inline_source
+ downstream: [print_sink]
+ - name: print_sink
+ downstream: []
+
+```
+
+
+
+
+
+