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

doc/03-Configuration.md: Logging Fields in Journald #743

Merged
merged 1 commit into from
Aug 6, 2024

Conversation

oxzi
Copy link
Member

@oxzi oxzi commented Apr 18, 2024

While working on an issue where the additional logging information provided by zap fields was missing, I realized that our documentation did not indicate how to view them. So a new documentation section has been added explaining how to view the fields when using the systemd-journald logging output.

Also removes one trailing space.

@oxzi oxzi added the area/documentation Improvements or additions to documentation label Apr 18, 2024
@cla-bot cla-bot bot added the cla/signed label Apr 18, 2024
@oxzi oxzi added this to the 1.2.1 milestone Jul 30, 2024
@oxzi oxzi force-pushed the doc-03-systemd-journald-appendix branch from 1a0d39d to 6080e33 Compare August 1, 2024 07:29
@oxzi oxzi requested a review from julianbrost August 1, 2024 07:30
julianbrost
julianbrost previously approved these changes Aug 1, 2024
When examining the journal with `journalctl`, fields containing additional information are hidden by default.
Setting an appropriate
[`--output` option](https://www.freedesktop.org/software/systemd/man/latest/journalctl.html#Output%20Options)
will include them, such as: `journalctl --output verbose` or `journalctl --output json`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would also add --unit 'icingadb.service' to those example commands given that this is all about Icinga DB.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I get your point. However, including the --unit argument for both examples makes this sentence very long, hiding the highlighted --output argument.

Setting an appropriate --output option will include them, such as: journalctl --unit icingadb.service --output verbose or journalctl --unit icingadb.service --output json.

Thus, I would prefer to drop journalctl and just show the two --output arguments.

Setting an appropriate --output option will include them, such as: --output verbose or --output json.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

However, including the --unit argument for both examples makes this sentence very long, hiding the highlighted --output argument.

But I don't quite get your point. Isn't this docs snippet supposed to help someone find the Icinga DB fields? I mean, OK, you want to highlight the --output argument even more, but in the end the user just needs a copy-pasteable one without having to construct the full command on his own. Personally, this just doesn't seem like a good approach to only partially document something.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My assumption is that users have a basic understanding of journalctl, as otherwise they simply cannot operate it. Using it without any further parameter would result in logs since last log vacuum, which might have never happened. Thus, they might want to use -f or -n 100 or --since today or something else..

I don't see any one-command-fits-it-all. My intention was just to point out that the necessary details are hidden, which is a non-default behavior, compared to most other software out there.

I have added a line showing one generic copy-pastable journalctl command.

doc/03-Configuration.md Outdated Show resolved Hide resolved
While working on an issue where the additional logging information
provided by zap fields was missing, I realized that our documentation
did not indicate how to view them. So a new documentation section has
been added explaining how to view the fields when using the
`systemd-journald` logging output.

Also removes one trailing space.
@oxzi oxzi force-pushed the doc-03-systemd-journald-appendix branch from 6d47b33 to 813cf9f Compare August 5, 2024 08:50
@oxzi oxzi requested a review from julianbrost August 5, 2024 08:50
@julianbrost julianbrost merged commit f9ce7a5 into main Aug 6, 2024
31 checks passed
@julianbrost julianbrost deleted the doc-03-systemd-journald-appendix branch August 6, 2024 13:24
oxzi added a commit to Icinga/icinga-notifications that referenced this pull request Aug 13, 2024
While working on an issue where the additional logging information
provided by zap fields was missing, I realized that our documentation
did not indicate how to view them. So a new documentation section has
been added explaining how to view the fields when using the
`systemd-journald` logging output.

Also removes one trailing space.

This change is an almost identical replica of
<Icinga/icingadb#743>.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/documentation Improvements or additions to documentation cla/signed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants