我对ELK非常陌生,我在CentOS服务器上安装了ELK版本5.6.12。 Elasticsearch和Kibana正常工作。但是我无法将Logstash连接到Elastic search。 我已将环境变量设置为
export JAVA_HOME=/usr/local/jdk1.8.0_131
export PATH=/usr/local/jdk1.8.0_131/bin:$PATH
我运行简单测试:
bin/logstash -e 'input { stdin { } } output { elasticsearch { host => localhost:9200 protocol => "http" port => "9200" } }'
我收到错误消息:
WARNING: Could not find logstash.yml which is typically located in
$LS_HOME/config or /etc/logstash. You can specify the path using --
path.settings. Continuing using the defaults
Could not find log4j2 configuration at path
/etc/logstash/logstash.yml/log4j2.properties. Using default config which
logs errors to the console
Logstash的官方文档中提到的简单“斜杠”的工作方式如下:
$bin/logstash -e 'input { stdin { } } output { stdout {} }'
Hello
WARNING: Could not find logstash.yml which is typically located in
$LS_HOME/config or /etc/logstash. You can specify the path using --
path.settings. Continuing using the defaults Could not find log4j2
configuration at path /usr/share/logstash/config/log4j2.properties.
Using default config which logs errors to the console
The stdin plugin is now waiting for input: {
"@version" => "1",
"host" => "localhost",
"@timestamp" => 2018-11-01T04:44:58.648Z,
"message" => "Hello" }
可能是什么问题?