我已经启用了filebeat系统模块:
filebeat modules enable system
filebeat setup --pipelines --modules system
filebeat setup --dashboards
systemctl restart filebeat
这就是logstash所说的pipeline with id [filebeat-7.9.0-system-auth-pipeline] does not exist
这是logstash中负责它的部分:
output {
if [@metadata][pipeline] {
elasticsearch {
hosts => "https://localhost:9200"
manage_template => false
cacert => "/etc/elasticsearch/estackcap12extract.crt"
ssl => true
ssl_certificate_verification => false
index => "%{[@metadata][beat]}-%{[@metadata][version]}-%{+YYYY.MM.dd}"
pipeline => "%{[@metadata][pipeline]}"
user => "elastic"
password => "*secret*"
}
} else {
...
我需要为此手动创建管道吗?我做错什么了吗?我能找到的最好的是这个文档页面,但它似乎是为自定义的东西,这是一个现成的模块,所以我不确定它有多相关。
问题是您的Filebeat不能直接连接到ES,只能通过Logstash连接。这是一个已知的问题,但由于*Beat只能有单个输出,您需要执行以下技巧。
您需要做的是在运行setup命令时取消对elasticsearch
输出的注释,这样Filebeat就可以安装摄取管道。
完成后,您需要再次注释掉该输出,并在真正启动Filebeat之前取消对Logstash的注释。
如果您不想修改配置文件,还有另一种方法可以将配置变量传递给filebeat setup
,如下所示:
filebeat setup --pipelines --modules system
-E output.logstash.enabled=false
-E output.elasticsearch.username="elastic"
-E output.elasticsearch.password="*secret*"
-E 'output.elasticsearch.ssl.certificate_authorities="/etc/elasticsearch/estackcap12extract.crt"'
-E output.elasticsearch.hosts="https://localhost:9200"