我对filebeat和ELK堆栈还很陌生。成功构建Filebeat,Elastic和Kibana堆栈索引的Apache访问日志文件后,我想使用Filebeat将输出发送到文件以进行测试。但是,我一直遇到错误。 Filebeat启动,然后立即退出,因为它正在寻找弹性。
日志文件的相关部分在下面。
2020-02-20T16:19:40.794+0100 WARN beater/filebeat.go:152 Filebeat is unable to load the Ingest Node pipelines for the configured modules because the Elasticsearch output is not configured/enabled. If you have already loaded the Ingest Node pipelines or are using Logstash pipelines, you can ignore this warning.
2020-02-20T16:19:40.794+0100 ERROR instance/beat.go:916 Exiting: Index management requested but the Elasticsearch output is not configured/enabled
下面是使用的filebeat.yml。
#=========================== Filebeat inputs =============================
filebeat.inputs:
- type: log
enabled: true
paths:
- C:\Some\folder\*
#============================= Filebeat modules ===============================
filebeat.config.modules:
path: C:\another\folder\*.yml
reload.enabled: true
#------------------------------- File output -----------------------------------
output.file:
enabled: true
path: 'C:\Yet\another\folder\'
filename: filebeat
我还配置了一个apache.yml
- module: apache
# Access logs
access:
enabled: true
# Set custom paths for the log files. If left empty,
# Filebeat will choose the paths depending on your OS.
var.paths: ['C:\Some\Folder\2\Access*']
Filebeat不断要求配置弹性输出,但是一次只能配置一个输出。我需要设置一些选项吗?我正在使用弹性堆栈7.5
可能是Filebeat试图将load template导入Elasticsearch,但未配置Elasticsearch输出。
通过将以下配置添加到filebeat.yml文件来禁用自动模板加载
setup.template.enabled: false
希望可以解决您的问题。
显然,kibana需要运行才能使output.file选项起作用。在我启动kibana.bat并运行。\ filebeat.exe安装程序--dashboards之后。错误消失了,filebeat可以将其输出设置为file。