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格式數(shù)據(jù)
代替logstash,減少系統(tǒng)負(fù)擔(dān)
自定義輸出到elasticsearch index
手動發(fā)送數(shù)據(jù)測試
echo -e '{"method":"HelloService.Hello","params":["hello"],"id":1}'| nc -v 192.168.10.10 9400