What is actually .logstash_jdbc_last_run file?

I'm pretty confused what this file is and where does it get the timestamp which it has in it?

I'm aware that this get generated every time you run the logstash conf file. Is this file related by any chance with the database table which we mention within the jdbc tag?

Is it a must to have last_run_metadata_path which points to the .logstash_jdbc_last_run file within the logstash input (jdbc) tag every time I run the logstash conf file?

Any help could be appreciated.

The file contains the last seen value so that Logstash can ask for newer values the next time the jdbc input makes query. You only need to set last_run_metadata_path if you're unhappy with the default value.

2 Likes