I see that no sincedb files are being created.
I also tried the following:
# without slash at the end of the path
file {
...
sincedb_path => "$HOME/logstash/sincedb"
}
# directly providing wildcard for sincedb files
file {
...
sincedb_path => "$HOME/logstash/sincedb/.sincedb*"
}
None of them seems to be working. What is the correct way to give sincedb path?
Need help on this.
I wouldn't assume that $HOME is expanded here. Also, I suspect sincedb_path should point to a file rather than a directory. Increasing the log verbosity with --verbose or even --debug should give more insights into what's going on.
Any particular reason why you want to set sincedb_path? The default value is fine in most circumstances.
Logstash will generate a sincedb path based on the filename pattern so regardless it'll always remember where it left off as long as you don't change the filename pattern. So yes, there are occasions where setting sincedb_path makes sense but I'd say that people are overusing it.
Are you saying that sincedb files are being saved in some path based on filename pattern? But we might not have write permissions in those paths. I haven't seen sincedb files anywhere yet.
Can you please elaborate. Because, its important not to loose any data after bouncing logstash.
As documented, the sincedb_path default causes files to be written to $HOME, i.e. the home directory of whatever user that Logstash runs as (typically logstash). It's a reasonable assumption that those files will be writable to Logstash. See below for the code that sets sincedb_path dynamically when the user hasn't set it.
And again, if you increase the logging verbosity Logstash will tell you more about the location of the sincedb files.
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.