美文网首页
filebeat tcp input to elasticsea

filebeat tcp input to elasticsea

作者: 冥王星的卧底 | 来源:发表于2022-06-23 15:10 被阅读0次

filebeat.yaml:

filebeat.inputs:
- type: tcp
  enable: true
  host: "0.0.0.0:9400"

processors:
  - decode_json_fields:
      fields: ['message']
      target: ""
      overwrite_keys: true
  - drop_fields:
     fields: ['message', 'ecs', 'agent', log]

output.elasticsearch:
  hosts: ["192.168.10.10:59200"]
  index: "test"

setup.template.enabled: false
setup.ilm.enabled: auto

接收tcp输入json格式数据
代替logstash,减少系统负担
自定义输出到elasticsearch index

手动发送数据测试
echo -e '{"method":"HelloService.Hello","params":["hello"],"id":1}'| nc -v 192.168.10.10 9400

相关文章

网友评论

      本文标题:filebeat tcp input to elasticsea

      本文链接:https://www.haomeiwen.com/subject/ryfmvrtx.html