Logstash數(shù)據(jù)處理服務(wù)的輸出插件Output配置參數(shù)詳解
1.將日志數(shù)據(jù)存儲到Elasticsearch集群
output配置字段是將收集的日志數(shù)據(jù)存輸出到生存儲中,一般都是elasticsearch集群。
常用字段配置:
hosts
ES集群每個節(jié)點的地址信息。
index
:指定存儲到ES的哪個索引庫。文章來源:http://www.zghlxwxcb.cn/news/detail-407514.html
將從file日志文件中收集來的數(shù)據(jù)存儲到ES索引庫中。文章來源地址http://www.zghlxwxcb.cn/news/detail-407514.html
1.配置logstash
[root@elkstack-1 conf.d]# vim test.conf
input {
file {
path => "/var/log/test/*.log"
exclude => "error.log"
start_position => "beginning"
tags => "web"
type => "nginx"
add_field => {
"project" => "web"
"app" => "nginx"
}
}
}
filter {
}
output {
elasticsearch { #輸出到ES集群
hosts => ["192.168.20.11:9200","192.168.20.12:9200","192.168.20.13:9200"] #集群各節(jié)點的信息
index
到了這里,關(guān)于Logstash數(shù)據(jù)處理服務(wù)的輸出插件Output配置參數(shù)詳解的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!