Ошибка при подключении Logstash и Elasticsearch - PullRequest
0 голосов
/ 01 ноября 2018

Я очень новичок в ELK, я установил ELK версии 5.6.12 на CentOS-сервер. 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" }    

В чем может быть проблема?

...