Hello,
I am facing the error below when trying to execute logstash jdbc config file:
[ERROR] 2022-11-02 11:52:26.435 [Converge PipelineAction::Create] agent - Failed to execute action {:action=>LogStash::PipelineAction::Create/pipeline_id:main, :exception=>"LogStash::ConfigurationError", :message=>"Expected one of [ \t\r\n], "#", [A-Za-z0-9_-], '"', "'", "}" at line 3, column 5 (byte 24) after input {\n jdbc {\n ", :backtrace=>["/usr/share/logstash/logstash-core/lib/logstash/compiler.rb:32:in `compile_imperative'", "org/logstash/execution/AbstractPipelineExt.java:210:in `initialize'", "org/logstash/execution/JavaBasePipelineExt.java:72:in `initialize'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:48:in `initialize'", "org/jruby/RubyClass.java:911:in `new'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline_action/create.rb:50:in `execute'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:381:in `block in converge_state'"]}
Here is my config file:
input {
jdbc {
jdbc_driver_library => "/etc/logstash/conf.d/db2jcc.jar"
jdbc_driver_class => "com.ibm.db2.jcc.DB2Driver"
jdbc_connection_string => "jdbc:db2://10.177.37.145:25010/DD1"
jdbc_user => "db2usr"
jdbc_password => "xxxxxx"
schedule => "* * * * *"
statement => "SELECT TIME_STAMP AS DB_READ_TIME_STAMP, SCRIPT_NAME AS DB_READ_SCRIPT_NAME, SCRIPT_STATUS AS DB_READ_SCRIPT_STATUS from SCHEMA.TABNAME"
}
}
output {
elasticsearch {
hosts => "http://localhost:9200"
index => "dbinfolog"
user => elastic
password => xxxxxxxxxx
}
}
Could you please point out anything I may be missing on this config file?
Thanks in advance,
Ashiq Aboo Backer