我配置了logstash转发器并尝试解析日志文件。希望我通过参考logstash book正确地完成了所有步骤。运行logstash配置文件和logstash转发器时,我没有看到任何错误,但文件解析没有开始。
这是我的配置细节
1. cat /etc/logstash/central.conf
input {
lumberjack {
port => 6782
ssl_certificate => "/etc/logstash/server.crt"
ssl_key => "/etc/logstash/server.key"
type => "lumberjack"
}
}
output {
stdout { codec => rubydebug }
}
2. cat logstash-forwarder.conf
{
"network": {
"servers": [ "54.227.XXX.XXX:6782" ],
"ssl ca": "/etc/logstash-forwarder/server.crt",
"ssl key": "/etc/logstash-forwarder/server.key",
"timeout": 15`enter code here`
},
"files": [
{
"paths": [
"/opt/logs/L/*.log"
]
logstash 的输出
sudo bin/logstash -f /etc/logstash/central.conf 使用里程碑 1 输入插件“伐木工人”。这个插件应该可以工作,但会受益于像你这样的人的使用。如果您发现错误或对如何改进此插件有建议,请告诉我们。有关插件里程碑的更多信息,请参阅http://logstash.net/docs/1.4.2/plugin-milestones {:level=>:warn}
Logstash 转发器的输出
ubuntu@ip-10-231-15-32:~$ /opt/lumberjack/bin/lumberjack -config /etc/logstash-forwarder/logstash-forwarder.conf
-fro m-beginning=true
2015/01/13 12:55:09 publisher init
2015/01/13 12:55:09 {
"network": {
"servers": [ "54.227.XXX.XXX:6782" ],
"ssl ca": "/etc/logstash-forwarder/server.crt",
"ssl key": "/etc/logstash-forwarder/server.key",
"timeout": 15
},
"files": [
{
"paths": [
"/opt/logs/L/*.log"
]
}
]
}
2015/01/13 12:55:09.498742 Setting trusted CA from file: /etc/logstash-forwarder/server.crt
2015/01/13 12:55:09.499091 Connecting to 54.227.XXX.XXX:6782
2015/01/13 12:55:09.566860 Connected to 54.227.XXX.XXX:6782
有什么建议么?