From 9933eb6eafde6bd8be2432bd283b4cc8bfefac38 Mon Sep 17 00:00:00 2001 From: Benedikt Rollik <brollik@online.net> Date: Thu, 30 Jan 2025 10:48:35 +0100 Subject: [PATCH] feat(k8s): update docs --- .../monitor-data-plane-with-cockpit.mdx | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/pages/kubernetes/how-to/monitor-data-plane-with-cockpit.mdx b/pages/kubernetes/how-to/monitor-data-plane-with-cockpit.mdx index bb380f9807..feb6147f5e 100644 --- a/pages/kubernetes/how-to/monitor-data-plane-with-cockpit.mdx +++ b/pages/kubernetes/how-to/monitor-data-plane-with-cockpit.mdx @@ -1,9 +1,9 @@ --- meta: - title: How to monitor your Kubernetes Kapsule data plane with Cockpit + title: How to monitor your Kubernetes Kapsule cluster with Cockpit using Promtail description: This page explains how to integrate Kubernetes container logs with Scaleway Cockpit using Promtail content: - h1: How to monitor your Kubernetes Kapsule data plane with Cockpit + h1: How to monitor your Kubernetes Kapsule cluster with Cockpit using Promtail paragraph: This page explains how to integrate Kubernetes container logs with Scaleway Cockpit using Promtail categories: - iot-hub @@ -53,8 +53,9 @@ The system leverages **Promtail** (a lightweight log collector) running on your 1. **Promtail** can collect logs from: - **Container stdout/stderr** (pods) - **systemd journal** (e.g., `kubelet.service`) -2. **Log data** is transmitted to **Cockpit** (Loki). -3. **Cockpit** stores and indexes these logs. +2. The app automatically creates a custom datasource called `kubernetes-logs` and a Cockpit token with push logs permission. +3. **Log data** is transmitted to **Cockpit** (Loki). +4. **Cockpit** stores and indexes these logs. ## Step-by-step: Enabling container logs in Cockpit @@ -74,7 +75,7 @@ You can use Scaleway’s **[Easy Deploy](/kubernetes/how-to/enable-easy-deploy/) cockpit_promtail_scrape_config_journal: "kubelet.service,kube-proxy.service" ``` </Message> - + ### Example Promtail configuration Below is a simplified snippet of the configuration that Easy Deploy generates by default: ```yaml @@ -104,13 +105,15 @@ extraVolumes: Once Promtail is running: -1. Go to **Cockpit**, then **Kubernetes Cluster Pod Logs** (or open your own Grafana connected to Cockpit). -2. **Filter** by: +1. Go to the **Cockpit** section of the Scaleway console, then click **Open dashboards**. +2. Log into Grafana using your [Cockpit credentials](/cockpit/how-to/retrieve-grafana-credentials/). +3. In Grafana's menu, go to dashboards and select **Kubernetes Cluster Pod Log**. +4. **Filter** by: - `Datasource` which is automatically created upon deployment, and visible in the Cockpit console - `Cluster Name` ( e.g. `my-kapsule-cluster`) - `namespace`, `pod`, or `container` labels to isolate specific workloads - **Time range** to limit how far back in history you want to query -3. **Analyze** logs in real-time or historical mode to troubleshoot issues, watch for errors, or track performance. +5. **Analyze** logs in real-time or historical mode to troubleshoot issues, watch for errors, or track performance. ## Usage and pricing