elasticsearch安装search guard以后配置logstash输入
配置文件如下
output{ if "nginx-prod-log" in [type] { elasticsearch{ hosts => ["172.16.90.24:9200"] index => "nginx-prod-log-%{+YYYY.MM}" ssl => true ssl_certificate_verification => true truststore => "/etc/elasticsearch/key/truststore.jks" truststore_password => "sadhkjah98123791273" user => "admin" password => "admin" } #stdout{ # codec => rubydebug #} }
其中文件truststore.jks在解压后的文件夹内
密码在README.txt
用户名密码admin是search guard默认的
truststore密码需要引号 用户名和密码也需要加引号 否则无法启动logstash
用户名和密码没有加引号报错信息为 ConfigurationError