Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion scalyr_agent/builtin_monitors/journald_monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,14 @@
default=10 * 60,
)

define_config_option(
__monitor__,
"parser",
"Allow to override the parser used for journald entries",
convert_to=str,
default="journald",
)

# this lock must be held to access the
# _global_checkpoints dict
_global_lock = threading.Lock()
Expand Down Expand Up @@ -256,7 +264,7 @@ def _initialize(self):
self._poll = None
# override the sample_interval
self.set_sample_interval(self._config.get("journal_poll_interval"))
self.log_config["parser"] = "journald"
self.log_config["parser"] = self._config.get("parser")

self._extra_fields = self._config.get("journal_fields")
self._last_cursor = None
Expand Down