作者:机加工N_918 | 来源:互联网 | 2023-05-18 22:56
input{
file {
path => ["/usr/local/test/logstash-5.0.0/file/test.log"]
type => "logs"
}
}
output {
elasticsearch {
index => "test-%{+YYYY.MM.dd}"
hosts => ["localhost:9200"]
ssl => true //必须
ssl_certificate_verification => true //必须
keystore => "/usr/local/test/elasticsearch-5.3.0-localhost/config/CN=localhost-keystore.jks" //必须
keystore_password => "fa5f481f1a5df359de86" //必须
truststore => "/usr/local/test/elasticsearch-5.3.0-localhost/config/truststore.jks" //必须
truststore_password => "1b2775b49b7905d36c76" //必须
workers => 1
flush_size => 100
idle_flush_time => 10
user => "admin" //必须
password => "admin" //必须
}
}