IgnoreNonValidStatefile

Ignores corrupt state files and restarts reading from the beginning.

This parameter applies to imjournal: Systemd Journal Input Module.

Name:

IgnoreNonValidStatefile

Scope:

module

Type:

boolean

Default:

module=on

Required?:

no

Introduced:

at least 8.x, possibly earlier

Description

When a corrupted state file is encountered, the module discards it and continues reading from the start of the journal (or from the end if IgnorePreviousMessages is enabled). A new valid state file is written after the next state persistence or shutdown.

If the state file path exists but is not a regular file (for example a directory, a FIFO or a device), or if fstat() on it fails, the module also ignores it and reads from the start of the journal (or from the end if IgnorePreviousMessages is enabled). Unlike a corrupt file, a path that is not a regular file is not replaced: imjournal leaves it untouched and does not save its position while the path is there. This is logged once; once the path is removed (or replaced by a regular file), saving resumes at the next state persistence or shutdown. If this parameter is off, any of these conditions stops the imjournal input.

Module usage

module(load="imjournal" IgnoreNonValidStatefile="...")

Notes

  • Historic documentation called this a binary option; it is boolean.

See also

See also imjournal: Systemd Journal Input Module.


Support: rsyslog Assistant | GitHub Discussions | GitHub Issues: rsyslog source project

Contributing: Source & docs: rsyslog source project

© 2008–2026 Rainer Gerhards and others. Licensed under the Apache License 2.0.