简体   繁体   English

配置Logstash Loggly输出以使用Loggly的Batch API

[英]Configuring the Logstash Loggly Output to Use Loggly's Batch API

I've been experimenting with Logstash's Loggly output , and have noticed that it makes one HTTP POST request for each log event that is read from the input. 我一直在尝试Logstash的Loggly输出 ,并注意到它为从输入中读取的每个日志事件发出一个HTTP POST请求。

My configuration looks like this: 我的配置如下所示:

input {
    file {
        type => "some-logs"
        path => "/my-log-file.log"
        codec => "json"
    }
}
output {
    loggly {
        host => "logs-01.loggly.com"
        key => "loggly-customer-key"
        proto => "https"
    }
}

Loggly provides a bulk API that allows you to send multiple log events in a single POST request. Loggly 提供了一个批量API ,该API可让您在单个POST请求中发送多个日志事件。 Is it possible to configure the Loggly output to use this batch API instead of the default inputs API? 是否可以将Loggly输出配置为使用此批处理API而不是默认输入API?

Thanks 谢谢

Looks like this isn't possible with the current version of the plugin. 看起来当前插件版本无法实现。 Instead, I'm using Logback Extensions batch mode and removing Logstash from my solution altogether. 相反,我使用Logback Extensions批处理模式,并将Logstash从我的解决方案中完全删除。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM