Logstash Configuarion file issue

I have connect elk stack with mysql configuration file showing error . My configuration file is following

input {
jdbc {
jdbc_connection_string => "jdbc:mysql://localhost:3306/db_ublfunds_cc"
jdbc_user => "abcd"
jdbc_password => "1234"
jdbc_driver_library => "/etc/logstash/mysql-connector-java-8.0.16.jar"
jdbc_driver_class => "com.mysql.jdbc.Driver"
statement => "SELECT * from details"
}
}
output {
elasticsearch {
hosts => "http://192.168.216.92:9200"
index => "details"
document_type => "details"
}
stdout{
codec => rubydebug
}
}

Hi @Syed.Ubaid:

  1. What error do you observe?
  2. Could you provide the debug logs for Logstash? You can run Logstash from the command line:
  • bin/logstash --debug -f <PATH_TO_CONFIG_FILE>

Thank you.

this is the error

@Syed.Ubaid -

  1. It seems that you are facing the same issue as what was reported in this Discuss topic.

The last run metadata file will store the sql_last_value and It is updated accordingly after subsequent queries are run.

It seems that Logstash cannot parse the value stored in this file. It could be because you have been running Logstash with different SQL statements and the sql_last_value type keeps on changing?

  1. What you could try:
  • use the clean_run option to ignore the previous state. or,
  • use use_column_value option along with the tracking_column option. or,
  • delete the last run metadata file but I believe this would only be a temporary solution.

I hope that helps.

If you see my config file i am not running scheduler so why use of sql_last_value i am running simple select statement

@Syed.Ubaid - This is not related to the scheduler - it is related to the plugin state.

ok i will revert you back after checking your conditions

i am using view for multiple select statements now can you please tell me what value i use for column_value and tracking_column

if i use_column_value = true what would be the tracking column

i use tracking column value=true and also use tracking column id data is parse in logstash but when i see in kibana only 1 record is showing

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