Logstash 转发器不工作

Logstash-forwarder not working

我配置了 logstash 转发器并尝试解析日志 files.Hope 我通过引用 logstash 正确地完成了所有步骤 book.While 运行 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 输入插件 'lumberjack'。这个插件应该可以工作,但会受益于像你这样的人的使用。如果您发现错误或对如何改进此插件有任何建议,请告诉我们。有关插件里程碑的更多信息,请参阅 http://logstash.net/docs/1.4.2/plugin-milestones {:level=>:warn}

Logstash-forwarder 的输出

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

有什么建议吗?

logstash-forwarder 应该记录它在网络连接之前找到的文件。请重新检查用户 运行 logstash-forwarder 可以执行的文件和目录权限

ls /opt/logs/L/*.log

cat /opt/logs/L/*.log