sniffer-agent/docs/output.md

7 lines
573 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

目前输出内容使用json格式。
#### MySQL协议的解析结果示例如下
```
{"cip":"192.XX.XX.1","cport":63888,"sip":"192.XX.XX.2","sport":3306,"user":"root","db":"sniffer","sql":"show tables","cpr":1.0,"bt":1566545734147,"cms":15}
```
其中cip代表客户端ipcport代表客户端port(客户端ipport组成session标识)sip代表server ipsport代表server portuser代表查询用户db代表当前连接的库名sql代表查询语句cpr代表抓包率bt代表查询开始时间戳cms代表查询消耗的时间单位是毫秒