As we can see, there is the sincedb_path that is set for the File input plugin.
Question:
What if the input plugin is http_poller or cloudwatch_logs, can I still use sincedb_path?
If yes, what should I set my sincedb_path as if I am going to use a docker? With dockers, things are a bit different from usual path setup. I've heard I need to mount the path in my docker file.
If no, how can I tell my program where it left off when reading the logs again?
Objective:
I understand that sincedb_path is by default set to null, but I don't want that. I want my program to keep track of what logs have been read so far, so the next time I restart my program again, it can start from where it left off.
Setup sincedb_path in my Logstash configuration that is used in a docker file.
No, by default the file input will generate a valid (but obscure) sincedb_path and persist the in-memory sincedb across restarts. Only a file input uses a sincedb to persist state. A jdbc input can use sql_last_value. It is possible that other inputs use other options, but I have no experience of those.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.