From 5a69dd19057a5275d775a9d995697643ec9bc2c3 Mon Sep 17 00:00:00 2001 From: Jennifer Travinski Date: Mon, 30 Aug 2021 11:07:58 -0400 Subject: [PATCH 1/5] Systemd config steps documented --- .../en/logging/helm-chart-options/_index.md | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/content/rancher/v2.6/en/logging/helm-chart-options/_index.md b/content/rancher/v2.6/en/logging/helm-chart-options/_index.md index fc1dd118924..6aaaa9bfe4a 100644 --- a/content/rancher/v2.6/en/logging/helm-chart-options/_index.md +++ b/content/rancher/v2.6/en/logging/helm-chart-options/_index.md @@ -9,7 +9,7 @@ weight: 4 - [Adding NodeSelector Settings and Tolerations for Custom Taints](#adding-nodeselector-settings-and-tolerations-for-custom-taints) - [Enabling the Logging Application to Work with SELinux](#enabling-the-logging-application-to-work-with-selinux) - [Additional Logging Sources](#additional-logging-sources) - +- [Systemd Configuration](#systemd-configuration) ### Enable/Disable Windows Node Logging @@ -68,3 +68,21 @@ To enable hosted Kubernetes providers as additional logging sources, go to **Clu When enabled, Rancher collects all additional node and control plane logs the provider has made available, which may vary between providers If you're already using a cloud provider's own logging solution such as AWS CloudWatch or Google Cloud operations suite (formerly Stackdriver), it is not necessary to enable this option as the native solution will have unrestricted access to all logs. + +### Systemd Configuration + +In Rancher logging, `SystemdLogPath` must be configured for K3s and RKE2 Kubernetes distributions. + +K3s and RKE Kubernetes distributions log to journald, which is the subsystem of systemd that is used for logging. In order to collect these logs, the `systemdLogPath` needs to be defined. While the `run/log/journal` directory is used by default, some Linux distributions do not default to this path. For example, Ubuntu defaults to `var/log/journal`. To determine your `systemdLogPath` configuration, see [steps below](#Steps-for-Systemd-Configuration). + +**Steps for Systemd Configuration:**
+ + Run `cat /etc/systemd/journald.conf | grep -E ^\#?Storage | cut -d"=" -f2` on one of your nodes. + +* If `persistent` is returned, your `systemdLogPath` should be `/var/log/journal`. +* If `volatile` is returned, your `systemdLogPath` should be `/run/log/journal`. +* If `auto` is returned, check if `/var/log/journal` exists.
+      - If `/var/log/journal` exists, then use `/var/log/journal`.
+      - If `/var/log/journal` does not exist, then use `/run/log/journal`. + +* If any value not described above is returned, Rancher Logging will not be able to collect control plane logs. To address this issue, set `Storage=volatile` in journald.conf, reboot your machine, and set `systemdLogPath` to `/run/log/journal`. \ No newline at end of file From c46debd06eb04e48857e7621c53d489984bb6e49 Mon Sep 17 00:00:00 2001 From: Jennifer Travinski Date: Mon, 30 Aug 2021 11:33:01 -0400 Subject: [PATCH 2/5] Typo fixed on RKE2 --- content/rancher/v2.6/en/logging/helm-chart-options/_index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/rancher/v2.6/en/logging/helm-chart-options/_index.md b/content/rancher/v2.6/en/logging/helm-chart-options/_index.md index 6aaaa9bfe4a..e15374ea155 100644 --- a/content/rancher/v2.6/en/logging/helm-chart-options/_index.md +++ b/content/rancher/v2.6/en/logging/helm-chart-options/_index.md @@ -73,7 +73,7 @@ If you're already using a cloud provider's own logging solution such as AWS Clou In Rancher logging, `SystemdLogPath` must be configured for K3s and RKE2 Kubernetes distributions. -K3s and RKE Kubernetes distributions log to journald, which is the subsystem of systemd that is used for logging. In order to collect these logs, the `systemdLogPath` needs to be defined. While the `run/log/journal` directory is used by default, some Linux distributions do not default to this path. For example, Ubuntu defaults to `var/log/journal`. To determine your `systemdLogPath` configuration, see [steps below](#Steps-for-Systemd-Configuration). +K3s and RKE2 Kubernetes distributions log to journald, which is the subsystem of systemd that is used for logging. In order to collect these logs, the `systemdLogPath` needs to be defined. While the `run/log/journal` directory is used by default, some Linux distributions do not default to this path. For example, Ubuntu defaults to `var/log/journal`. To determine your `systemdLogPath` configuration, see [steps below](#Steps-for-Systemd-Configuration). **Steps for Systemd Configuration:**
From 27a5f54240002a520d62d059b56254ba7aeb0028 Mon Sep 17 00:00:00 2001 From: Jennifer Travinski Date: Mon, 30 Aug 2021 11:35:38 -0400 Subject: [PATCH 3/5] Hyperlink not needed --- content/rancher/v2.6/en/logging/helm-chart-options/_index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/rancher/v2.6/en/logging/helm-chart-options/_index.md b/content/rancher/v2.6/en/logging/helm-chart-options/_index.md index e15374ea155..a4e91eb3b34 100644 --- a/content/rancher/v2.6/en/logging/helm-chart-options/_index.md +++ b/content/rancher/v2.6/en/logging/helm-chart-options/_index.md @@ -73,7 +73,7 @@ If you're already using a cloud provider's own logging solution such as AWS Clou In Rancher logging, `SystemdLogPath` must be configured for K3s and RKE2 Kubernetes distributions. -K3s and RKE2 Kubernetes distributions log to journald, which is the subsystem of systemd that is used for logging. In order to collect these logs, the `systemdLogPath` needs to be defined. While the `run/log/journal` directory is used by default, some Linux distributions do not default to this path. For example, Ubuntu defaults to `var/log/journal`. To determine your `systemdLogPath` configuration, see [steps below](#Steps-for-Systemd-Configuration). +K3s and RKE2 Kubernetes distributions log to journald, which is the subsystem of systemd that is used for logging. In order to collect these logs, the `systemdLogPath` needs to be defined. While the `run/log/journal` directory is used by default, some Linux distributions do not default to this path. For example, Ubuntu defaults to `var/log/journal`. To determine your `systemdLogPath` configuration, see steps below. **Steps for Systemd Configuration:**
From 59c88225045b4386d0da8aa6ffbc21b23092c3ab Mon Sep 17 00:00:00 2001 From: Jennifer Travinski Date: Mon, 30 Aug 2021 14:37:25 -0400 Subject: [PATCH 4/5] Updated code for spacing and line breaks --- .../rancher/v2.6/en/logging/helm-chart-options/_index.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/content/rancher/v2.6/en/logging/helm-chart-options/_index.md b/content/rancher/v2.6/en/logging/helm-chart-options/_index.md index a4e91eb3b34..095bd67a6ab 100644 --- a/content/rancher/v2.6/en/logging/helm-chart-options/_index.md +++ b/content/rancher/v2.6/en/logging/helm-chart-options/_index.md @@ -75,14 +75,14 @@ In Rancher logging, `SystemdLogPath` must be configured for K3s and RKE2 Kuberne K3s and RKE2 Kubernetes distributions log to journald, which is the subsystem of systemd that is used for logging. In order to collect these logs, the `systemdLogPath` needs to be defined. While the `run/log/journal` directory is used by default, some Linux distributions do not default to this path. For example, Ubuntu defaults to `var/log/journal`. To determine your `systemdLogPath` configuration, see steps below. -**Steps for Systemd Configuration:**
+**Steps for Systemd Configuration:** Run `cat /etc/systemd/journald.conf | grep -E ^\#?Storage | cut -d"=" -f2` on one of your nodes. * If `persistent` is returned, your `systemdLogPath` should be `/var/log/journal`. * If `volatile` is returned, your `systemdLogPath` should be `/run/log/journal`. -* If `auto` is returned, check if `/var/log/journal` exists.
-      - If `/var/log/journal` exists, then use `/var/log/journal`.
-      - If `/var/log/journal` does not exist, then use `/run/log/journal`. +* If `auto` is returned, check if `/var/log/journal` exists. + * If `/var/log/journal` exists, then use `/var/log/journal`. + * If `/var/log/journal` does not exist, then use `/run/log/journal`. * If any value not described above is returned, Rancher Logging will not be able to collect control plane logs. To address this issue, set `Storage=volatile` in journald.conf, reboot your machine, and set `systemdLogPath` to `/run/log/journal`. \ No newline at end of file From 0e5b60ccab68d7bd84fe7d813ab1bfc3120901e6 Mon Sep 17 00:00:00 2001 From: Jennifer Travinski Date: Mon, 30 Aug 2021 17:39:09 -0400 Subject: [PATCH 5/5] Added note on control plane node actions --- .../rancher/v2.6/en/logging/helm-chart-options/_index.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/content/rancher/v2.6/en/logging/helm-chart-options/_index.md b/content/rancher/v2.6/en/logging/helm-chart-options/_index.md index 095bd67a6ab..49643f292cb 100644 --- a/content/rancher/v2.6/en/logging/helm-chart-options/_index.md +++ b/content/rancher/v2.6/en/logging/helm-chart-options/_index.md @@ -77,12 +77,15 @@ K3s and RKE2 Kubernetes distributions log to journald, which is the subsystem of **Steps for Systemd Configuration:** - Run `cat /etc/systemd/journald.conf | grep -E ^\#?Storage | cut -d"=" -f2` on one of your nodes. - +* Run `cat /etc/systemd/journald.conf | grep -E ^\#?Storage | cut -d"=" -f2` on one of your nodes. * If `persistent` is returned, your `systemdLogPath` should be `/var/log/journal`. * If `volatile` is returned, your `systemdLogPath` should be `/run/log/journal`. * If `auto` is returned, check if `/var/log/journal` exists. * If `/var/log/journal` exists, then use `/var/log/journal`. * If `/var/log/journal` does not exist, then use `/run/log/journal`. -* If any value not described above is returned, Rancher Logging will not be able to collect control plane logs. To address this issue, set `Storage=volatile` in journald.conf, reboot your machine, and set `systemdLogPath` to `/run/log/journal`. \ No newline at end of file +> **Note:** If any value not described above is returned, Rancher Logging will not be able to collect control plane logs. To address this issue, you will need to perform the following actions on every control plane node: + +> * Set `Storage=volatile` in journald.conf. +> * Reboot your machine. +> * Set `systemdLogPath` to `/run/log/journal`. \ No newline at end of file