HTTP

简介

flusher_http flusher插件可以实现将采集到的数据,经过处理后,通过http格式发送到指定的地址。

版本

Alpha

配置参数

样例

采集/home/test-log/路径下的所有文件名匹配*.log规则的文件,并将采集结果以 custom_single 协议、json格式提交到 http://localhost:8086/write。 且提交时,附加 header x-filepath,其值使用log中的 Tag:path 的值

enable: true
inputs:
  - Type: file_log
    LogPath: /home/test-log/
    FilePattern: "*.log"
flushers:
  - Type: flusher_http
    RemoteURL: "http://localhost:8086/write"
    Headers:
      x-filepath: "%{tag.__path__}"
    Convert:
      Protocol: custom_single
      Encoding: json

Last updated