我正在使用ELK处理和监视相当大的日志文件。我正在从本地文件系统推送日志。
但是我面临几个问题:
我该如何解决这些问题?
任何帮助都是有益的。谢谢!
ETA:
我的logstash配置:
input {
file {
path => "/home/adb/data/**/**/*.gz" #path to subfolder (2nd level) containing .gz files
mode => "read"
file_completed_action => "log"
file_completed_log_path => "/home/adb/data/log.txt"
}
}
filter {
csv {
separator => "&"
columns => ["T", "D", "CID", "RT", "RP" ...]
}
kv {
source => "RP"
target => "RP"
value_split => "#"
field_split => "*"
}
mutate {
split => { "RT" => "*" }
}
date {
match => ["T", "yyyy-MM-dd HH:mm:ss"]
timezone => "UTC"
target => "ET"
}
mutate {
convert => {
"RT" => "integer"
}
}
}
output {
elasticsearch {
hosts => "localhost"
index => "trial1"
document_type => "A_C"
}
stdout {}
}
答案 0 :(得分:1)
当弹性搜索索引具有大量带有logstash的数据时,索引编制可能会很慢。您可以将apache kafka放在您的应用程序和logstash之间,以加快索引编制速度。