From 272191840f04a6de13bcd94f1101095932c74571 Mon Sep 17 00:00:00 2001 From: Tobias Deiminger Date: Sat, 11 Sep 2021 17:16:29 +0200 Subject: [PATCH] Update documentation for JournaldLogger --- doc/09-object-types.md | 27 +++++++++++++++++++++++++++ doc/14-features.md | 1 + 2 files changed, 28 insertions(+) diff --git a/doc/09-object-types.md b/doc/09-object-types.md index ca69cdb74..a4123a9e2 100644 --- a/doc/09-object-types.md +++ b/doc/09-object-types.md @@ -1754,6 +1754,33 @@ to InfluxDB. Experiment with the setting, if you are processing more than 1024 m or similar. +### JournaldLogger + +Specifies Icinga 2 logging to the systemd journal using its native interface. +This configuration object is available as `journald` [logging feature](14-features.md#logging). + +Resulting journal records have fields as described in +[journal fields](https://www.freedesktop.org/software/systemd/man/systemd.journal-fields.html), +and an additional custom field `ICINGA2_FACILITY` with the detailed message origin (e.g. "ApiListener"). + +Example: + +``` +object JournaldLogger "journald" { + severity = "warning" +} +``` + +Configuration Attributes: + +Name | Type | Description +--------------------------|-----------------------|---------------------------------- +severity | String | **Optional.** The minimum syslog compatible severity for this log. Can be "debug", "notice", "information", "warning" or "critical". Defaults to "information". +facility | String | **Optional.** Defines the syslog compatible facility to use for journal entries. This can be a facility constant like `FacilityDaemon`. Defaults to `FacilityUser`. +identifier | String | **Optional.** Defines the syslog compatible identifier (also known as "tag") to use for journal entries. If not given, systemd's default behavior is used and usually results in "icinga2". + +Facility Constants are the same as for [SyslogLogger](09-object-types.md#objecttype-sysloglogger). + ### LiveStatusListener diff --git a/doc/14-features.md b/doc/14-features.md index 5e5eea0a7..392f98aa6 100644 --- a/doc/14-features.md +++ b/doc/14-features.md @@ -14,6 +14,7 @@ and `icinga2 feature disable` commands to configure loggers: Feature | Description ----------------|------------ debuglog | Debug log (path: `/var/log/icinga2/debug.log`, severity: `debug` or higher) +journald | Systemd Journal (severity: `warning` or higher) mainlog | Main log (path: `/var/log/icinga2/icinga2.log`, severity: `information` or higher) syslog | Syslog (severity: `warning` or higher) windowseventlog | Windows Event Log (severity: `information` or higher)