【发布时间】:2020-02-06 03:52:57
【问题描述】:
我正在尝试使用 ELK 的安全功能。我的弹性版本是 7.5.1
我的文件配置有问题。我无法启动logstash
1.首先,我通过添加xpack.security.enabled: true在elasticsearch.yml中启用安全性
2.其次,在kibana.yml 我编辑elasticsearch.username = "elastic" 和elasticsearch.password 是我的设置密码
我启动服务 elasticsearch 和 kibana。 还在这里,一切都很好。
3.然后我使用下面的 conf 运行我的 logstash:
input {
file {
path => ["/etc/logstash/handleexception1.txt"]
type => "_doc"
start_position => beginning
}
}
filter {
dissect {
mapping => {
"message" => "%{Date} %{Time} %{INFO} %{Service} Message:%{Message} ExceptionList:%{ExceptionList}"
}
}
}
output {
hosts => ["localhost:9200"]
index => "logstashhhandlerror2"
user => "elastic"
pasword => "elastic"
}
stdout { codec => rubydebug}
}
其实我都试过了
input {
elasticsearch{
file {
path => ["/etc/logstash/handleexception1.txt"]
type => "_doc"
start_position => beginning
}
user => "elastic"
password => "elastic"
}
}
filter {
elasticsearch{
dissect {
mapping => {
"message" => "%{Date} %{Time} %{INFO} %{Service} Message:%{Message} ExceptionList:%{ExceptionList}"
}
}
user => "elastic"
password => "elastic"
}
}
output {
hosts => ["localhost:9200"]
index => "logstashhhandlerror2"
user => "elastic"
pasword => "elastic"
}
stdout { codec => rubydebug}
}
这是我尝试启动 logtash.service 时的屏幕
感谢您的阅读,希望您能解决我的问题。
【问题讨论】:
-
实际我开始但无法创建任何索引 :( 这就是问题所在
标签: elasticsearch logstash logstash-configuration elk logstash-file