添加設置filebeat.yml
,你可以看到輸出日誌文件爲您的路徑,看看發生了什麼。
output.file:
# Boolean flag to enable or disable the output module.
enabled: true
# Path to the directory where to save the generated files. The option is
# mandatory.
path: "your path"
# Name of the generated files. The default is `filebeat` and it generates
# files: `filebeat`, `filebeat.1`, `filebeat.2`, etc.
filename: filebeat
# Maximum size in kilobytes of each file. When this size is reached, and on
# every filebeat restart, the files are rotated. The default value is 10240
# kB.
#rotate_every_kb: 10000
# Maximum number of files under path. When this number of files is reached,
# the oldest file is deleted and the rest are shifted from last to first. The
# default is 7 files.
number_of_files: 7
,如果你想看到的網絡設置
請添加設置查看日誌。
logging.level: warning
logging.to_files: true
logging.to_syslog: false
logging.files:
path: /var/log/mybeat
name: mybeat.log
keepfiles: 7
這是否回答你的問題https://www.elastic.co/guide/en/beats/filebeat/current/logstash-output.html? – baudsp
@baudsp差不多。它解釋了元數據部分,但不是實際消息(文件內容)的位置。或者,也許我在看這個全錯了:( – kaqqao
不知道這可能是什麼。也許你的輸入上有編解碼器會導致問題 – baudsp