Reputation: 4463
Upon research on XML plugin of Logstash, I found example. When I run this config, there is an exception Error: No such file or directory -/dev/null
at sincedb_path => "/dev/null"
. From the enter link description here, it says
Path of the sincedb database file (keeps track of the current position of monitored log files) that will be written to disk. The default will write sincedb files to <path.data>/plugins/inputs/file NOTE: it must be a file path and not a directory path
which I still don't understand. My question is what is the file path for sincedb_path
should be let's say I am running it in Window 10?
Upvotes: 0
Views: 2704
Reputation: 4072
If you are running on Windows and you do not want the in-memory sincedb to be persisted across restarts then you can set sincedb_path to "NUL", which is the Windows equivalent of UNIX's "/dev/null".
Upvotes: 2
Reputation: 1540
This is a file where the state of the logstash is saved.
For example you have a file with 10 lines. We started logstash with this file in input configuration, and the process read 8 first line, and for some reason the process is stopped.
When you relaunch logstash, it read the sincedb_path to know where is the last read of the file targeted by the input configuration. So the process restart the reading step at the last line. Is it the "state" of the logstash for this input.
If the value of the sincedb_path is "/dev/null" this means "stateless" for this input file. So for each relaucnh of the logstash process, this one restart reading the input file.
Upvotes: 1