Error on Logstash pipeline

what is the error on this pipeline:

input {
jdbc {
jdbc_driver_library => "/mysql-connector-java-8.0.21.jar"
jdbc_driver_class => "com.mysql.jdbc.Driver"
jdbc_connection_string => "jdbc:mysql://74.117.156.179:3306/egendashboard"
jdbc_user => root
jdbc_password =>Kedhar@123
jdbc_paging_enabled => true
tracking_column => "unix_ts_in_secs"
use_column_value => true
tracking_column_type => "numeric"
schedule => "*/5 * * * * "
statement => "select c.
,u.name as createrName,UNIX_TIMESTAMP(last_updated_date) AS unix_ts_in_secs,cj.job_id as jobId,cj.job_title as Jobtitle,u.avathar,u.avatar_color,u.email as createrEmail from candidates as c left join candidate_jobs as cj on cj.candidate_id = c.id inner join users as u on c.created_by = u.id where (UNIX_TIMESTAMP(last_updated_date) > :sql_last_value AND last_updated_date < NOW()) and c.status = 'active' group by c.id ORDER BY last_updated_date DESC"
}
}

filter {
mutate {
copy => { "id" => "[@metadata][_id]"}
remove_field => ["id", "@version", "unix_ts_in_secs"]
}
}

output {
stdout { codec => "rubydebug"}
elasticsearch {
hosts => ["74.117.153.170:9200"]
index => "candidate_sync_idx"
document_id => "%{[@metadata][_id]}"
}
}

[2020-08-29T12:46:25,052][ERROR][logstash.agent ] Failed to execute action {:action=>LogStash::PipelineAction::Create/pipeline_id:main, :exception=>"LogStash::ConfigurationError", :message=>"Expected one of [A-Za-z0-9_-], [ \t\r\n], "#", "{", [A-Za-z0-9_], "}" at line 7, column 27 (byte 256) after input {\n jdbc {\n jdbc_driver_library => "/mysql-connector-java-8.0.21.jar"\n jdbc_driver_class => "com.mysql.jdbc.Driver"\n jdbc_connection_string => "jdbc:mysql://74.117.156.179:3306/egendashboard"\n jdbc_user => root\n jdbc_password =>Kedhar", :backtrace=>["/home/zillur/Desktop/Local-elk/logstash-7.5.1/logstash-core/lib/logstash/compiler.rb:41:in compile_imperative'", "/home/zillur/Desktop/Local-elk/logstash-7.5.1/logstash-core/lib/logstash/compiler.rb:49:in compile_graph'", "/home/zillur/Desktop/Local-elk/logstash-7.5.1/logstash-core/lib/logstash/compiler.rb:11:in block in compile_sources'", "org/jruby/RubyArray.java:2584:in map'", "/home/zillur/Desktop/Local-elk/logstash-7.5.1/logstash-core/lib/logstash/compiler.rb:10:in compile_sources'", "org/logstash/execution/AbstractPipelineExt.java:156:in initialize'", "org/logstash/execution/JavaBasePipelineExt.java:47:in initialize'", "/home/zillur/Desktop/Local-elk/logstash-7.5.1/logstash-core/lib/logstash/java_pipeline.rb:27:in initialize'", "/home/zillur/Desktop/Local-elk/logstash-7.5.1/logstash-core/lib/logstash/pipeline_action/create.rb:36:in execute'", "/home/zillur/Desktop/Local-elk/logstash-7.5.1/logstash-core/lib/logstash/agent.rb:326:in block in converge_state'"]}
[2020-08-29T12:46:25,397][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600}
[2020-08-29T12:46:30,346][INFO ][logstash.runner ] Logstash shut down.

You need double quotes around the value of the option.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.