From b8e06db224adf852f54d4fa3e04b6f94879d0ddb Mon Sep 17 00:00:00 2001 From: Vanda ILLYES Date: Thu, 10 Sep 2026 18:54:22 +0200 Subject: [PATCH 01/17] fix(cockpit): fix outdated K8s monitoring info --- .../how-to/send-logs-from-k8s-to-cockpit.mdx | 130 ++++++++++++------ 1 file changed, 85 insertions(+), 45 deletions(-) diff --git a/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx b/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx index a6a0fdd106..82c9f0b5e8 100644 --- a/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx +++ b/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx @@ -11,101 +11,141 @@ import Requirements from '@macros/iam/requirements.mdx' import image from './assets/scaleway-cpt-k8s-terraform-logs.webp' -In this page, we will show you how to send application logs from your Kubernetes cluster to your Cockpit using either a Helm chart or deploying a Helm chart with [Terraform](https://www.terraform.io/) or [OpenTofu](https://opentofu.org/). +This tutorial shows you how to send application logs from your Kubernetes cluster to your Cockpit using either a Helm chart or deploying a Helm chart with [Terraform](https://www.terraform.io/) or [OpenTofu](https://opentofu.org/). -We will use the [k8s-monitoring](https://artifacthub.io/packages/helm/grafana/k8s-monitoring/1.6.16) Helm Chart, which installs an Alloy Daemon set to export your Kubernetes cluster's logs to your Cockpit. +We will use the [k8s-monitoring](https://artifacthub.io/packages/helm/grafana/k8s-monitoring/) Helm Chart, which installs an Alloy Daemon set to export the logs of your Kubernetes cluster to your Cockpit. - A Scaleway account logged into the [console](https://console.scaleway.com) - [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization - - [Created](/cockpit/how-to/create-external-data-sources/) a [custom data source](/cockpit/concepts/#custom-data) of the [logs type](/cockpit/concepts/#data-types) - - [Created](/cockpit/how-to/create-token/) a Cockpit token in the same region as the logs data source + - [Created](/cockpit/how-to/create-external-data-sources/) a [custom data source](/cockpit/concepts/#custom-data) of [type **Logs**](/cockpit/concepts/#data-types) + - [Created](/cockpit/how-to/create-token/) a Cockpit token in the same region as the data source of the logs - A running Kubernetes cluster containing your deployed application - [Created](/iam/how-to/create-api-keys/) an API key and retrieved your API secret key + - Installed Helm - Sending logs for Scaleway resources or personal data using an external path is a billable feature. In addition, any data that you push yourself is billed, even if you send data from Scaleway products. Refer to the [product pricing](https://www.scaleway.com/en/pricing/?tags=available,managedservices-observability-cockpit) page for more information. + Sending logs for Scaleway resources or personal data using an external path is a billable feature. In addition, any data that you push yourself is billed, even if you send data from Scaleway products. See the [product pricing](https://www.scaleway.com/en/pricing/?tags=available,managedservices-observability-cockpit) page for more information. ## Configure the Helm chart -Create a `values.yml` file to configure your Helm chart, using the example below. Make sure that you replace `$SCW_CLUSTER_NAME` with the name of your Scaleway Kubernetes cluster, `COCKPIT_CUSTOM_LOGS_DATASOURCE_URL` with the URL of your custom logs data source (you can find it under the "API URL" section in the [Data sources tab](https://console.scaleway.com/cockpit/dataSource) of the Scaleway console), and `$COCKPIT_TOKEN` with your Cockpit token. +Create a `values.yml` file to configure your Helm chart to send logs from your Kubernetes cluster to Cockpit, using the following example. + +Make sure that you replace: +- `$SCW_CLUSTER_NAME` with the name of your Scaleway Kubernetes cluster +- `COCKPIT_CUSTOM_LOGS_DATASOURCE_URL` with the URL of your custom log data source (you can find it under the "API URL" section in the [Data sources tab](https://console.scaleway.com/cockpit/dataSource) of the Scaleway console) +- `$COCKPIT_TOKEN` with your Cockpit token + ```yaml +# Cluster identification (required) cluster: name: "$SCW_CLUSTER_NAME" + global: scrape_interval: 60s + +# Destinations – a map (object) destinations: - - name: "my-cockpit-logs" - type: "loki" - protocol: "http" - logs: - enabled: true + my-cockpit-logs: + type: loki + protocol: http url: "$COCKPIT_CUSTOM_LOGS_DATASOURCE_URL/loki/api/v1/push" ##You can find your logs URL in the **Data sources** tab of the Scaleway console under the "API URL" section of the relevant data source tenantId: "$COCKPIT_TOKEN" - + logs: + enabled: true metrics: enabled: false traces: enabled: false + extraLabels: + cluster: "$SCW_CLUSTER_NAME" + +# Collectors – enable logs collector and set required mounts +collectors: + logs: + enabled: true + controller: + type: daemonset # required for nodeLogs + alloy: + mounts: + varlog: true # <-- gives Alloy access to /var/log (node logs) + dockercontainers: true # optional – lets Alloy read container logs directly + # extra: [] # you can add custom hostPath mounts here if needed + metrics: + enabled: false + traces: + enabled: false + +# Event & log collection settings – reference the destination name clusterEvents: enabled: true destinations: ["my-cockpit-logs"] -# -- Node logs. + +# Node logs nodeLogs: - enabled: true - destinations: ["my-cockpit-logs"] -# -- Pod logs. + enabled: true + destinations: ["my-cockpit-logs"] + +# Pod logs podLogs: enabled: true destinations: ["my-cockpit-logs"] volumeGatherSettings: onlyGatherNewLogLines: true - # Prevent collecting the collector own logs + # Exclude logs generated by the collector itself extraDiscoveryRules: | rule { source_labels = ["__meta_kubernetes_pod_name"] action = "drop" regex = ".*alloy-logs.*" } -# An Alloy instance for collecting log data. + +# An Alloy instance for collecting log data alloy-logs: enabled: true logging: level: info format: logfmt + alloy-singleton: enabled: true ``` + The `PodLogs` feature automatically discovers and collects logs from all pods. In the configuration above, we excluded the logs from the pod responsible for log collection itself. If you want to exclude additional pods, you can add more drop rules in the `extraDiscoveryRules` section. - - The template above is for sending logs to your Cockpit. You can also configure it to send metrics to Cockpit using this Helm chart. - Refer to our dedicated documentation to [send metrics from your cluster to Cockpit](/cockpit/how-to/send-metrics-from-k8s-to-cockpit). - + This example Helm chart is for sending logs to your Cockpit. You can also configure it to send metrics to Cockpit. For details, see our documentation about [sending metrics from your Kubernetes cluster to Cockpit](/cockpit/how-to/send-metrics-from-k8s-to-cockpit). ## Send Kubernetes logs using Helm chart -Once you have configured your `values.yml` file, you can use Helm to deploy the log-forwarding configuration to your Kubernetes cluster. Before installing the Helm chart, ensure that your `kubectl` tool is properly connected to your Kubernetes cluster. `kubectl` is the command-line tool for interacting with Kubernetes clusters. +Once you have configured your `values.yml` file, you can use Helm to deploy the log-forwarding configuration to your Kubernetes cluster. -1. [Connect](/kubernetes/how-to/connect-cluster-kubectl/) `kubectl` to your Kubernetes cluster -2. Run the commands below to install the `k8s-monitoring` Helm chart. Make sure that you replace `/your-path/to/values.yml` with the correct path where your `values.yml` file is stored. Make sure that you also replace `name-of-your-choice-for-your-log-ingester` with a clear name (ex. `alloy-logs-ingester`). - ``` - helm repo add grafana https://grafana.github.io/helm-charts - helm repo update - helm install -f /your-path/to/values.yml name-of-your-choice-for-your-log-ingester grafana/k8s-monitoring --version 2.0.21 - ``` - - The `-f` flag specifies the path to your `values.yml` file, which contains the configuration for the Helm chart.

- Helm installs the `k8s-monitoring` chart, which includes the Alloy DaemonSet configured to collect logs from your Kubernetes cluster.

- The DaemonSet ensures that a Pod is running on each node in your cluster, which collects logs and forwards them to the specified Loki endpoint in your Cockpit. -
+Before installing the Helm chart, ensure that your `kubectl` tool is properly connected to your Kubernetes cluster. `kubectl` is the command-line tool for interacting with Kubernetes clusters. + +1. [Connect `kubectl` to your Kubernetes cluster](/kubernetes/how-to/connect-cluster-kubectl/). +2. Run the following commands to install the `k8s-monitoring` Helm chart. + + Make sure that you replace: + - `/your-path/to/values.yml` with the correct path where your `values.yml` file is stored + - `name-of-your-choice-for-your-log-ingester` with a clear name (e.g., `alloy-logs-ingester`) + + ```bash + helm repo add grafana https://grafana.github.io/helm-charts + helm repo update + helm install -f /your-path/to/values.yml name-of-your-choice-for-your-log-ingester grafana/k8s-monitoring --version 4.5.0 + ``` + + + The `-f` flag specifies the path to your `values.yml` file, which contains the configuration for the Helm chart.

+ Helm installs the `k8s-monitoring` chart, which includes the Alloy DaemonSet configured to collect logs from your Kubernetes cluster.

+ The DaemonSet ensures that a Pod is running on each node in your cluster, which collects logs and forwards them to the specified Loki endpoint in your Cockpit. +
3. Optionally, run the following command to check the status of the release and ensure it was installed: ``` @@ -120,10 +160,10 @@ You can also use Terraform/OpenTofu to manage and deploy Helm charts, providing ```terraform provider "helm" { kubernetes { - host = your_k8s_cluster_host # The URL of your Kubernetes API server. - token = your_k8s_cluster_token # Authentication token to access the cluster. + host = your_k8s_cluster_host # The URL of your Kubernetes API server + token = your_k8s_cluster_token # Authentication token to access the cluster cluster_ca_certificate = base64decode( - your_k8s_cluster_ca_certificate # The cluster's CA certificate. + your_k8s_cluster_ca_certificate # The CA certificate of the cluster ) } } @@ -134,7 +174,7 @@ You can also use Terraform/OpenTofu to manage and deploy Helm charts, providing name = "name-of-your-log-ingester" repository = "https://grafana.github.io/helm-charts" chart = "k8s-monitoring" - version = "2.0.2" + version = "4.5.0" namespace = "log-ingester" create_namespace = true @@ -148,13 +188,13 @@ You can also use Terraform/OpenTofu to manage and deploy Helm charts, providing ## Explore your logs in Cockpit -1. Click **Cockpit** in the **Monitoring** section of the Scaleway [console](https://console.scaleway.com/) side menu. The **Cockpit Overview** page displays. -2. Click **Open dashboards** to open your preconfigured dashboards in Grafana. You are redirected to the Grafana website. +1. In the Scaleway [console](https://console.scaleway.com/) side menu, go to **Monitoring** > **Cockpit**. The **Overview** page opens. +2. Click **Access Grafana** to open your preconfigured dashboards in Grafana. You are redirected to the Grafana website. 3. Log in to your Grafana account. -4. Click the Grafana icon in the top left side of your screen to open the menu, then click **Explore**. -5. Select your custom data source in the search drop-down on the upper left corner of your screen. -6. In the **Labels filter** drop-down, select the `cluster` label and in the **Value** drop-down, select your cluster. -7. Optionally, click the **Clock** icon on the top right corner of your screen and filter by time range. +4. Click **Explore** in the Grafana main menu. +5. Select your custom data source in the search dropdown. +6. In the **Labels filter** dropdown, select the `cluster` label and in the **Value** dropdown, select your cluster. +7. Optionally, click the **Clock** icon and filter by time range. 8. Click **Run query** to see your logs. An output similar to the following should display. From 211061b12f5c222d801d4331f9bb19ee24c1dd2c Mon Sep 17 00:00:00 2001 From: Vanda ILLYES Date: Fri, 11 Sep 2026 14:22:40 +0200 Subject: [PATCH 02/17] fix(cockpit): fix outdated K8s monitoring info --- .../how-to/send-logs-from-k8s-to-cockpit.mdx | 510 +++++++++++++++--- 1 file changed, 450 insertions(+), 60 deletions(-) diff --git a/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx b/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx index 82c9f0b5e8..f61c158a01 100644 --- a/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx +++ b/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx @@ -31,97 +31,480 @@ We will use the [k8s-monitoring](https://artifacthub.io/packages/helm/grafana/k8 ## Configure the Helm chart -Create a `values.yml` file to configure your Helm chart to send logs from your Kubernetes cluster to Cockpit, using the following example. +Create a `values.yml` file to configure your Helm chart to send logs from your Kubernetes cluster to Cockpit, using the following example. + +Note that the example Helm chart can be configured to send both logs and metrics to your Cockpit. In this tutorial, we are interested in the logs part only. For information about setting up metrics collection, see our documentation about [sending metrics from your Kubernetes cluster to Cockpit](/cockpit/how-to/send-metrics-from-k8s-to-cockpit). Make sure that you replace: -- `$SCW_CLUSTER_NAME` with the name of your Scaleway Kubernetes cluster -- `COCKPIT_CUSTOM_LOGS_DATASOURCE_URL` with the URL of your custom log data source (you can find it under the "API URL" section in the [Data sources tab](https://console.scaleway.com/cockpit/dataSource) of the Scaleway console) -- `$COCKPIT_TOKEN` with your Cockpit token +- `CHANGE_ME_CLUSTER_NAME` with the name of your Scaleway Kubernetes cluster +- `CHANGE_ME_LOGS_PUSH_URL` with the URL of your custom log data source (you can find it under the "API URL" section in the [Data sources tab](https://console.scaleway.com/cockpit/dataSource) of the Scaleway console) +- `CHANGE_ME_TOKEN` (under `cockpit-logs`) with your Cockpit token ```yaml -# Cluster identification (required) +# Grafana k8s-monitoring Helm chart values for Scaleway Cockpit + cluster: - name: "$SCW_CLUSTER_NAME" + name: CHANGE_ME_CLUSTER_NAME global: - scrape_interval: 60s + # Talk about price + scrapeInterval: 60s -# Destinations – a map (object) -destinations: - my-cockpit-logs: - type: loki - protocol: http - url: "$COCKPIT_CUSTOM_LOGS_DATASOURCE_URL/loki/api/v1/push" ##You can find your logs URL in the **Data sources** tab of the Scaleway console under the "API URL" section of the relevant data source - tenantId: "$COCKPIT_TOKEN" - logs: +destinations: + cockpit-metrics: + type: prometheus + + #Can we remove default + metrics: enabled: true + logs: + enabled: false + traces: + enabled: false + + url: CHANGE_ME_METRICS_PUSH_URL/api/v1/push + tenantId: CHANGE_ME_TOKEN + + queueConfig: + sampleAgeLimit: 1h + + cockpit-logs: + type: loki + metrics: enabled: false + logs: + enabled: true traces: enabled: false - extraLabels: - cluster: "$SCW_CLUSTER_NAME" -# Collectors – enable logs collector and set required mounts -collectors: - logs: + url: CHANGE_ME_LOGS_PUSH_URL/loki/api/v1/push + tenantId: CHANGE_ME_TOKEN + +clusterMetrics: + enabled: true + destinations: ["cockpit-metrics"] + collector: metrics-collector + + nodeLabels: + nodePools: true + regions: true + availabilityZone: true + instanceType: true + + # Already included in Scaleway Datasource + controlPlane: + enabled: false + + kubelet: enabled: true - controller: - type: daemonset # required for nodeLogs - alloy: - mounts: - varlog: true # <-- gives Alloy access to /var/log (node logs) - dockercontainers: true # optional – lets Alloy read container logs directly - # extra: [] # you can add custom hostPath mounts here if needed - metrics: + metricsTuning: + useDefaultAllowList: false + useIntegrationAllowList: false + includeMetrics: + # Volume statistics metrics required by Grafana dashboards + - kubelet_volume_stats_capacity_bytes + - kubelet_volume_stats_inodes + - kubelet_volume_stats_inodes_used + - kubelet_volume_stats_used_bytes + + kubeletResource: + enabled: true + # Adjustments to the scraped metrics to filter the amount of data sent to storage. + metricsTuning: + useDefaultAllowList: false + useIntegrationAllowList: false + includeMetrics: + - node_cpu_usage_seconds_total + - node_memory_working_set_bytes + + kubeletProbes: + enabled: false + + cadvisor: + enabled: true + metricsTuning: + useDefaultAllowList: false + includeMetrics: + # Container metrics required by Grafana dashboards + - container_cpu_cfs_throttled_seconds_total + - container_cpu_usage_seconds_total + - container_memory_working_set_bytes + - container_network_receive_bytes_total + - container_network_receive_errors_total + - container_network_receive_packets_dropped_total + - container_network_receive_packets_total + - container_network_transmit_bytes_total + - container_network_transmit_errors_total + - container_network_transmit_packets_dropped_total + - container_network_transmit_packets_total + - container_oom_events_total + # Machine metrics + - machine_cpu_cores + - machine_memory_bytes + + # Already included in Scaleway Datasource + apiServer: + enabled: false + + kubeControllerManager: + enabled: false + + kubeDNS: + enabled: false + + kubeProxy: enabled: false - traces: + + kubeScheduler: + enabled: false + + kube-state-metrics: + enabled: true + metricsTuning: + useDefaultAllowList: false + includeMetrics: + # Kubernetes state metrics required by Grafana dashboards + - kube_configmap_info + - kube_daemonset_labels + - kube_deployment_labels + - kube_deployment_status_replicas_available + - kube_deployment_status_replicas_unavailable + - kube_endpoint_info + - kube_hpa_labels + - kube_ingress_info + - kube_namespace_created + - kube_namespace_labels + - kube_networkpolicy_labels + - kube_node_info + - kube_persistentvolumeclaim_info + - kube_pod_container_info + - kube_pod_container_resource_limits + - kube_pod_container_resource_requests + - kube_pod_container_status_last_terminated_exitcode + - kube_pod_container_status_last_terminated_reason + - kube_pod_container_status_ready + - kube_pod_container_status_restarts_total + - kube_pod_container_status_running + - kube_pod_container_status_terminated + - kube_pod_container_status_waiting + - kube_pod_info + - kube_pod_status_phase + - kube_pod_status_qos_class + - kube_pod_status_reason + - kube_secret_info + - kube_service_info + - kube_statefulset_labels + +hostMetrics: + enabled: true + destinations: ["cockpit-metrics"] + collector: metrics-collector + + linuxHosts: + enabled: true + # Adjustments to the scraped metrics to filter the amount of data sent to storage. + metricsTuning: + useDefaultAllowList: false + useIntegrationAllowList: false + includeMetrics: + # Node system metrics required by Grafana dashboards + - node_context_switches_total + - node_cpu_core_throttles_total + - node_cpu_seconds_total + - node_disk_io_now + - node_disk_read_bytes_total + - node_disk_reads_completed_total + - node_disk_writes_completed_total + - node_disk_written_bytes_total + - node_filefd_allocated + - node_filefd_maximum + - node_filesystem_avail_bytes + - node_filesystem_device_error + - node_filesystem_files + - node_filesystem_files_free + - node_filesystem_size_bytes + - node_intr_total + - node_load1 + - node_load15 + - node_load5 + - node_uname_info + - node_memory_Buffers_bytes + - node_memory_Cached_bytes + - node_memory_MemAvailable_bytes + - node_memory_MemFree_bytes + - node_memory_MemTotal_bytes + - node_memory_SwapFree_bytes + - node_memory_SwapTotal_bytes + - node_netstat_Tcp_CurrEstab + - node_network_receive_bytes_total + - node_network_receive_drop_total + - node_network_receive_errs_total + - node_network_receive_packets_total + - node_network_transmit_bytes_total + - node_network_transmit_drop_total + - node_network_transmit_errs_total + - node_network_transmit_packets_total + - node_nf_conntrack_entries + - node_nf_conntrack_entries_limit + - node_time_seconds + - node_boot_time_seconds + - node_timex_estimated_error_seconds + - node_timex_maxerror_seconds + + windowsHosts: enabled: false -# Event & log collection settings – reference the destination name clusterEvents: enabled: true - destinations: ["my-cockpit-logs"] + # We can use source : kubernetes-events instead + # extraLogProcessingStages: |- + # stage.static_labels { + # values = { + # log_source = "clusterEvents", + # } + # } + # labelsToKeep: + # - job + # - level + # - namespace + # - node + # - source + # - reason + # - log_source + destinations: ["cockpit-logs"] + collector: events-collector -# Node logs nodeLogs: enabled: true - destinations: ["my-cockpit-logs"] - -# Pod logs -podLogs: + # We can use source : journal instead + # extraLogProcessingStages: |- + # stage.static_labels { + # values = { + # log_source = "nodeLogs", + # } + # } + # labelsToKeep: + # - instance + # - job + # - level + # - name + # - unit + # - service.name + # - source + # - log_source + destinations: ["cockpit-logs"] + collector: logs-collector + +podLogsViaLoki: enabled: true - destinations: ["my-cockpit-logs"] + staticLabels: + source: "podLogs" + # Add a indexed label containing the podname from structured metadata for ease of filtering in dashboards + extraLogProcessingStages: |- + stage.labels { + values = { + pod = "pod", + } + } + destinations: ["cockpit-logs"] volumeGatherSettings: onlyGatherNewLogLines: true - # Exclude logs generated by the collector itself + # Filter pods at discovery level - only keep pods with the annotation `cockpit/logs=true` extraDiscoveryRules: | rule { - source_labels = ["__meta_kubernetes_pod_name"] - action = "drop" - regex = ".*alloy-logs.*" + source_labels = ["__meta_kubernetes_pod_annotation_cockpit_logs"] + action = "keep" + regex = "true" } -# An Alloy instance for collecting log data -alloy-logs: + # Copy Kubernetes Pod labels to log labels + labels: + app_kubernetes_io_name: app.kubernetes.io/name + container: container + instance: instance + job: job + level: level + namespace: namespace + service_name: service.name + service_namespace: service.namespace + deployment_environment: deployment.environment + deployment_environment_name: deployment.environment.name + k8s_namespace_name: k8s.namespace.name + k8s_deployment_name: k8s.deployment.name + k8s_statefulset_name: k8s.statefulset.name + k8s_daemonset_name: k8s.daemonset.name + k8s_cronjob_name: k8s.cronjob.name + k8s_job_name: k8s.job.name + k8s_node_name: k8s.node.name + source: source + pod: pod + + collector: logs-collector + +podLogsViaKubernetesApi: + enabled: false + +applicationObservability: + enabled: false + +autoInstrumentation: + enabled: false + +annotationAutodiscovery: enabled: true - logging: - level: info - format: logfmt - -alloy-singleton: + destinations: ["cockpit-metrics"] + annotations: + # -- Annotation for enabling scraping for this service or pod. Value should be either "true" or "false" + # @section -- Annotations + scrape: "cockpit/metrics" + # -- Annotation for overriding the job label + # @section -- Annotations + job: "cockpit/job" + # -- Annotation for overriding the instance label + # @section -- Annotations + instance: "cockpit/instance" + # -- Annotation for selecting the specific container to scrape. + # @section -- Annotations + metricsContainer: "cockpit/metrics.container" + # -- Annotation for setting or overriding the metrics path. If not set, it defaults to /metrics + # @section -- Annotations + metricsPath: "cockpit/metrics.path" + # -- Annotation for setting the metrics port by name. + # @section -- Annotations + metricsPortName: "cockpit/metrics.portName" + # -- Annotation for setting the metrics port by number. + # @section -- Annotations + metricsPortNumber: "cockpit/metrics.portNumber" + # -- Annotation for setting the metrics scheme, default: http. + # @section -- Annotations + metricsScheme: "cockpit/metrics.scheme" + # -- Annotation for setting `__param_` parameters when scraping. + # Example: `cockpit/metrics.param_key: "value"`. + # @section -- Annotations + metricsParam: "cockpit/metrics.param" + # -- Annotation for overriding the scrape interval for this service or pod. Value should be a duration like "15s, 1m". + # Overrides metrics.autoDiscover.scrapeInterval + # @section -- Annotations + metricsScrapeInterval: "cockpit/metrics.scrapeInterval" + # -- Annotation for overriding the scrape timeout for this service or pod. Value should be a duration like "15s, 1m". + # Overrides metrics.autoDiscover.scrapeTimeout + # @section -- Annotations + metricsScrapeTimeout: "cockpit/metrics.scrapeTimeout" + pods: + staticLabels: + metric_source: "podsAnnotationAutodiscovery" + services: + staticLabels: + metric_source: "servicesAnnotationAutodiscovery" + collector: metrics-collector + +prometheusOperatorObjects: enabled: true + destinations: ["cockpit-metrics"] + probes: + enabled: true + labelSelector: |- + match_expression { + key = "cockpit/metrics" + operator = "In" + values = ["true", "on", "yes", "1"] + } + extraMetricProcessingRules: |- + rule { + target_label = "metric_source" + replacement = "promObjectProbes" + source_labels = [] + } + + podMonitors: + enabled: true + labelSelector: |- + match_expression { + key = "cockpit/metrics" + operator = "In" + values = ["true", "on", "yes", "1"] + } + extraMetricProcessingRules: |- + rule { + target_label = "metric_source" + replacement = "promObjectPodMonitors" + source_labels = [] + } + + serviceMonitors: + enabled: true + labelSelector: |- + match_expression { + key = "cockpit/metrics" + operator = "In" + values = ["true", "on", "yes", "1"] + } + extraMetricProcessingRules: |- + rule { + target_label = "metric_source" + replacement = "promObjectServiceMonitors" + source_labels = [] + } + collector: metrics-collector + +profiling: + enabled: false + +profilesReceiver: + enabled: false + +integrations: + destinations: [] + collector: metrics-collector + +selfReporting: + enabled: false + +collectors: + metrics-collector: + presets: [clustered, statefulset] + logs-collector: + presets: [filesystem-log-reader, daemonset] + events-collector: + presets: [singleton] + +collectorCommon: + alloy: + alloy: + logging: + level: info + format: logfmt + # Easier debug, but consumes more ressources + liveDebugging: + enabled: false + enableReporting: false + +telemetryServices: + kube-state-metrics: + deploy: true + node-exporter: + deploy: true + windows-exporter: + deploy: false + kepler: + deploy: false + opencost: + deploy: false + +alloy-operator: + deploy: true + +extraObjects: [] ``` The `PodLogs` feature automatically discovers and collects logs from all pods. - In the configuration above, we excluded the logs from the pod responsible for log collection itself. - If you want to exclude additional pods, you can add more drop rules in the `extraDiscoveryRules` section. + In the example configuration, we only keep pods with the annotation `cockpit/logs=true`. + If you want to exclude certain types of pods, you can add drop rules in the `extraDiscoveryRules` section. - This example Helm chart is for sending logs to your Cockpit. You can also configure it to send metrics to Cockpit. For details, see our documentation about [sending metrics from your Kubernetes cluster to Cockpit](/cockpit/how-to/send-metrics-from-k8s-to-cockpit). - ## Send Kubernetes logs using Helm chart Once you have configured your `values.yml` file, you can use Helm to deploy the log-forwarding configuration to your Kubernetes cluster. @@ -152,6 +535,8 @@ Before installing the Helm chart, ensure that your `kubectl` tool is properly co helm list ``` +To learn how to set up log collection using the Scaleway CLI, see [Kubernetes Monitoring with Helm (Manual Installation)](https://github.com/scaleway/k8s-monitoring/tree/main/helm-only). + ## Send Kubernetes logs using Helm chart with Terraform/OpenTofu You can also use Terraform/OpenTofu to manage and deploy Helm charts, providing you with more automation and consistency to manage your Kubernetes resources. @@ -159,16 +544,14 @@ You can also use Terraform/OpenTofu to manage and deploy Helm charts, providing 1. Create a `provider.tf` file and paste the following template to set up the Helm Terraform/OpenTofu provider: ```terraform provider "helm" { - kubernetes { - host = your_k8s_cluster_host # The URL of your Kubernetes API server - token = your_k8s_cluster_token # Authentication token to access the cluster - cluster_ca_certificate = base64decode( - your_k8s_cluster_ca_certificate # The CA certificate of the cluster - ) + kubernetes = { + host = "your_k8s_cluster_host" # The URL of your Kubernetes API server + token = "your_k8s_cluster_token" # Authentication token to access the cluster + cluster_ca_certificate = base64decode("your_k8s_cluster_ca_certificate") # The CA certificate of the cluster } } ``` -2. Create a `maint.tf` file and paste the following template to create a Helm release resource. Make sure that you replace `/your-path/to/values.yml` with the actual path to your values file. +2. Create a `maint.tf` file and paste the following template to create a Helm release resource. Make sure that you replace `your-path/to/values.yml` with the actual path to your values file. ``` resource "helm_release" "alloy" { name = "name-of-your-log-ingester" @@ -178,7 +561,7 @@ You can also use Terraform/OpenTofu to manage and deploy Helm charts, providing namespace = "log-ingester" create_namespace = true - values = [file("/your-path/to/values.yml")] + values = [file("your-path/to/values.yml")] } ``` 3. Save your changes. @@ -186,6 +569,11 @@ You can also use Terraform/OpenTofu to manage and deploy Helm charts, providing 5. Run `terraform apply` to apply your configuration. 6. Type `yes` when prompted to confirm the actions. +For detailed information about how to set up a complete monitoring stack (logs and metrics) using Terraform, see: + +- [Add Kubernetes Monitoring to an Existing Kapsule Cluster (Terraform)](https://github.com/scaleway/k8s-monitoring/tree/main/terraform-existing-cluster) +- [Complete Kubernetes Monitoring Setup on Scaleway (Terraform)](https://github.com/scaleway/k8s-monitoring/tree/main/terraform-complete) + ## Explore your logs in Cockpit 1. In the Scaleway [console](https://console.scaleway.com/) side menu, go to **Monitoring** > **Cockpit**. The **Overview** page opens. @@ -198,3 +586,5 @@ You can also use Terraform/OpenTofu to manage and deploy Helm charts, providing 8. Click **Run query** to see your logs. An output similar to the following should display. + + From 9e272cbd1c97005217e26ebfabb7699d86a0535b Mon Sep 17 00:00:00 2001 From: Vanda ILLYES Date: Fri, 11 Sep 2026 15:43:40 +0200 Subject: [PATCH 03/17] fix(cockpit): fix outdated K8s monitoring info --- .../how-to/send-logs-from-k8s-to-cockpit.mdx | 35 +++++++++++++------ 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx b/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx index f61c158a01..1fa9fe4beb 100644 --- a/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx +++ b/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx @@ -1,9 +1,9 @@ --- title: How to send logs from your Kubernetes cluster to your Cockpit -description: Learn how to send your Pod logs to your Cockpit using Scaleway's comprehensive guide. This tutorial covers sending Kubernetes Pods logs to Scaleway's Cockpit for centralized monitoring and analysis using Grafana, ensuring efficient monitoring and log analysis in your infrastructure. +description: Learn how to send the logs of your pods to your Cockpit using Scaleway's comprehensive guide. This tutorial covers sending Kubernetes pod logs to Scaleway Cockpit for centralized monitoring and analysis using Grafana, ensuring efficient monitoring and log analysis in your infrastructure. tags: kubernetes cockpit logs observability monitoring cluster dates: - validation: 2025-08-20 + validation: 2026-09-11 posted: 2025-01-20 --- import Requirements from '@macros/iam/requirements.mdx' @@ -13,7 +13,7 @@ import image from './assets/scaleway-cpt-k8s-terraform-logs.webp' This tutorial shows you how to send application logs from your Kubernetes cluster to your Cockpit using either a Helm chart or deploying a Helm chart with [Terraform](https://www.terraform.io/) or [OpenTofu](https://opentofu.org/). -We will use the [k8s-monitoring](https://artifacthub.io/packages/helm/grafana/k8s-monitoring/) Helm Chart, which installs an Alloy Daemon set to export the logs of your Kubernetes cluster to your Cockpit. +We will use the [k8s-monitoring](https://artifacthub.io/packages/helm/grafana/k8s-monitoring/) Helm chart, which installs an Alloy Daemon set to export the logs of your Kubernetes cluster to your Cockpit. @@ -527,7 +527,7 @@ Before installing the Helm chart, ensure that your `kubectl` tool is properly co The `-f` flag specifies the path to your `values.yml` file, which contains the configuration for the Helm chart.

Helm installs the `k8s-monitoring` chart, which includes the Alloy DaemonSet configured to collect logs from your Kubernetes cluster.

- The DaemonSet ensures that a Pod is running on each node in your cluster, which collects logs and forwards them to the specified Loki endpoint in your Cockpit. + The DaemonSet ensures that a pod is running on each node in your cluster, which collects logs and forwards them to the specified Loki endpoint in your Cockpit.
3. Optionally, run the following command to check the status of the release and ensure it was installed: @@ -541,17 +541,31 @@ To learn how to set up log collection using the Scaleway CLI, see [Kubernetes Mo You can also use Terraform/OpenTofu to manage and deploy Helm charts, providing you with more automation and consistency to manage your Kubernetes resources. -1. Create a `provider.tf` file and paste the following template to set up the Helm Terraform/OpenTofu provider: +1. Create a `provider.tf` file and paste the following template to set up the Helm Terraform/OpenTofu provider. + + Make sure that you replace: + + - `your_k8s_cluster_host` with the URL of your Kubernetes API server + - `your_k8s_cluster_token` with the authentication token to access the cluster + - `your_k8s_cluster_ca_certificate` with the CA certificate of the cluster + + ```terraform provider "helm" { kubernetes = { - host = "your_k8s_cluster_host" # The URL of your Kubernetes API server - token = "your_k8s_cluster_token" # Authentication token to access the cluster - cluster_ca_certificate = base64decode("your_k8s_cluster_ca_certificate") # The CA certificate of the cluster + host = "your_k8s_cluster_host" + token = "your_k8s_cluster_token" + cluster_ca_certificate = base64decode("your_k8s_cluster_ca_certificate") } } ``` -2. Create a `maint.tf` file and paste the following template to create a Helm release resource. Make sure that you replace `your-path/to/values.yml` with the actual path to your values file. + +2. Create a `maint.tf` file and paste the following template to create a Helm release resource. + + Make sure that you replace: + - `/your-path/to/values.yml` with the actual path to your values file + - `name-of-your-log-ingester` with your chosen name of your log ingester (e.g., `alloy-logs-ingester`) + ``` resource "helm_release" "alloy" { name = "name-of-your-log-ingester" @@ -561,9 +575,10 @@ You can also use Terraform/OpenTofu to manage and deploy Helm charts, providing namespace = "log-ingester" create_namespace = true - values = [file("your-path/to/values.yml")] + values = [file("/your-path/to/values.yml")] } ``` + 3. Save your changes. 4. Run `terraform init` to initialize your Terraform/OpenTofu configuration and download any necessary providers. 5. Run `terraform apply` to apply your configuration. From 7a9e4b049cf60397a6a5bda0e4df365f05df15ca Mon Sep 17 00:00:00 2001 From: Vanda ILLYES Date: Fri, 11 Sep 2026 15:48:48 +0200 Subject: [PATCH 04/17] fix(cockpit): fix outdated K8s monitoring info --- .../how-to/send-logs-from-k8s-to-cockpit.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx b/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx index 1fa9fe4beb..e5294457e8 100644 --- a/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx +++ b/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx @@ -535,8 +535,6 @@ Before installing the Helm chart, ensure that your `kubectl` tool is properly co helm list ``` -To learn how to set up log collection using the Scaleway CLI, see [Kubernetes Monitoring with Helm (Manual Installation)](https://github.com/scaleway/k8s-monitoring/tree/main/helm-only). - ## Send Kubernetes logs using Helm chart with Terraform/OpenTofu You can also use Terraform/OpenTofu to manage and deploy Helm charts, providing you with more automation and consistency to manage your Kubernetes resources. @@ -584,11 +582,6 @@ You can also use Terraform/OpenTofu to manage and deploy Helm charts, providing 5. Run `terraform apply` to apply your configuration. 6. Type `yes` when prompted to confirm the actions. -For detailed information about how to set up a complete monitoring stack (logs and metrics) using Terraform, see: - -- [Add Kubernetes Monitoring to an Existing Kapsule Cluster (Terraform)](https://github.com/scaleway/k8s-monitoring/tree/main/terraform-existing-cluster) -- [Complete Kubernetes Monitoring Setup on Scaleway (Terraform)](https://github.com/scaleway/k8s-monitoring/tree/main/terraform-complete) - ## Explore your logs in Cockpit 1. In the Scaleway [console](https://console.scaleway.com/) side menu, go to **Monitoring** > **Cockpit**. The **Overview** page opens. @@ -602,4 +595,11 @@ For detailed information about how to set up a complete monitoring stack (logs a +## Related resources + +To learn how to set up log collection using the Scaleway CLI, see: +- [Kubernetes Monitoring with Helm (Manual Installation)](https://github.com/scaleway/k8s-monitoring/tree/main/helm-only) +For detailed information about how to set up a complete monitoring stack (logs and metrics) using Terraform, see: +- [Add Kubernetes Monitoring to an Existing Kapsule Cluster (Terraform)](https://github.com/scaleway/k8s-monitoring/tree/main/terraform-existing-cluster) +- [Complete Kubernetes Monitoring Setup on Scaleway (Terraform)](https://github.com/scaleway/k8s-monitoring/tree/main/terraform-complete) From fa7f0f06311709a314eb0e267995af222af1e2d6 Mon Sep 17 00:00:00 2001 From: vanda-scw Date: Fri, 11 Sep 2026 16:17:08 +0200 Subject: [PATCH 05/17] Apply editorial suggestion Co-authored-by: mmfrayssens --- pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx b/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx index e5294457e8..3bcba08a69 100644 --- a/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx +++ b/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx @@ -33,7 +33,7 @@ We will use the [k8s-monitoring](https://artifacthub.io/packages/helm/grafana/k8 Create a `values.yml` file to configure your Helm chart to send logs from your Kubernetes cluster to Cockpit, using the following example. -Note that the example Helm chart can be configured to send both logs and metrics to your Cockpit. In this tutorial, we are interested in the logs part only. For information about setting up metrics collection, see our documentation about [sending metrics from your Kubernetes cluster to Cockpit](/cockpit/how-to/send-metrics-from-k8s-to-cockpit). +Note that the example Helm chart can be configured to send both logs and metrics to your Cockpit. In this tutorial, we are interested in the logs part only. For information about setting up metrics collection, see the [sending metrics from your Kubernetes cluster to Cockpit](/cockpit/how-to/send-metrics-from-k8s-to-cockpit) article. Make sure that you replace: - `CHANGE_ME_CLUSTER_NAME` with the name of your Scaleway Kubernetes cluster From 6537dd7f8aaa88d144900d6467ca957c46314f3e Mon Sep 17 00:00:00 2001 From: vanda-scw Date: Fri, 11 Sep 2026 16:17:22 +0200 Subject: [PATCH 06/17] Apply editorial suggestion Co-authored-by: mmfrayssens --- pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx b/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx index 3bcba08a69..cc32888832 100644 --- a/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx +++ b/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx @@ -35,7 +35,7 @@ Create a `values.yml` file to configure your Helm chart to send logs from your K Note that the example Helm chart can be configured to send both logs and metrics to your Cockpit. In this tutorial, we are interested in the logs part only. For information about setting up metrics collection, see the [sending metrics from your Kubernetes cluster to Cockpit](/cockpit/how-to/send-metrics-from-k8s-to-cockpit) article. -Make sure that you replace: +Ensure that you replace: - `CHANGE_ME_CLUSTER_NAME` with the name of your Scaleway Kubernetes cluster - `CHANGE_ME_LOGS_PUSH_URL` with the URL of your custom log data source (you can find it under the "API URL" section in the [Data sources tab](https://console.scaleway.com/cockpit/dataSource) of the Scaleway console) - `CHANGE_ME_TOKEN` (under `cockpit-logs`) with your Cockpit token From 7d6971df16aeed0f45985abae1184114ddc12c41 Mon Sep 17 00:00:00 2001 From: vanda-scw Date: Fri, 11 Sep 2026 16:17:57 +0200 Subject: [PATCH 07/17] Apply editorial suggestion Co-authored-by: mmfrayssens --- pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx b/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx index cc32888832..5ca1fc410a 100644 --- a/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx +++ b/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx @@ -501,7 +501,7 @@ extraObjects: [] The `PodLogs` feature automatically discovers and collects logs from all pods. - In the example configuration, we only keep pods with the annotation `cockpit/logs=true`. +The example configuration only keeps pods with the annotation `cockpit/logs=true`. If you want to exclude certain types of pods, you can add drop rules in the `extraDiscoveryRules` section. From 6ac2028a6b9872e821755fac8a12fb5331a65960 Mon Sep 17 00:00:00 2001 From: vanda-scw Date: Fri, 11 Sep 2026 16:18:12 +0200 Subject: [PATCH 08/17] Apply editorial suggestion Co-authored-by: mmfrayssens --- pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx b/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx index 5ca1fc410a..61aee9d6a3 100644 --- a/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx +++ b/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx @@ -514,7 +514,7 @@ Before installing the Helm chart, ensure that your `kubectl` tool is properly co 1. [Connect `kubectl` to your Kubernetes cluster](/kubernetes/how-to/connect-cluster-kubectl/). 2. Run the following commands to install the `k8s-monitoring` Helm chart. - Make sure that you replace: + Ensure that you replace: - `/your-path/to/values.yml` with the correct path where your `values.yml` file is stored - `name-of-your-choice-for-your-log-ingester` with a clear name (e.g., `alloy-logs-ingester`) From 171a13acf1d0fb29491b16dff22927a7f21a56da Mon Sep 17 00:00:00 2001 From: Vanda ILLYES Date: Fri, 11 Sep 2026 16:34:15 +0200 Subject: [PATCH 09/17] fix(cockpit): implement peer review comments --- .../how-to/send-logs-from-k8s-to-cockpit.mdx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx b/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx index 61aee9d6a3..dcae13ce06 100644 --- a/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx +++ b/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx @@ -1,6 +1,6 @@ --- title: How to send logs from your Kubernetes cluster to your Cockpit -description: Learn how to send the logs of your pods to your Cockpit using Scaleway's comprehensive guide. This tutorial covers sending Kubernetes pod logs to Scaleway Cockpit for centralized monitoring and analysis using Grafana, ensuring efficient monitoring and log analysis in your infrastructure. +description: Learn how to stream Kubernetes pod logs to Scaleway Cockpit using Grafana to enable efficient, centralized log monitoring. tags: kubernetes cockpit logs observability monitoring cluster dates: validation: 2026-09-11 @@ -11,9 +11,9 @@ import Requirements from '@macros/iam/requirements.mdx' import image from './assets/scaleway-cpt-k8s-terraform-logs.webp' -This tutorial shows you how to send application logs from your Kubernetes cluster to your Cockpit using either a Helm chart or deploying a Helm chart with [Terraform](https://www.terraform.io/) or [OpenTofu](https://opentofu.org/). +This article shows you how to send application logs from your Kubernetes cluster to your Cockpit using either a Helm chart or deploying a Helm chart with [Terraform](https://www.terraform.io/) or [OpenTofu](https://opentofu.org/). -We will use the [k8s-monitoring](https://artifacthub.io/packages/helm/grafana/k8s-monitoring/) Helm chart, which installs an Alloy Daemon set to export the logs of your Kubernetes cluster to your Cockpit. +You will use the [k8s-monitoring](https://artifacthub.io/packages/helm/grafana/k8s-monitoring/) Helm chart, which installs an Alloy Daemon set to export the logs of your Kubernetes cluster to your Cockpit. @@ -33,7 +33,7 @@ We will use the [k8s-monitoring](https://artifacthub.io/packages/helm/grafana/k8 Create a `values.yml` file to configure your Helm chart to send logs from your Kubernetes cluster to Cockpit, using the following example. -Note that the example Helm chart can be configured to send both logs and metrics to your Cockpit. In this tutorial, we are interested in the logs part only. For information about setting up metrics collection, see the [sending metrics from your Kubernetes cluster to Cockpit](/cockpit/how-to/send-metrics-from-k8s-to-cockpit) article. +Note that the example Helm chart can be configured to send both logs and metrics to your Cockpit. In this article, we are interested in the logs part only. For information about setting up metrics collection, see the [sending metrics from your Kubernetes cluster to Cockpit](/cockpit/how-to/send-metrics-from-k8s-to-cockpit) article. Ensure that you replace: - `CHANGE_ME_CLUSTER_NAME` with the name of your Scaleway Kubernetes cluster @@ -524,11 +524,11 @@ Before installing the Helm chart, ensure that your `kubectl` tool is properly co helm install -f /your-path/to/values.yml name-of-your-choice-for-your-log-ingester grafana/k8s-monitoring --version 4.5.0 ``` - - The `-f` flag specifies the path to your `values.yml` file, which contains the configuration for the Helm chart.

- Helm installs the `k8s-monitoring` chart, which includes the Alloy DaemonSet configured to collect logs from your Kubernetes cluster.

- The DaemonSet ensures that a pod is running on each node in your cluster, which collects logs and forwards them to the specified Loki endpoint in your Cockpit. -
+ + The `-f` flag specifies the path to your `values.yml` file, which contains the configuration for the Helm chart.

+ Helm installs the `k8s-monitoring` chart, which includes the Alloy DaemonSet configured to collect logs from your Kubernetes cluster.

+ The DaemonSet ensures that a pod is running on each node in your cluster, which collects logs and forwards them to the specified Loki endpoint in your Cockpit. + 3. Optionally, run the following command to check the status of the release and ensure it was installed: ``` From d637e0ad61bb21b230c783242aa5092afb6d4ce3 Mon Sep 17 00:00:00 2001 From: Vanda ILLYES Date: Fri, 11 Sep 2026 16:46:58 +0200 Subject: [PATCH 10/17] fix(cockpit): implement peer review comments --- pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx b/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx index dcae13ce06..ea91f5bad0 100644 --- a/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx +++ b/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx @@ -11,7 +11,7 @@ import Requirements from '@macros/iam/requirements.mdx' import image from './assets/scaleway-cpt-k8s-terraform-logs.webp' -This article shows you how to send application logs from your Kubernetes cluster to your Cockpit using either a Helm chart or deploying a Helm chart with [Terraform](https://www.terraform.io/) or [OpenTofu](https://opentofu.org/). +Follow this procedure to send application logs from your Kubernetes cluster to your Cockpit. You can use Helm directly, or deploy the Helm chart with with [Terraform](https://www.terraform.io/) or [OpenTofu](https://opentofu.org/). You will use the [k8s-monitoring](https://artifacthub.io/packages/helm/grafana/k8s-monitoring/) Helm chart, which installs an Alloy Daemon set to export the logs of your Kubernetes cluster to your Cockpit. From d9f442446984af080827f2cd07effd1644eb6b99 Mon Sep 17 00:00:00 2001 From: vanda-scw Date: Fri, 11 Sep 2026 17:02:35 +0200 Subject: [PATCH 11/17] Apply editorial suggestion Co-authored-by: Firdevs Arslan --- pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx b/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx index ea91f5bad0..08b4c82137 100644 --- a/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx +++ b/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx @@ -33,7 +33,7 @@ You will use the [k8s-monitoring](https://artifacthub.io/packages/helm/grafana/k Create a `values.yml` file to configure your Helm chart to send logs from your Kubernetes cluster to Cockpit, using the following example. -Note that the example Helm chart can be configured to send both logs and metrics to your Cockpit. In this article, we are interested in the logs part only. For information about setting up metrics collection, see the [sending metrics from your Kubernetes cluster to Cockpit](/cockpit/how-to/send-metrics-from-k8s-to-cockpit) article. +The example Helm chart can be configured to send both logs and metrics to your Cockpit. In this article, we are interested in the logs part only. For information about setting up metrics collection, see the [sending metrics from your Kubernetes cluster to Cockpit](/cockpit/how-to/send-metrics-from-k8s-to-cockpit) article. Ensure that you replace: - `CHANGE_ME_CLUSTER_NAME` with the name of your Scaleway Kubernetes cluster From 8d174085a57137ca76d29488c13c42d113c7bbbe Mon Sep 17 00:00:00 2001 From: vanda-scw Date: Fri, 11 Sep 2026 17:03:29 +0200 Subject: [PATCH 12/17] Apply editorial suggestion Co-authored-by: mmfrayssens --- pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx b/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx index 08b4c82137..87216df8ef 100644 --- a/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx +++ b/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx @@ -529,7 +529,7 @@ Before installing the Helm chart, ensure that your `kubectl` tool is properly co Helm installs the `k8s-monitoring` chart, which includes the Alloy DaemonSet configured to collect logs from your Kubernetes cluster.

The DaemonSet ensures that a pod is running on each node in your cluster, which collects logs and forwards them to the specified Loki endpoint in your Cockpit. -3. Optionally, run the following command to check the status of the release and ensure it was installed: +3. (Optional) Run the following command to check the status of the release and ensure it was installed: ``` helm list From 2ab37471b97be312dd93080453dd156d85395cab Mon Sep 17 00:00:00 2001 From: vanda-scw Date: Fri, 11 Sep 2026 17:04:02 +0200 Subject: [PATCH 13/17] Apply editorial suggestion Co-authored-by: mmfrayssens --- pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx b/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx index 87216df8ef..d36160f926 100644 --- a/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx +++ b/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx @@ -541,7 +541,7 @@ You can also use Terraform/OpenTofu to manage and deploy Helm charts, providing 1. Create a `provider.tf` file and paste the following template to set up the Helm Terraform/OpenTofu provider. - Make sure that you replace: + Ensure that you replace: - `your_k8s_cluster_host` with the URL of your Kubernetes API server - `your_k8s_cluster_token` with the authentication token to access the cluster From 66286a84205dc8efafd8367fe1794b3747243ccb Mon Sep 17 00:00:00 2001 From: vanda-scw Date: Fri, 11 Sep 2026 17:04:37 +0200 Subject: [PATCH 14/17] Apply editorial suggestion Co-authored-by: mmfrayssens --- pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx b/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx index d36160f926..4b2685093f 100644 --- a/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx +++ b/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx @@ -590,7 +590,7 @@ You can also use Terraform/OpenTofu to manage and deploy Helm charts, providing 4. Click **Explore** in the Grafana main menu. 5. Select your custom data source in the search dropdown. 6. In the **Labels filter** dropdown, select the `cluster` label and in the **Value** dropdown, select your cluster. -7. Optionally, click the **Clock** icon and filter by time range. +7. (Optional) Click the **Clock** icon and filter by time range. 8. Click **Run query** to see your logs. An output similar to the following should display. From e277312c3aba1604af3f6453b9da587cc25bac95 Mon Sep 17 00:00:00 2001 From: vanda-scw Date: Fri, 11 Sep 2026 17:31:40 +0200 Subject: [PATCH 15/17] Apply editorial suggestion Co-authored-by: Paul --- pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx b/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx index 4b2685093f..06ee0d9533 100644 --- a/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx +++ b/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx @@ -476,7 +476,7 @@ collectorCommon: logging: level: info format: logfmt - # Easier debug, but consumes more ressources + # Easier debug, but consumes more resources liveDebugging: enabled: false enableReporting: false From 85d3e417e440d9d05afb3d7c543440de4c6fcb71 Mon Sep 17 00:00:00 2001 From: Vanda ILLYES Date: Fri, 11 Sep 2026 17:48:01 +0200 Subject: [PATCH 16/17] fix(cockpit): improve comments in code --- .../how-to/send-logs-from-k8s-to-cockpit.mdx | 28 +++++++++---------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx b/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx index 06ee0d9533..695e8335b7 100644 --- a/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx +++ b/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx @@ -48,14 +48,12 @@ cluster: name: CHANGE_ME_CLUSTER_NAME global: - # Talk about price scrapeInterval: 60s destinations: cockpit-metrics: type: prometheus - #Can we remove default metrics: enabled: true logs: @@ -93,7 +91,7 @@ clusterMetrics: availabilityZone: true instanceType: true - # Already included in Scaleway Datasource + # Already included in Scaleway data source controlPlane: enabled: false @@ -111,7 +109,7 @@ clusterMetrics: kubeletResource: enabled: true - # Adjustments to the scraped metrics to filter the amount of data sent to storage. + # Adjustments to the scraped metrics to filter the amount of data sent to storage metricsTuning: useDefaultAllowList: false useIntegrationAllowList: false @@ -144,7 +142,7 @@ clusterMetrics: - machine_cpu_cores - machine_memory_bytes - # Already included in Scaleway Datasource + # Already included in Scaleway data source apiServer: enabled: false @@ -204,7 +202,7 @@ hostMetrics: linuxHosts: enabled: true - # Adjustments to the scraped metrics to filter the amount of data sent to storage. + # Adjustments to the scraped metrics to filter the amount of data sent to storage metricsTuning: useDefaultAllowList: false useIntegrationAllowList: false @@ -301,7 +299,7 @@ podLogsViaLoki: enabled: true staticLabels: source: "podLogs" - # Add a indexed label containing the podname from structured metadata for ease of filtering in dashboards + # Add an indexed label containing the podname from structured metadata for ease of filtering in dashboards extraLogProcessingStages: |- stage.labels { values = { @@ -365,30 +363,30 @@ annotationAutodiscovery: # -- Annotation for overriding the instance label # @section -- Annotations instance: "cockpit/instance" - # -- Annotation for selecting the specific container to scrape. + # -- Annotation for selecting the specific container to scrape # @section -- Annotations metricsContainer: "cockpit/metrics.container" # -- Annotation for setting or overriding the metrics path. If not set, it defaults to /metrics # @section -- Annotations metricsPath: "cockpit/metrics.path" - # -- Annotation for setting the metrics port by name. + # -- Annotation for setting the metrics port by name # @section -- Annotations metricsPortName: "cockpit/metrics.portName" - # -- Annotation for setting the metrics port by number. + # -- Annotation for setting the metrics port by number # @section -- Annotations metricsPortNumber: "cockpit/metrics.portNumber" - # -- Annotation for setting the metrics scheme, default: http. + # -- Annotation for setting the metrics scheme, default: http # @section -- Annotations metricsScheme: "cockpit/metrics.scheme" - # -- Annotation for setting `__param_` parameters when scraping. - # Example: `cockpit/metrics.param_key: "value"`. + # -- Annotation for setting `__param_` parameters when scraping + # Example: `cockpit/metrics.param_key: "value"` # @section -- Annotations metricsParam: "cockpit/metrics.param" - # -- Annotation for overriding the scrape interval for this service or pod. Value should be a duration like "15s, 1m". + # -- Annotation for overriding the scrape interval for this service or pod. Value should be a duration like "15s, 1m" # Overrides metrics.autoDiscover.scrapeInterval # @section -- Annotations metricsScrapeInterval: "cockpit/metrics.scrapeInterval" - # -- Annotation for overriding the scrape timeout for this service or pod. Value should be a duration like "15s, 1m". + # -- Annotation for overriding the scrape timeout for this service or pod. Value should be a duration like "15s, 1m" # Overrides metrics.autoDiscover.scrapeTimeout # @section -- Annotations metricsScrapeTimeout: "cockpit/metrics.scrapeTimeout" From 9f99609b09c294154a0c47a8ee2adf3a2bf00f3f Mon Sep 17 00:00:00 2001 From: vanda-scw Date: Fri, 11 Sep 2026 17:49:20 +0200 Subject: [PATCH 17/17] Apply review suggestion (editorial) Co-authored-by: Paul --- pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx b/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx index 695e8335b7..90d6ac4bc1 100644 --- a/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx +++ b/pages/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx @@ -11,7 +11,7 @@ import Requirements from '@macros/iam/requirements.mdx' import image from './assets/scaleway-cpt-k8s-terraform-logs.webp' -Follow this procedure to send application logs from your Kubernetes cluster to your Cockpit. You can use Helm directly, or deploy the Helm chart with with [Terraform](https://www.terraform.io/) or [OpenTofu](https://opentofu.org/). +Follow this procedure to send application logs from your Kubernetes cluster to your Cockpit. You can use Helm directly, or deploy the Helm chart with [Terraform](https://www.terraform.io/) or [OpenTofu](https://opentofu.org/). You will use the [k8s-monitoring](https://artifacthub.io/packages/helm/grafana/k8s-monitoring/) Helm chart, which installs an Alloy Daemon set to export the logs of your Kubernetes cluster to your Cockpit.