Skip to content

Deprecate SINCEDB_PATH and allow sincedb_path to point to directory #106

Open
@magnusbaeck

Description

@magnusbaeck

A discussion in PR #102 led to the following proposal. Logstash's file input currently uses the following algorithm to select the sincedb path:

  1. If the sincedb_path option is set, use that path and require that it points to a file.
  2. If $SINCEDB_DIR is set, generate a sincedb filename and store it in $SINCEDB_DIR.
  3. If $HOME is set, generate a sincedb filename and store it in $HOME.
  4. Bail out with an error.

The SINCEDB_DIR environment variable support isn't documented, and in PR #102 which adds such documentation @jordansissel suggested that we instead deprecate that variable since the configuration interface is confusing.

So, to simplify the interface without making it less expressive I suggest that the algorithm instead becomes this:

  1. If the sincedb_path option is set to a valid file, use that file.
  2. If the sincedb_path option is set to a valid directory, generate a sincedb filename and store it in that directory.
  3. If the sincedb_path option isn't explicitly set we fall back to its default value of $HOME (if set).
  4. Bail out with an error.

This makes the sincedb_path option a one-stop shop for configuring the sincedb path.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions