我已经按照elastic.co中的描述配置了文件节拍
问题是,当我添加一个新的日志文件时,数据没有上传到logstash。会有什么问题呢?我已经尝试了不同的配置方式,但根本不起作用。
################### Filebeat Configuration Example #########################
############################# Filebeat ######################################
filebeat:
# List of prospectors to fetch data.
prospectors:
-
paths:
- /Users/apps/*.log
input_type: log
###############################################################################
############################# Libbeat Config ##################################
# Base config file used by all other beats for using libbeat features
############################# Output ##########################################
output:
elasticsearch:
hosts: ["localhost:9200"]
worker: 1
index: "filebeat"
template:
path: "filebeat.template.json"
### Logstash as output
logstash:
# The Logstash hosts
hosts: ["localhost:5044"]
index: filebeat
############################# Shipper #########################################
############################# Logging #########################################
# There are three options for the log ouput: syslog, file, stderr.
# Under Windos systems, the log files are per default sent to the file output,
# under all other system per default to syslog.
logging:
files:
rotateeverybytes: 10485760 # = 10MBLogstash.conf中的配置:
input {
beats {
port => 5044
}
}
output {
elasticsearch {
hosts => ["localhost:9200"]
manage_template => true
index => "%{[@metadata][beat]}-%{+YYYY.MM.dd}"
document_type => "%{[@metadata][type]}"
document_id => "%{fingerprint}"
}
}发布于 2016-05-13 13:05:08
你们都在发送Elasticsearch和logstash。如果您想将elasticsearch部分发送到logstash,则需要将其移除。摘自https://www.elastic.co/guide/en/beats/filebeat/current/config-filebeat-logstash.html
如果要使用Logstash对Filebeat收集的数据执行其他处理,则需要将Filebeat配置为使用Logstash。
为此,您可以编辑Filebeat配置文件,通过注释掉它来禁用Elasticsearch输出,并通过取消注释Logstash部分来启用logstash输出
发布于 2016-07-01 12:14:17
你能检查一下filebeat.yml中的工人数量吗?
### Logstash as output
logstash:
# The Logstash hosts
hosts: ["localhost:5044"]
# Number of workers per Logstash host.
worker: 1您应该在logstash部分中添加worker count
https://stackoverflow.com/questions/37189008
复制相似问题