Skip to content

Http Reader

Andrewei edited this page Dec 29, 2017 · 4 revisions

Http Reader 是 logkit 提供的以 http post 请求的方式接受并读取日志的形式

典型配置如下

"reader":{
    "mode": "http",
    "http_service_address": "127.0.0.1:4001",
    "http_service_path": "/logkit/data"
},

配置参数说明

  1. http_service_address: 必填, 监听的地址和端口(地址可以留空, 即上述示例可以只填写 :4001)
  2. http_service_path: 选填, 请求发送的路径(上述示例中, post 请求应该发往 http://127.0.0.1:4001/logkit/data)

注意事项

  1. 该 reader 支持 gzip, 但请在请求头中添加Content-Encoding=gzip 或者 Content-Type=application/gzip
  2. 默认接收 request body 中所有的数据作为要读取的日志, 限制 request body 小于 100MB
  3. 默认将 request body 中的数据使用 \n 分割, 每行作为一条数据
Clone this wiki locally