logstash 配置文件详解

logstash 配置文件详解1 bin logstash fsecond pipeline confconfig test and exit 该 config test and exit 选项会解析您的配置文件并报告任何错误 当配置文件通过配置测试时 使用以下命令启动 Logstash bin logstash fsecond pipeline conf2 bin lo

1:

bin / logstash -f second-pipeline.conf –config.test_and_exit

--config.test_and_exit选项会解析您的配置文件并报告任何错误。当配置文件通过配置测试时,使用以下命令启动      Logstash:

 bin / logstash -f second-pipeline.conf

2:

bin / logstash -f first-pipeline.conf –config.reload.automatic

--config.reload.automatic选项启用自动配置重新加载,因此您不必在每次修改配置文件时停止并重新启动Logstash。

3、file源的解析

4:jdbc详解

5:output 详解

output { //输入到es集群中,当hosts 参数列出多个IP地址时,Logstash会在地址列表中对请求进行负载平衡。另请注意,Elasticsearch的默认端口是,9200并且可以在上面的配置中省略。 elasticsearch { hosts => ["IP Address 1:port1", "IP Address 2:port2", "IP Address 3"] } //写入文件 file { path => "/path/to/target/file" } //以json格式输出到控制台   stdout { codec => json_lines }  }

 

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/208479.html原文链接:https://javaforall.net

(0)
上一篇 2026年3月19日 上午11:30
下一篇 2026年3月19日 上午11:30


相关推荐

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号