Hi there,
we have some problems with logstash configurations which was working quite well under the logstash version from elastic directly.
if [type] == "syslog" {
output {
opensearch {
hosts => ["https://opensearch-node1:9200", "https://opensearch-node2:9200"]
index => "syslog-%{+YYYY.MM.dd}"
ssl => true
ssl_certificate_verification => false
user => "xx"
password => "xx"
}
}
}
With a logstash docker container (image opensearchproject/logstash-oss-with-opensearch-output-plugin:7.13.2) we got the following error:
logstash | [2021-11-15T10:07:20,566][ERROR][logstash.agent ] Failed to execute action {:action=>LogStash::PipelineAction::Create/pipeline_id:main, :exception=>“LogStash::ConfigurationError”, :message=>“Expected one of [ \t\r\n], "#", "input", "filter", "output" at line 1, column 1 (byte 1)”, :backtrace=>[“/usr/share/logstash/logstash-core/lib/logstash/compiler.rb:32:in
compile_imperative'", "org/logstash/execution/AbstractPipelineExt.java:187:in
initialize’”, “org/logstash/execution/JavaBasePipelineExt.java:72:ininitialize'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:47:in
initialize’”, “/usr/share/logstash/logstash-core/lib/logstash/pipeline_action/create.rb:52:inexecute'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:389:in
block in converge_state’”]}
Are there new “if” filter types or is there any replacement available? We face a similar problem with the type “beats”.
If the first and last line is commented, that logstash service is starting normally.
Regards