Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

introduce option to overwrite journald parser #347

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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