添加设置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