Logstash_jdbc_last_run file is not created

./logstash -V
6.8.8

The logstash_jdbc_last_run file is not created. It was created at first, but I deleted it.

Then, when I run it with a arbitrary file in another location, sql_last_value is not created.

And the file continues to be deleted. I made it, but it keeps deleting. Maybe logstash clears it.

how can I create logstash_jdbc_last_run again?

jdbc {
   jdbc_connection_string => "jdbc:postgresql://host:port/dbname?useTimezone=true&useLegacyDatetimeCode=false&serverTimezone=UTC&useUnicode=true&characterEncoding=utf8"
  jdbc_user => user
  jdbc_password => pw
  jdbc_driver_library => "my arbitrary path"
  jdbc_driver_class => "org.postgresql.Driver"
  schedule => "* * * * *"
  statement => "SELECT region_id, region_type, country_code, country_code_3, continent_code, source_from, st_asgeojson(center_geo_point)::text as center_geo_point_text, center_longitude, jsonn::text from expedia_region_union where source_time - interval '9 hours' > :sql_last_value"
tags => ["expeia_region_union"]
tracking_column => "source_timestamp"
tracking_column_type => "timestamp"
use_column_value => true
clean_run => false
last_run_metadata_path => "/usr/share/logstash/.logstash_jdbc_last_run"
}

Once erased, can't you make it the same name again? Files created with other names are also deleted when you run logstash. For reference, I gave logstash permission as chown.

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