Skip to content

Commit 061e85c

Browse files
committed
doc/03-Configuration.md: Logging Fields in Journald
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>.
1 parent 114c1be commit 061e85c

File tree

1 file changed

+22
-7
lines changed

1 file changed

+22
-7
lines changed

doc/03-Configuration.md

+22-7
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,12 @@ manual adjustments.
8282

8383
Configuration of the logging component used by Icinga Notifications.
8484

85-
| Option | Description |
86-
|----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
87-
| level | **Optional.** Specifies the default logging level. Can be set to `fatal`, `error`, `warn`, `info` or `debug`. Defaults to `info`. |
88-
| output | **Optional.** Configures the logging output. Can be set to `console` (stderr) or `systemd-journald`. If not set, logs to systemd-journald when running under systemd, otherwise stderr. |
89-
| interval | **Optional.** Interval for periodic logging defined as [duration string](#duration-string). Defaults to `"20s"`. |
90-
| options | **Optional.** Map of component name to logging level in order to set a different logging level for each component instead of the default one. See [logging components](#logging-components) for details. |
85+
| Option | Description |
86+
|----------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
87+
| level | **Optional.** Specifies the default logging level. Can be set to `fatal`, `error`, `warn`, `info` or `debug`. Defaults to `info`. |
88+
| output | **Optional.** Configures the logging output. Can be set to `console` (stderr) or `systemd-journald`. Defaults to systemd-journald when running under systemd, otherwise to console. See notes below for [systemd-journald](#systemd-journald-fields). |
89+
| interval | **Optional.** Interval for periodic logging defined as [duration string](#duration-string). Defaults to `"20s"`. |
90+
| options | **Optional.** Map of component name to logging level in order to set a different logging level for each component instead of the default one. See [logging components](#logging-components) for details. |
9191

9292
### Logging Components
9393

@@ -121,6 +121,21 @@ the cluster nodes resynchronise their states after each executed query, and may
121121
However, this does not necessarily have to be the case if, for instance, Icinga Notifications is only allowed to connect to a
122122
single cluster node at a time. This is the case when a load balancer does not randomly route connections to all the
123123
nodes evenly, but always to the same node until it fails, or if your database cluster nodes have a virtual IP address
124-
fail over assigned. In such situations, you can set the `wsrep_sync_wait` system variable to `0` in the
124+
fail over assigned. In such situations, you can set the `wsrep_sync_wait` system variable to `0` in the
125125
`/etc/icinga-notifications/config.yml` file to disable it entirely, as Icinga Notifications doesn't have to wait for cluster
126126
synchronisation then.
127+
128+
### Systemd Journald Fields
129+
130+
When examining the journal with `journalctl`, fields containing additional information are hidden by default.
131+
Setting an appropriate
132+
[`--output` option](https://www.freedesktop.org/software/systemd/man/latest/journalctl.html#Output%20Options)
133+
will include them, such as: `--output verbose` or `--output json`.
134+
For example:
135+
136+
```
137+
journalctl --unit icinga-notifications.service --output verbose
138+
```
139+
140+
All Icinga Notifications fields are prefixed with `ICINGA_NOTIFICATIONS_`,
141+
e.g., `ICINGA_NOTIFICATIONS_ERROR` for error messages.

0 commit comments

Comments
 (0)