Hi,
i tried to configure logstash nodes.
i followed this document : https://www.elastic.co/guide/en/logstash/current/configuring-logstash.html
i copied the ca.p12 cert from elasticsearch cluster nodes.
my logstash.yml file:
xpack.monitoring.enabled: true
xpack.monitoring.elasticsearch.username: elastic
xpack.monitoring.elasticsearch.password: elastic
xpack.monitoring.elasticsearch.hosts: ["http://192.168.136.x:9200", "http://192.168.136.x:9200"]
xpack.monitoring.elasticsearch.sniffing: false
xpack.monitoring.elasticsearch.ssl.truststore.path: [ "/home/harry/ca.p12" ]
xpack.management.enabled: true
xpack.management.elasticsearch.username: elastic
xpack.management.elasticsearch.password: elastic
xpack.management.elasticsearch.hosts: ["http://192.168.136.x:9200", "http://192.168.136.x:9200"]
xpack.management.pipeline.id: ["mainpipe"]
my logstash.conf file:
input {
file {
path => "/home/harry/DAILYDATA_S24_201904.csv"
start_position => beginning
}
}
filter {
csv {
columns => [
"Daily Rainfall Total",
"Highest 30 Min Rainfall",
"Highest 60 Min Rainfall",
"Highest 120 Min Rainfal",
"Mean Temperature",
"Maximum Temperature",
"Minimum Temperature",
"Mean Wind Speed",
"Max Wind Speed"
]
separator => ","
remove_field => ["message"]
}
date {
match => ["time", "ISO8601"]
}
mutate {
convert => ["TempOut", "float"]
}
}
output {
elasticsearch {
hosts => ["http://192.168.136.x:9200" , "http://192.168.136.x:9200"]
user => "elastic"
password => "elastic"
action => "index"
index => "weather_index"
}
stdout { }
}
restarted logstash service, shows below error:
logstash logs:
[2019-05-22T01:30:11,707][ERROR][org.logstash.Logstash ] java.lang.IllegalStateException: Logstash stopped processing because of an error: (SystemExit) exit
[2019-05-22T01:31:21,565][FATAL][logstash.runner ] An unexpected error occurred! {:error=>#<ArgumentError: Setting "xpack.monitoring.elasticsearch.ssl.truststore.path" must be a String. Received: ["/home/hari/ca.p12"] (Array)>, :backtrace=>["/usr/share/logstash/logstash-core/lib/logstash/settings.rb:235:in validate'", "/usr/share/logstash/logstash-core/lib/logstash/settings.rb:411:in
validate'", "/usr/share/logstash/logstash-core/lib/logstash/settings.rb:421:in validate'", "/usr/share/logstash/logstash-core/lib/logstash/settings.rb:198:in
set'", "/usr/share/logstash/logstash-core/lib/logstash/settings.rb:69:in set_value'", "/usr/share/logstash/logstash-core/lib/logstash/settings.rb:88:in
block in merge'", "org/jruby/RubyHash.java:1419:in each'", "/usr/share/logstash/logstash-core/lib/logstash/settings.rb:88:in
merge'", "/usr/share/logstash/logstash-core/lib/logstash/settings.rb:137:in validate_all'", "/usr/share/logstash/logstash-core/lib/logstash/runner.rb:278:in
execute'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/clamp-0.6.5/lib/clamp/command.rb:67:in run'", "/usr/share/logstash/logstash-core/lib/logstash/runner.rb:237:in
run'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/clamp-0.6.5/lib/clamp/command.rb:132:in run'", "/usr/share/logstash/lib/bootstrap/environment.rb:73:in
'"]}
[2019-05-22T01:31:21,606][ERROR][org.logstash.Logstash ] java.lang.IllegalStateException: Logstash stopped processing because of an error: (SystemExit) exit
please guide me where i make wrong....
thanks
Harry