# The ingester WAL records incoming logs and stores them on the local file system in order to guarantee persistence of acknowledged data in the event of a process crash.
wal:
# Enables writing to WAL.
# CLI flag: -ingester.wal-enabled
[enabled: <boolean> | default = false]
# Directory where the WAL data should be stored and/or recovered from.
# CLI flag: -ingester.wal-dir
[dir: <filename> | default = "wal"]
# Recover data from existing WAL dir irrespective of WAL enabled/disabled.
# CLI flag: -ingester.recover-from-wal
[recover: <boolean> | default = false]
# When WAL is enabled, should chunks be flushed to long-term storage on shutdown.
# CLI flag: -ingester.flush-on-shutdown
[flush_on_shutdown: <boolean> | default = false]
# Interval at which checkpoints should be created.
@ -34,7 +34,7 @@ Note: the Prometheus metric `loki_ingester_wal_disk_full_failures_total` can be
2. Following flags needs to be set
* `--ingester.wal-enabled` to `true` which enables writing to WAL during ingestion.
* `--ingester.wal-dir` to the directory where the WAL data should be stores and/or recovered from. Note that this should be on the mounted volume.
* `--ingester.wal-dir` to the directory where the WAL data should be stored and/or recovered from. Note that this should be on the mounted volume.
* `--ingester.checkpoint-duration` to the interval at which checkpoints should be created.
* `--ingester.recover-from-wal` to `true` to recover data from an existing WAL. The data is recovered even if WAL is disabled and this is set to `true`. The WAL dir needs to be set for this.
* If you are going to enable WAL, it is advisable to always set this to `true`.