From 045bab656ae9259b53e4567e4ee23bbad85911d9 Mon Sep 17 00:00:00 2001 From: Bibas Date: Fri, 27 Dec 2024 11:33:21 +0100 Subject: [PATCH 01/13] docs(cockpit): added documentation on how to add custom logs from k8s cluster to cockpit int-add-observability --- .../how-to/send-log-from-k8s-to-cockpit.mdx | 144 ++++++++++++++++++ 1 file changed, 144 insertions(+) create mode 100644 observability/cockpit/how-to/send-log-from-k8s-to-cockpit.mdx diff --git a/observability/cockpit/how-to/send-log-from-k8s-to-cockpit.mdx b/observability/cockpit/how-to/send-log-from-k8s-to-cockpit.mdx new file mode 100644 index 0000000000..5f3e3635b7 --- /dev/null +++ b/observability/cockpit/how-to/send-log-from-k8s-to-cockpit.mdx @@ -0,0 +1,144 @@ +--- +meta: + 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. +content: + h1: How to send logs from your Kubernetes cluster to your Cockpit + paragraph: 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. +tags: kubernetes cockpit logs observability monitoring cluster +categories: + - observability +dates: + validation: TBD + posted: TBD +--- + +This page shows you how to send your application logs created in a Kubernetes cluster to your Cockpit either by using a Helm Chart or by deploying this Helm chart with Terraform. + +In this example, we use [k8s-monitoring](https://artifacthub.io/packages/helm/grafana/k8s-monitoring/1.6.16) which install an Alloy Daemon set to your Kubernetes Cluster to export logs to your Cockpit. + + + + - A Scaleway account logged into the [console](https://console.scaleway.com) + - [Owner](/identity-and-access-management/iam/concepts/#owner) status or [IAM permissions](/identity-and-access-management/iam/concepts/#permission) allowing you to perform actions in the intended Organization + - [Created](/observability/cockpit/how-to/create-external-data-sources/) an custom external data source + - [Created](/observability/cockpit/how-to/create-token/) a Cockpit Token for the same region as the data source + - A running Kubernetes Cluster containing your application deployed + - For Terraform : [Created](/identity-and-access-management/iam/how-to/create-api-keys/) an API key and retrieved your API secret key + + + + + - 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) for more information. + + +## Configure the Helm chart + +Create a `values.yml` file to configure your Helm chart, here is an example: + + + Do not forget to replace: + - `$SCW_CLUSTER_NAME` by the name of your Scaleway Cluster + - `$COCKPIT_CUSTOM_DATASOURCE_HOST` by the hostname of your custom endpoint (do not include the `/loki/api/v1/push` ) + - `$COCKPIT_TOKEN` by your Cockpit Token + + +```yaml +cluster: + name: "$SCW_CLUSTER_NAME" +externalServices: + loki: + host: "$COCKPIT_CUSTOM_DATASOURCE_HOST" + tenantId: "$COCKPIT_TOKEN" + authMode: none + externalLabels: { + cluster: "$SCW_CLUSTER_NAME" + } + +logs: + enabled: true + pod_logs: + enabled: true + discovery: "all" + annotation: "cockpit.scw.cloud/logs.autogather" + # -- Only capture logs from pods in these namespaces (`[]` means all namespaces). + namespaces: [] + # -- Do not capture logs from any pods in these namespaces. + excludeNamespaces: [] + +metrics: + enabled: false +kube-state-metrics: + enabled: false +prometheus-node-exporter: + enabled: false +prometheus-operator-crds: + enabled: false +opencost: + enabled: false + +alloy: + logging: + level: info + format: logfmt +alloy-events: + logging: + level: info + format: logfmt +alloy-logs: + logging: + # -- Level at which Alloy log lines should be written. + level: info + # -- Format to use for writing Alloy log lines. + format: logfmt +``` + + +- Note that this is only an example to send logs to your cockpit, you can also send metrics to cockpit using this Helm chart + + +## Send Kubernetes logs to your Cockpit using Helm chart + +1. Connect your kubectl to your Scaleway Cluster +2. Apply your Helm chart with the `values.yml` file by running + ``` + helm install -f /your-path/to/values.yml my-log-ingester k8s-monitoring --version 1.6.16 + ``` + Do not forget to change the -f flag with the correct path to your `values.yml` file + +## Send Kubernetes logs to your Cockpit using Helm chart with Terraform + +1. Set up the Helm Terraform provider + ```terraform + provider "helm" { + kubernetes { + host = your_k8s_cluster_host + token = your_k8s_cluster_token + cluster_ca_certificate = base64decode( + your_k8s_cluster_ca_certificate + ) + } + } + ``` +2. Create a Helm release ressource with the path to your `values.yml` + ``` + resource "helm_release" "log-ingester" { + name = "my-log-ingester" + repository = "https://grafana.github.io/helm-charts" + chart = "k8s-monitoring" + version = "1.6.16" + + namespace = "log-ingester" + create_namespace = true + values = [file("/your-path/to/values.yml")] + } + ``` +3. Apply the new terraform configuration with `terraform apply` + +## Explore your logs + +Now that your logs are exported to your Cockpit, you can access and query them. + +1. Open your Cockpit Dashboard +2. Click the **Home** icon > **Explore**. Select your custom data source in the upper left corner. +3. Filter the query by only searching for the label `cluster` with the value corresponding to your cluster name and your log should display From 8867ccd99b9bc12885429a05001ae3d78c85d488 Mon Sep 17 00:00:00 2001 From: Bibas Date: Fri, 27 Dec 2024 11:43:26 +0100 Subject: [PATCH 02/13] docs(observability): add comment to explain annotation --- observability/cockpit/how-to/send-log-from-k8s-to-cockpit.mdx | 1 + 1 file changed, 1 insertion(+) diff --git a/observability/cockpit/how-to/send-log-from-k8s-to-cockpit.mdx b/observability/cockpit/how-to/send-log-from-k8s-to-cockpit.mdx index 5f3e3635b7..c6a1ecce10 100644 --- a/observability/cockpit/how-to/send-log-from-k8s-to-cockpit.mdx +++ b/observability/cockpit/how-to/send-log-from-k8s-to-cockpit.mdx @@ -60,6 +60,7 @@ logs: pod_logs: enabled: true discovery: "all" + # This annotation is mandatory to gather your logs annotation: "cockpit.scw.cloud/logs.autogather" # -- Only capture logs from pods in these namespaces (`[]` means all namespaces). namespaces: [] From a25aa6a1030c92911d08622f5781851ff6376bc6 Mon Sep 17 00:00:00 2001 From: nerda-codes <87707325+nerda-codes@users.noreply.github.com> Date: Tue, 31 Dec 2024 10:26:31 +0100 Subject: [PATCH 03/13] docs(cockpit): neda review Co-authored-by: Jessica <113192637+jcirinosclwy@users.noreply.github.com> --- .../how-to/send-log-from-k8s-to-cockpit.mdx | 50 ++++++++----------- 1 file changed, 21 insertions(+), 29 deletions(-) diff --git a/observability/cockpit/how-to/send-log-from-k8s-to-cockpit.mdx b/observability/cockpit/how-to/send-log-from-k8s-to-cockpit.mdx index c6a1ecce10..2d174131ce 100644 --- a/observability/cockpit/how-to/send-log-from-k8s-to-cockpit.mdx +++ b/observability/cockpit/how-to/send-log-from-k8s-to-cockpit.mdx @@ -9,24 +9,22 @@ tags: kubernetes cockpit logs observability monitoring cluster categories: - observability dates: - validation: TBD - posted: TBD + validation: 2025/01/03 + posted: 2025/01/03 --- -This page shows you how to send your application logs created in a Kubernetes cluster to your Cockpit either by using a Helm Chart or by deploying this Helm chart with Terraform. +This page shows you how to send application logs created in a Kubernetes cluster to your Cockpit either by using a Helm chart or by deploying a Helm chart with [Terraform](https://www.terraform.io/). -In this example, we use [k8s-monitoring](https://artifacthub.io/packages/helm/grafana/k8s-monitoring/1.6.16) which install an Alloy Daemon set to your Kubernetes Cluster to export logs to your Cockpit. +In this example, we use [k8s-monitoring](https://artifacthub.io/packages/helm/grafana/k8s-monitoring/1.6.16) which installs an Alloy Daemon set to your Kubernetes cluster to export logs to your Cockpit. - A Scaleway account logged into the [console](https://console.scaleway.com) - [Owner](/identity-and-access-management/iam/concepts/#owner) status or [IAM permissions](/identity-and-access-management/iam/concepts/#permission) allowing you to perform actions in the intended Organization - - [Created](/observability/cockpit/how-to/create-external-data-sources/) an custom external data source - - [Created](/observability/cockpit/how-to/create-token/) a Cockpit Token for the same region as the data source - - A running Kubernetes Cluster containing your application deployed - - For Terraform : [Created](/identity-and-access-management/iam/how-to/create-api-keys/) an API key and retrieved your API secret key - - + - [Created](/observability/cockpit/how-to/create-external-data-sources/) a custom external data source + - [Created](/observability/cockpit/how-to/create-token/) a Cockpit token for the same region as the data source + - A running Kubernetes cluster containing your application deployed + - [Created](/identity-and-access-management/iam/how-to/create-api-keys/) an API key and retrieved your API secret key - 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) for more information. @@ -34,14 +32,7 @@ In this example, we use [k8s-monitoring](https://artifacthub.io/packages/helm/gr ## Configure the Helm chart -Create a `values.yml` file to configure your Helm chart, here is an example: - - - Do not forget to replace: - - `$SCW_CLUSTER_NAME` by the name of your Scaleway Cluster - - `$COCKPIT_CUSTOM_DATASOURCE_HOST` by the hostname of your custom endpoint (do not include the `/loki/api/v1/push` ) - - `$COCKPIT_TOKEN` by your Cockpit Token - +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_DATASOURCE_HOST` with the hostname of your custom endpoint (excluding the `/loki/api/v1/push` part), and `$COCKPIT_TOKEN` with your Cockpit token. ```yaml cluster: @@ -95,21 +86,21 @@ alloy-logs: ``` -- Note that this is only an example to send logs to your cockpit, you can also send metrics to cockpit using this Helm chart +The template above is only an example to send logs to your Cockpit. You can also send metrics to Cockpit using this Helm chart. ## Send Kubernetes logs to your Cockpit using Helm chart -1. Connect your kubectl to your Scaleway Cluster -2. Apply your Helm chart with the `values.yml` file by running +1. Connect your kubectl to your Kubernetes cluster +2. Run the following command to apply your Helm chart with the `values.yml` file: ``` helm install -f /your-path/to/values.yml my-log-ingester k8s-monitoring --version 1.6.16 ``` - Do not forget to change the -f flag with the correct path to your `values.yml` file + Make sure to replace `-f` flag with the correct path to your `values.yml` file. ## Send Kubernetes logs to your Cockpit using Helm chart with Terraform -1. Set up the Helm Terraform provider +1. Set up the Helm Terraform provider: ```terraform provider "helm" { kubernetes { @@ -121,7 +112,7 @@ alloy-logs: } } ``` -2. Create a Helm release ressource with the path to your `values.yml` +2. Create a Helm release resource with the path to your `values.yml`: ``` resource "helm_release" "log-ingester" { name = "my-log-ingester" @@ -134,12 +125,13 @@ alloy-logs: values = [file("/your-path/to/values.yml")] } ``` -3. Apply the new terraform configuration with `terraform apply` +3. Run `terraform apply` to apply the new Terraform configuration. -## Explore your logs +## Explore your logs in Grafana Now that your logs are exported to your Cockpit, you can access and query them. -1. Open your Cockpit Dashboard -2. Click the **Home** icon > **Explore**. Select your custom data source in the upper left corner. -3. Filter the query by only searching for the label `cluster` with the value corresponding to your cluster name and your log should display +1. Click **Cockpit** in the Observability section of the [console](https://console.scaleway.com/) side menu. The **Cockpit** overview page displays. +2. Click **Open dashboards** to open your managed dashboards in Grafana. You are redirected to the Grafana website. +3. Click the **Home** icon > **Explore**. Select your custom data source in the upper left corner. +4. Filter the query by only searching for the label `cluster` with the value corresponding to your cluster name and your logs should display. From 09a844e06a5dee36220c59cf7a088b31c16e4973 Mon Sep 17 00:00:00 2001 From: Bibas Date: Thu, 2 Jan 2025 11:12:24 +0100 Subject: [PATCH 04/13] fix(docs): typo in closing tag of a block --- observability/cockpit/how-to/send-log-from-k8s-to-cockpit.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/observability/cockpit/how-to/send-log-from-k8s-to-cockpit.mdx b/observability/cockpit/how-to/send-log-from-k8s-to-cockpit.mdx index 2d174131ce..2a2530cb63 100644 --- a/observability/cockpit/how-to/send-log-from-k8s-to-cockpit.mdx +++ b/observability/cockpit/how-to/send-log-from-k8s-to-cockpit.mdx @@ -28,7 +28,7 @@ In this example, we use [k8s-monitoring](https://artifacthub.io/packages/helm/gr - 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) for more information. - + ## Configure the Helm chart From 79f24f631484dc2383823a683cad04824381192b Mon Sep 17 00:00:00 2001 From: Bibas Date: Mon, 6 Jan 2025 15:55:18 +0100 Subject: [PATCH 05/13] add(docs): link to metrics tutorial in note --- observability/cockpit/how-to/send-log-from-k8s-to-cockpit.mdx | 1 + 1 file changed, 1 insertion(+) diff --git a/observability/cockpit/how-to/send-log-from-k8s-to-cockpit.mdx b/observability/cockpit/how-to/send-log-from-k8s-to-cockpit.mdx index 2a2530cb63..488cea1a96 100644 --- a/observability/cockpit/how-to/send-log-from-k8s-to-cockpit.mdx +++ b/observability/cockpit/how-to/send-log-from-k8s-to-cockpit.mdx @@ -87,6 +87,7 @@ alloy-logs: The template above is only an example to send logs to your Cockpit. You can also send metrics to Cockpit using this Helm chart. +You can check our guide to [send metrics from your cluster to Cockpit](// ADD LINK TO METRICS TUTO) ## Send Kubernetes logs to your Cockpit using Helm chart From 98244d3833ab1b30827e63a18cf640ff250e8651 Mon Sep 17 00:00:00 2001 From: Bibas Date: Mon, 6 Jan 2025 17:37:40 +0100 Subject: [PATCH 06/13] add(docs): docs to send metrics from k8s cluster to cockpit --- .../send-metrics-from-k8s-to-cockpit.mdx | 164 ++++++++++++++++++ 1 file changed, 164 insertions(+) create mode 100644 observability/cockpit/how-to/send-metrics-from-k8s-to-cockpit.mdx diff --git a/observability/cockpit/how-to/send-metrics-from-k8s-to-cockpit.mdx b/observability/cockpit/how-to/send-metrics-from-k8s-to-cockpit.mdx new file mode 100644 index 0000000000..562f20fb7b --- /dev/null +++ b/observability/cockpit/how-to/send-metrics-from-k8s-to-cockpit.mdx @@ -0,0 +1,164 @@ +--- +meta: + title: How to send metrics from your Kubernetes cluster to your Cockpit + description: Learn how to send your pod metrics to your Cockpit using Scaleway's comprehensive guide. This tutorial covers sending Kubernetes pods metrics to Scaleway's Cockpit for centralized monitoring and analysis using Grafana, ensuring efficient monitoring and metrics analysis in your infrastructure. +content: + h1: How to send metrics from your Kubernetes cluster to your Cockpit + paragraph: Learn how to send your pod metrics to your Cockpit using Scaleway's comprehensive guide. This tutorial covers sending Kubernetes pods metrics to Scaleway's Cockpit for centralized monitoring and analysis using Grafana, ensuring efficient monitoring and metrics analysis in your infrastructure. +tags: kubernetes cockpit metrics observability monitoring cluster +categories: + - observability +dates: + validation: 2025/01/07 + posted: 2025/01/07 +--- + + +This page shows you how to send application metrics created in a Kubernetes cluster to your Cockpit either by using a Helm chart or by deploying a Helm chart with [Terraform](https://www.terraform.io/). + +In this example, we use [k8s-monitoring](https://artifacthub.io/packages/helm/grafana/k8s-monitoring/1.6.16) which installs an Alloy Daemon set to your Kubernetes cluster to export metrics to your Cockpit. + + + + - A Scaleway account metricsged into the [console](https://console.scaleway.com) + - [Owner](/identity-and-access-management/iam/concepts/#owner) status or [IAM permissions](/identity-and-access-management/iam/concepts/#permission) allowing you to perform actions in the intended Organization + - [Created](/observability/cockpit/how-to/create-external-data-sources/) a custom external data source of type metrics + - [Created](/observability/cockpit/how-to/create-token/) a Cockpit token for the same region as the data source + - A running Kubernetes cluster containing a deployed application exposing metrics + - [Created](/identity-and-access-management/iam/how-to/create-api-keys/) an API key and retrieved your API secret key + + + - Sending metrics 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) 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_DATASOURCE_HOST` with the hostname of your custom endpoint (excluding the `/loki/api/v1/push` part), and `$COCKPIT_TOKEN` with your Cockpit token. + +```yaml +cluster: + name: "$SCW_CLUSTER_NAME" +externalServices: + prometheus: + host: "$COCKPIT_CUSTOM_DATASOURCE_HOST" + tenantId: "$COCKPIT_TOKEN" + writeEndpoint: "/api/v1/push" + authMode: none + externalLabels: { + cluster: "$SCW_CLUSTER_NAME" + } + +metrics: + enabled: true + scrapeInterval: 60s + autoDiscover: + enabled: true + # -- Only capture metrics from pods in these namespaces (`[]` means all namespaces). + namespaces: [] + +logs: + enabled: false +kube-state-metrics: + enabled: false +prometheus-node-exporter: + enabled: false +prometheus-operator-crds: + enabled: false +opencost: + enabled: false +``` + + +The template above is only an example to send metrics to your Cockpit. You can also send logs to Cockpit using this Helm chart. +You can check our guide to [send logs from your cluster to Cockpit](// ADD LINK TO LOGS TUTO) + + +## Add annotation to your deployed pod to enable auto-discovery + +In order for k8s-monitoring to discover the pods it needs to scrape, you need to add specific annotation to the pods you want to scrape + +Add annotation to indicate to k8s-monitoring to scrape the pods from your deployment. Make sure to replace $METRIC_PORT with your Prometheus port. + +### Kubernetes + +```yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + ... + annotations: + "k8s.grafana.com/metrics.portNumber" = "$METRIC_PORT" + "k8s.grafana.com/scrape" = "true" +spec: + ... +``` + +### Terraform + +```terraform +resource "kubernetes_deployment_v1" "your_application_deployment" { + ... + spec { + ... + template { + metadata { + ... + annotations = { + "k8s.grafana.com/metrics.portNumber" = "$METRIC_PORT" + "k8s.grafana.com/scrape" = "true" + } + } + ... + } + } +} +``` + +## Send Kubernetes metrics to your Cockpit using Helm chart with Terraform + +1. Set up the Helm Terraform provider: + ```terraform + provider "helm" { + kubernetes { + host = your_k8s_cluster_host + token = your_k8s_cluster_token + cluster_ca_certificate = base64decode( + your_k8s_cluster_ca_certificate + ) + } + } + ``` +2. Create a Helm release resource with the path to your `values.yml`: + ``` + resource "helm_release" "metrics-ingester" { + name = "my-metrics-ingester" + repository = "https://grafana.github.io/helm-charts" + chart = "k8s-monitoring" + version = "1.6.16" + + namespace = "metrics-ingester" + create_namespace = true + values = [file("/your-path/to/values.yml")] + } + ``` +3. Run `terraform apply` to apply the new Terraform configuration. + +## Send Kubernetes metrics to your Cockpit using Helm chart + +1. Connect your kubectl to your Kubernetes cluster +2. Run the following command to apply your Helm chart with the `values.yml` file: + ``` + helm install -f /your-path/to/values.yml my-metrics-ingester k8s-monitoring --version 1.6.16 + ``` + Make sure to replace `-f` flag with the correct path to your `values.yml` file. + + +## Explore your metrics in Grafana + +Now that your metrics are exported to your Cockpit, you can access and query them. + +1. Click **Cockpit** in the Observability section of the [console](https://console.scaleway.com/) side menu. The **Cockpit** overview page displays. +2. Click **Open dashboards** to open your managed dashboards in Grafana. You are redirected to the Grafana website. +3. Click the **Home** icon > **Explore**. Select your custom data source in the upper left corner. +4. You can now query your metrics from your Kubernetes cluster and use the datasource to create graph. \ No newline at end of file From adf9f87c57f6ff65f1c2478f899e3df0aeb15fe5 Mon Sep 17 00:00:00 2001 From: Bibas Date: Thu, 16 Jan 2025 11:47:22 +0100 Subject: [PATCH 07/13] Update documentation to follow upgrade of k8s-monitoring from 1.6.16 to 2.0.2 --- .../how-to/send-log-from-k8s-to-cockpit.mdx | 75 ++++++++----------- .../send-metrics-from-k8s-to-cockpit.mdx | 50 ++++++------- 2 files changed, 56 insertions(+), 69 deletions(-) diff --git a/observability/cockpit/how-to/send-log-from-k8s-to-cockpit.mdx b/observability/cockpit/how-to/send-log-from-k8s-to-cockpit.mdx index 488cea1a96..49ef05a5f2 100644 --- a/observability/cockpit/how-to/send-log-from-k8s-to-cockpit.mdx +++ b/observability/cockpit/how-to/send-log-from-k8s-to-cockpit.mdx @@ -32,57 +32,48 @@ In this example, we use [k8s-monitoring](https://artifacthub.io/packages/helm/gr ## 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_DATASOURCE_HOST` with the hostname of your custom endpoint (excluding the `/loki/api/v1/push` part), and `$COCKPIT_TOKEN` with your Cockpit token. +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_DATASOURCE_HOST` with the hostname of your custom endpoint, and `$COCKPIT_TOKEN` with your Cockpit token. ```yaml cluster: - name: "$SCW_CLUSTER_NAME" -externalServices: - loki: - host: "$COCKPIT_CUSTOM_DATASOURCE_HOST" + name: "$SCW_CLUSTER_NAME" +global: + scrape_interval: 60s +destinations: + - name: "my-cockpit-logs" + type: "loki" + protocol: "http" + logs: + enabled: true + url: "$COCKPIT_CUSTOM_DATASOURCE_HOST/loki/api/v1/push" tenantId: "$COCKPIT_TOKEN" - authMode: none - externalLabels: { - cluster: "$SCW_CLUSTER_NAME" - } - -logs: + + metrics: + enabled: false + traces: + enabled: false +clusterEvents: enabled: true - pod_logs: + destinations: ["my-cockpit-logs"] +# -- Node logs. +nodeLogs: enabled: true - discovery: "all" - # This annotation is mandatory to gather your logs - annotation: "cockpit.scw.cloud/logs.autogather" - # -- Only capture logs from pods in these namespaces (`[]` means all namespaces). - namespaces: [] - # -- Do not capture logs from any pods in these namespaces. - excludeNamespaces: [] - -metrics: - enabled: false -kube-state-metrics: - enabled: false -prometheus-node-exporter: - enabled: false -prometheus-operator-crds: - enabled: false -opencost: - enabled: false - -alloy: - logging: - level: info - format: logfmt -alloy-events: - logging: - level: info - format: logfmt + destinations: ["my-cockpit-logs"] +# -- Pod logs. +podLogs: + enabled: true + destinations: ["my-cockpit-logs"] + volumeGatherSettings: + onlyGatherNewLogLines: true + +# An Alloy instance for collecting log data. alloy-logs: + enabled: true logging: - # -- Level at which Alloy log lines should be written. level: info - # -- Format to use for writing Alloy log lines. format: logfmt +alloy-singleton: + enabled: true ``` @@ -119,7 +110,7 @@ You can check our guide to [send metrics from your cluster to Cockpit](// ADD LI name = "my-log-ingester" repository = "https://grafana.github.io/helm-charts" chart = "k8s-monitoring" - version = "1.6.16" + version = "2.0.2" namespace = "log-ingester" create_namespace = true diff --git a/observability/cockpit/how-to/send-metrics-from-k8s-to-cockpit.mdx b/observability/cockpit/how-to/send-metrics-from-k8s-to-cockpit.mdx index 562f20fb7b..bd33d0843a 100644 --- a/observability/cockpit/how-to/send-metrics-from-k8s-to-cockpit.mdx +++ b/observability/cockpit/how-to/send-metrics-from-k8s-to-cockpit.mdx @@ -34,39 +34,35 @@ In this example, we use [k8s-monitoring](https://artifacthub.io/packages/helm/gr ## 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_DATASOURCE_HOST` with the hostname of your custom endpoint (excluding the `/loki/api/v1/push` part), and `$COCKPIT_TOKEN` with your Cockpit token. +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_DATASOURCE_HOST` with the hostname of your custom endpoint, and `$COCKPIT_TOKEN` with your Cockpit token. ```yaml cluster: name: "$SCW_CLUSTER_NAME" -externalServices: - prometheus: - host: "$COCKPIT_CUSTOM_DATASOURCE_HOST" +global: + scrape_interval: 60s +destinations: + - name: "my-cockpit-metrics" + type: "prometheus" + protocol: "http" + metrics: + enabled: true + url: "$COCKPIT_CUSTOM_DATASOURCE_HOST/api/v1/push" tenantId: "$COCKPIT_TOKEN" - writeEndpoint: "/api/v1/push" - authMode: none - externalLabels: { - cluster: "$SCW_CLUSTER_NAME" - } + + logs: + enabled: false + traces: + enabled: false + +annotationAutodiscovery: + enabled: true + destinations: ["my-cockpit-metrics"] -metrics: +alloy-metrics: + enabled: true +alloy-singleton: enabled: true - scrapeInterval: 60s - autoDiscover: - enabled: true - # -- Only capture metrics from pods in these namespaces (`[]` means all namespaces). - namespaces: [] - -logs: - enabled: false -kube-state-metrics: - enabled: false -prometheus-node-exporter: - enabled: false -prometheus-operator-crds: - enabled: false -opencost: - enabled: false ``` @@ -135,7 +131,7 @@ resource "kubernetes_deployment_v1" "your_application_deployment" { name = "my-metrics-ingester" repository = "https://grafana.github.io/helm-charts" chart = "k8s-monitoring" - version = "1.6.16" + version = "2.0.2" namespace = "metrics-ingester" create_namespace = true From cace6a6b9056818a6bf51808ad813af676b9c248 Mon Sep 17 00:00:00 2001 From: Bibas Date: Thu, 16 Jan 2025 17:02:15 +0100 Subject: [PATCH 08/13] wording: change Grafana to Cockpit --- observability/cockpit/how-to/send-log-from-k8s-to-cockpit.mdx | 2 +- .../cockpit/how-to/send-metrics-from-k8s-to-cockpit.mdx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/observability/cockpit/how-to/send-log-from-k8s-to-cockpit.mdx b/observability/cockpit/how-to/send-log-from-k8s-to-cockpit.mdx index 49ef05a5f2..13dbcf79b3 100644 --- a/observability/cockpit/how-to/send-log-from-k8s-to-cockpit.mdx +++ b/observability/cockpit/how-to/send-log-from-k8s-to-cockpit.mdx @@ -119,7 +119,7 @@ You can check our guide to [send metrics from your cluster to Cockpit](// ADD LI ``` 3. Run `terraform apply` to apply the new Terraform configuration. -## Explore your logs in Grafana +## Explore your logs in Cockpit Now that your logs are exported to your Cockpit, you can access and query them. diff --git a/observability/cockpit/how-to/send-metrics-from-k8s-to-cockpit.mdx b/observability/cockpit/how-to/send-metrics-from-k8s-to-cockpit.mdx index bd33d0843a..a3f16902fd 100644 --- a/observability/cockpit/how-to/send-metrics-from-k8s-to-cockpit.mdx +++ b/observability/cockpit/how-to/send-metrics-from-k8s-to-cockpit.mdx @@ -150,7 +150,7 @@ resource "kubernetes_deployment_v1" "your_application_deployment" { Make sure to replace `-f` flag with the correct path to your `values.yml` file. -## Explore your metrics in Grafana +## Explore your metrics in Cockpit Now that your metrics are exported to your Cockpit, you can access and query them. From 3a5861cbd0ee353c8d7862bd8165cdf53a5a6d07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?N=C3=A9da?= <87707325+nerda-codes@users.noreply.github.com> Date: Fri, 17 Jan 2025 17:26:17 +0100 Subject: [PATCH 09/13] =?UTF-8?q?feat(cockpit-k8s):=20review=20&=20test=20?= =?UTF-8?q?n=C3=A9da?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../how-to/send-log-from-k8s-to-cockpit.mdx | 75 ++++++++++++------- 1 file changed, 48 insertions(+), 27 deletions(-) diff --git a/observability/cockpit/how-to/send-log-from-k8s-to-cockpit.mdx b/observability/cockpit/how-to/send-log-from-k8s-to-cockpit.mdx index 13dbcf79b3..d5232d844d 100644 --- a/observability/cockpit/how-to/send-log-from-k8s-to-cockpit.mdx +++ b/observability/cockpit/how-to/send-log-from-k8s-to-cockpit.mdx @@ -9,19 +9,19 @@ tags: kubernetes cockpit logs observability monitoring cluster categories: - observability dates: - validation: 2025/01/03 - posted: 2025/01/03 + validation: 2025/01/20 + posted: 2025/01/20 --- -This page shows you how to send application logs created in a Kubernetes cluster to your Cockpit either by using a Helm chart or by deploying a Helm chart with [Terraform](https://www.terraform.io/). +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/). -In this example, we use [k8s-monitoring](https://artifacthub.io/packages/helm/grafana/k8s-monitoring/1.6.16) which installs an Alloy Daemon set to your Kubernetes cluster to export logs to your Cockpit. +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. - A Scaleway account logged into the [console](https://console.scaleway.com) - [Owner](/identity-and-access-management/iam/concepts/#owner) status or [IAM permissions](/identity-and-access-management/iam/concepts/#permission) allowing you to perform actions in the intended Organization - - [Created](/observability/cockpit/how-to/create-external-data-sources/) a custom external data source + - [Created](/observability/cockpit/how-to/create-external-data-sources/) a custom external data source of the [logs type](/observability/cockpit/concepts/#data-types) - [Created](/observability/cockpit/how-to/create-token/) a Cockpit token for the same region as the data source - A running Kubernetes cluster containing your application deployed - [Created](/identity-and-access-management/iam/how-to/create-api-keys/) an API key and retrieved your API secret key @@ -32,7 +32,7 @@ In this example, we use [k8s-monitoring](https://artifacthub.io/packages/helm/gr ## 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_DATASOURCE_HOST` with the hostname of your custom endpoint, and `$COCKPIT_TOKEN` with your Cockpit token. +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_DATASOURCE_HOST` with the URL of your custom 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. ```yaml cluster: @@ -45,7 +45,7 @@ destinations: protocol: "http" logs: enabled: true - url: "$COCKPIT_CUSTOM_DATASOURCE_HOST/loki/api/v1/push" + url: "$COCKPIT_CUSTOM_LOGS_DATASOURCE_URL/loki/api/v1/push" ##You can find your logs URL in the **Data sources** tab of the Scaleway conseole under the "API URL" section of the relevant data source tenantId: "$COCKPIT_TOKEN" metrics: @@ -77,37 +77,51 @@ alloy-singleton: ``` -The template above is only an example to send logs to your Cockpit. You can also send metrics to Cockpit using this Helm chart. -You can check our guide to [send metrics from your cluster to Cockpit](// ADD LINK TO METRICS TUTO) +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 doucumentation to [send metrics from your cluster to Cockpit](/observability/cockpit/how-to/send-metrics-froms-k8s-to-cockpit). -## Send Kubernetes logs to your Cockpit using Helm chart +## Send Kubernetes logs using Helm chart -1. Connect your kubectl to your Kubernetes cluster -2. Run the following command to apply your Helm chart with the `values.yml` file: +Once you have configured your `values.yml` file, you can use Helm to deploy the log-forwarding configuration to your Kubernetes cluster. Before you can install 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](/containers/kubernetes/how-to/connect-cluster-kubectl/) `kubectl` to your Kubernetes cluster +2. Run the command below to install the `k8s-monitoring` Helm chart: ``` - helm install -f /your-path/to/values.yml my-log-ingester k8s-monitoring --version 1.6.16 + helm install -f /your-path/to/values.yml your-log-ingester k8s-monitoring --version 1.6.16 ``` - Make sure to replace `-f` flag with the correct path to your `values.yml` file. + The `-f` flag specifies the path to your `values.yml` file, which contains the configuration for the 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 `your-log-ingester` with the log ingester of your choice. In our configuration we are using `alloy-lm-ingester`. + + 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, check the status of the release to ensure it was installed: -## Send Kubernetes logs to your Cockpit using Helm chart with Terraform + ``` + helm list + ``` + You should see a list of all the Helm releases in your cluster, including `my-log-ingester`. -1. Set up the Helm Terraform provider: +## Send Kubernetes logs using Helm chart with Terraform + +You can also use Terraform 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 provider: ```terraform provider "helm" { kubernetes { - host = your_k8s_cluster_host - token = your_k8s_cluster_token + 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 + your_k8s_cluster_ca_certificate # The cluster's CA certificate, base64 encoded. ) } } ``` -2. Create a Helm release resource with the path to your `values.yml`: +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" "log-ingester" { - name = "my-log-ingester" + name = "your-log-ingester" repository = "https://grafana.github.io/helm-charts" chart = "k8s-monitoring" version = "2.0.2" @@ -117,13 +131,20 @@ You can check our guide to [send metrics from your cluster to Cockpit](// ADD LI values = [file("/your-path/to/values.yml")] } ``` -3. Run `terraform apply` to apply the new Terraform configuration. +3. Save your changes. +4. Run `terraform init` to initialize your Terraform configuration and download any necessary providers. +5. Run `terraform apply` to apply your configuration. +5. Type `yes` when prompted to confirm the actions. ## Explore your logs in Cockpit -Now that your logs are exported to your Cockpit, you can access and query them. - -1. Click **Cockpit** in the Observability section of the [console](https://console.scaleway.com/) side menu. The **Cockpit** overview page displays. +1. Click **Cockpit** in the Observability section of the Scaleway [console](https://console.scaleway.com/) side menu. The **Cockpit** overview page displays. 2. Click **Open dashboards** to open your managed dashboards in Grafana. You are redirected to the Grafana website. -3. Click the **Home** icon > **Explore**. Select your custom data source in the upper left corner. -4. Filter the query by only searching for the label `cluster` with the value corresponding to your cluster name and your logs should display. +3. Log in to Grafana using your [Grafana credentials](/observability/cockpit/how-to/retrieve-grafana-credentials/). +4. Click the **Home** icon, 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. +8. Click **Run query** to see your logs. An output similar to the following should display. + + From fac49cff4ae083f7f5037c418b6719a0697c4bfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?N=C3=A9da?= <87707325+nerda-codes@users.noreply.github.com> Date: Fri, 17 Jan 2025 17:55:50 +0100 Subject: [PATCH 10/13] =?UTF-8?q?feat(cockpit-k8s):=20n=C3=A9da=20review?= =?UTF-8?q?=20&=20test=20doc=20metrics?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../send-metrics-from-k8s-to-cockpit.mdx | 87 +++++++++++-------- 1 file changed, 52 insertions(+), 35 deletions(-) diff --git a/observability/cockpit/how-to/send-metrics-from-k8s-to-cockpit.mdx b/observability/cockpit/how-to/send-metrics-from-k8s-to-cockpit.mdx index a3f16902fd..bd4e59c318 100644 --- a/observability/cockpit/how-to/send-metrics-from-k8s-to-cockpit.mdx +++ b/observability/cockpit/how-to/send-metrics-from-k8s-to-cockpit.mdx @@ -9,32 +9,32 @@ tags: kubernetes cockpit metrics observability monitoring cluster categories: - observability dates: - validation: 2025/01/07 - posted: 2025/01/07 + validation: 2025/01/20 + posted: 2025/01/20 --- -This page shows you how to send application metrics created in a Kubernetes cluster to your Cockpit either by using a Helm chart or by deploying a Helm chart with [Terraform](https://www.terraform.io/). +In this page we will show you how to send application metrics from your Kubernetes cluster to your Cockpit using either a Helm chart or deploying a Helm chart with [Terraform](https://www.terraform.io/). -In this example, we use [k8s-monitoring](https://artifacthub.io/packages/helm/grafana/k8s-monitoring/1.6.16) which installs an Alloy Daemon set to your Kubernetes cluster to export metrics to your Cockpit. +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 metrics to your Cockpit. - A Scaleway account metricsged into the [console](https://console.scaleway.com) - [Owner](/identity-and-access-management/iam/concepts/#owner) status or [IAM permissions](/identity-and-access-management/iam/concepts/#permission) allowing you to perform actions in the intended Organization - - [Created](/observability/cockpit/how-to/create-external-data-sources/) a custom external data source of type metrics - - [Created](/observability/cockpit/how-to/create-token/) a Cockpit token for the same region as the data source - - A running Kubernetes cluster containing a deployed application exposing metrics + - [Created](/observability/cockpit/how-to/create-external-data-sources/) a custom external data source of the [metrics type](/observability/cockpit/concepts/#data-types) + - [Created](/observability/cockpit/how-to/create-token/) a Cockpit token in the same region as the metrics data source + - A running Kubernetes cluster containing your application deployed - [Created](/identity-and-access-management/iam/how-to/create-api-keys/) an API key and retrieved your API secret key - - Sending metrics 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) for more information. + - Sending metrics 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. ## 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_DATASOURCE_HOST` with the hostname of your custom endpoint, and `$COCKPIT_TOKEN` with your Cockpit token. +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_METRICS_DATASOURCE_URL` with the URL of your custom metrics 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. ```yaml cluster: @@ -47,7 +47,7 @@ destinations: protocol: "http" metrics: enabled: true - url: "$COCKPIT_CUSTOM_DATASOURCE_HOST/api/v1/push" + url: "$COCKPIT_CUSTOM_METRICS_DATASOURCE_URL/api/v1/push" tenantId: "$COCKPIT_TOKEN" logs: @@ -66,17 +66,15 @@ alloy-singleton: ``` -The template above is only an example to send metrics to your Cockpit. You can also send logs to Cockpit using this Helm chart. -You can check our guide to [send logs from your cluster to Cockpit](// ADD LINK TO LOGS TUTO) +The template above is for sending metrics to your Cockpit. You can also configure it to send logs to Cockpit using this Helm chart. +Refer to our dedicated doucumentation to [send logs from your cluster to Cockpit](/observability/cockpit/how-to/send-logs-from-k8s-to-cockpit) -## Add annotation to your deployed pod to enable auto-discovery +## Add annotations for auto-discovery -In order for k8s-monitoring to discover the pods it needs to scrape, you need to add specific annotation to the pods you want to scrape +Annotations in Kubernetes provide a way to attach metadata to your resources. For `k8s-monitoring`, these annotations signal which pods should be scraped for metrics, and what port to use. For the sake of this documentation, we are adding annotations to specify we want `k8s-monitoring` to scrape the pods from your deployment. Make sure that you replace $METRICS_PORT with the port where your application exposes Prometheus metrics. -Add annotation to indicate to k8s-monitoring to scrape the pods from your deployment. Make sure to replace $METRIC_PORT with your Prometheus port. - -### Kubernetes +### Kubernetes deployment template ```yaml apiVersion: apps/v1 @@ -84,13 +82,13 @@ kind: Deployment metadata: ... annotations: - "k8s.grafana.com/metrics.portNumber" = "$METRIC_PORT" + "k8s.grafana.com/metrics.portNumber" = "$METRICS_PORT" "k8s.grafana.com/scrape" = "true" spec: ... ``` -### Terraform +### Terraform deployment template ```terraform resource "kubernetes_deployment_v1" "your_application_deployment" { @@ -101,7 +99,7 @@ resource "kubernetes_deployment_v1" "your_application_deployment" { metadata { ... annotations = { - "k8s.grafana.com/metrics.portNumber" = "$METRIC_PORT" + "k8s.grafana.com/metrics.portNumber" = "$METRICS_PORT" "k8s.grafana.com/scrape" = "true" } } @@ -111,21 +109,21 @@ resource "kubernetes_deployment_v1" "your_application_deployment" { } ``` -## Send Kubernetes metrics to your Cockpit using Helm chart with Terraform +## Send Kubernetes metrics using Helm chart with Terraform -1. Set up the Helm Terraform provider: +1. Create a `provider.tf` file and paste the following template to set up the Helm Terraform provider: ```terraform provider "helm" { kubernetes { - host = your_k8s_cluster_host - token = your_k8s_cluster_token + 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 + your_k8s_cluster_ca_certificate # The cluster's CA certificate. ) } } ``` -2. Create a Helm release resource with the path to your `values.yml`: +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" "metrics-ingester" { name = "my-metrics-ingester" @@ -138,23 +136,42 @@ resource "kubernetes_deployment_v1" "your_application_deployment" { values = [file("/your-path/to/values.yml")] } ``` -3. Run `terraform apply` to apply the new Terraform configuration. +3. Save your changes. +4. Run `terraform init` to initialize your Terraform configuration and download any necessary providers. +5. Run `terraform apply` to apply your configuration. +5. Type `yes` when prompted to confirm the actions. + +## Send Kubernetes metrics using Helm chart -## Send Kubernetes metrics to your Cockpit using Helm chart +Once you have configured your `values.yml` file, you can use Helm to deploy the metric-forwarding configuration to your Kubernetes cluster. Before you can install 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 your kubectl to your Kubernetes cluster -2. Run the following command to apply your Helm chart with the `values.yml` file: +1. [Connect](/containers/kubernetes/how-to/connect-cluster-kubectl/) `kubectl` to your Kubernetes cluster +2. Run the command below to install the `k8s-monitoring` Helm chart: ``` - helm install -f /your-path/to/values.yml my-metrics-ingester k8s-monitoring --version 1.6.16 + helm install -f /your-path/to/values.yml your-metrics-ingester k8s-monitoring --version 1.6.16 ``` - Make sure to replace `-f` flag with the correct path to your `values.yml` file. + The `-f` flag specifies the path to your `values.yml` file, which contains the configuration for the 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 `your-metrics-ingester` with the metric ingester of your choice. In our configuration we are using `alloy-lm-ingester`. + + Helm installs the `k8s-monitoring` chart, which includes the Alloy DaemonSet configured to collect metrics from your Kubernetes cluster. + The DaemonSet ensures that a pod is running on each node in your cluster, which collects metrics and forwards them to the specified Prometheus endpoint in your Cockpit. + +3. Optionally, check the status of the release to ensure it was installed: + + ``` + helm list + ``` ## Explore your metrics in Cockpit Now that your metrics are exported to your Cockpit, you can access and query them. -1. Click **Cockpit** in the Observability section of the [console](https://console.scaleway.com/) side menu. The **Cockpit** overview page displays. +1. Click **Cockpit** in the Observability section of the Scaleway [console](https://console.scaleway.com/) side menu. The **Cockpit** overview page displays. 2. Click **Open dashboards** to open your managed dashboards in Grafana. You are redirected to the Grafana website. -3. Click the **Home** icon > **Explore**. Select your custom data source in the upper left corner. -4. You can now query your metrics from your Kubernetes cluster and use the datasource to create graph. \ No newline at end of file +3. Log in to Grafana using your [Grafana credentials](/observability/cockpit/how-to/retrieve-grafana-credentials/). +4. Click the **Home** icon, 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. +8. Click **Run query** to see your metrics. An output similar to the following should display. + From 60b597398093260ea46dd5dfcccf5b509a5d93e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?N=C3=A9da?= <87707325+nerda-codes@users.noreply.github.com> Date: Fri, 17 Jan 2025 17:56:17 +0100 Subject: [PATCH 11/13] feat(cockpit-k8s): neda review fix typos & inconsistencies logs doc --- .../cockpit/how-to/send-log-from-k8s-to-cockpit.mdx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/observability/cockpit/how-to/send-log-from-k8s-to-cockpit.mdx b/observability/cockpit/how-to/send-log-from-k8s-to-cockpit.mdx index d5232d844d..984766afc8 100644 --- a/observability/cockpit/how-to/send-log-from-k8s-to-cockpit.mdx +++ b/observability/cockpit/how-to/send-log-from-k8s-to-cockpit.mdx @@ -22,17 +22,17 @@ We will use the [k8s-monitoring](https://artifacthub.io/packages/helm/grafana/k8 - A Scaleway account logged into the [console](https://console.scaleway.com) - [Owner](/identity-and-access-management/iam/concepts/#owner) status or [IAM permissions](/identity-and-access-management/iam/concepts/#permission) allowing you to perform actions in the intended Organization - [Created](/observability/cockpit/how-to/create-external-data-sources/) a custom external data source of the [logs type](/observability/cockpit/concepts/#data-types) - - [Created](/observability/cockpit/how-to/create-token/) a Cockpit token for the same region as the data source + - [Created](/observability/cockpit/how-to/create-token/) a Cockpit token in the same region as the logs data source - A running Kubernetes cluster containing your application deployed - [Created](/identity-and-access-management/iam/how-to/create-api-keys/) an API key and retrieved your API secret key - - 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) 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. Refer to 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_DATASOURCE_HOST` with the URL of your custom 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, 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. ```yaml cluster: @@ -100,7 +100,6 @@ Once you have configured your `values.yml` file, you can use Helm to deploy the ``` helm list ``` - You should see a list of all the Helm releases in your cluster, including `my-log-ingester`. ## Send Kubernetes logs using Helm chart with Terraform @@ -113,7 +112,7 @@ You can also use Terraform to manage and deploy Helm charts, providing you with 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, base64 encoded. + your_k8s_cluster_ca_certificate # The cluster's CA certificate. ) } } From 7ceabd727776c8d834ad012a4b747952b6966fdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?N=C3=A9da?= <87707325+nerda-codes@users.noreply.github.com> Date: Mon, 20 Jan 2025 15:48:27 +0100 Subject: [PATCH 12/13] docs(review): neda suggestions --- .../cockpit/how-to/send-log-from-k8s-to-cockpit.mdx | 10 +++++----- .../how-to/send-metrics-from-k8s-to-cockpit.mdx | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/observability/cockpit/how-to/send-log-from-k8s-to-cockpit.mdx b/observability/cockpit/how-to/send-log-from-k8s-to-cockpit.mdx index 984766afc8..6715aadc3a 100644 --- a/observability/cockpit/how-to/send-log-from-k8s-to-cockpit.mdx +++ b/observability/cockpit/how-to/send-log-from-k8s-to-cockpit.mdx @@ -76,7 +76,7 @@ alloy-singleton: enabled: true ``` - + 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 doucumentation to [send metrics from your cluster to Cockpit](/observability/cockpit/how-to/send-metrics-froms-k8s-to-cockpit). @@ -88,9 +88,9 @@ Once you have configured your `values.yml` file, you can use Helm to deploy the 1. [Connect](/containers/kubernetes/how-to/connect-cluster-kubectl/) `kubectl` to your Kubernetes cluster 2. Run the command below to install the `k8s-monitoring` Helm chart: ``` - helm install -f /your-path/to/values.yml your-log-ingester k8s-monitoring --version 1.6.16 + helm install -f /your-path/to/values.yml name-of-your-choice-for-your-log-ingester k8s-monitoring --version 1.6.16 ``` - The `-f` flag specifies the path to your `values.yml` file, which contains the configuration for the 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 `your-log-ingester` with the log ingester of your choice. In our configuration we are using `alloy-lm-ingester`. + The `-f` flag specifies the path to your `values.yml` file, which contains the configuration for the 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`). In our configuration we are using `alloy-lm-ingester`. 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. @@ -119,8 +119,8 @@ You can also use Terraform to manage and deploy Helm charts, providing you with ``` 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" "log-ingester" { - name = "your-log-ingester" + resource "helm_release" "alloy" { + name = "name-of-your-log-ingester" repository = "https://grafana.github.io/helm-charts" chart = "k8s-monitoring" version = "2.0.2" diff --git a/observability/cockpit/how-to/send-metrics-from-k8s-to-cockpit.mdx b/observability/cockpit/how-to/send-metrics-from-k8s-to-cockpit.mdx index bd4e59c318..961c6a5573 100644 --- a/observability/cockpit/how-to/send-metrics-from-k8s-to-cockpit.mdx +++ b/observability/cockpit/how-to/send-metrics-from-k8s-to-cockpit.mdx @@ -65,14 +65,14 @@ alloy-singleton: enabled: true ``` - + The template above is for sending metrics to your Cockpit. You can also configure it to send logs to Cockpit using this Helm chart. Refer to our dedicated doucumentation to [send logs from your cluster to Cockpit](/observability/cockpit/how-to/send-logs-from-k8s-to-cockpit) ## Add annotations for auto-discovery -Annotations in Kubernetes provide a way to attach metadata to your resources. For `k8s-monitoring`, these annotations signal which pods should be scraped for metrics, and what port to use. For the sake of this documentation, we are adding annotations to specify we want `k8s-monitoring` to scrape the pods from your deployment. Make sure that you replace $METRICS_PORT with the port where your application exposes Prometheus metrics. +Annotations in Kubernetes provide a way to attach metadata to your resources. For `k8s-monitoring`, these annotations signal which pods should be scraped for metrics, and what port to use. For the sake of this documentation, we are adding annotations to specify we want `k8s-monitoring` to scrape the pods from your deployment. Make sure that you replace `$METRICS_PORT` with the port where your application exposes Prometheus metrics. ### Kubernetes deployment template @@ -125,8 +125,8 @@ resource "kubernetes_deployment_v1" "your_application_deployment" { ``` 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" "metrics-ingester" { - name = "my-metrics-ingester" + resource "helm_release" "alloy" { + name = "name-of-your-metrics-ingester" repository = "https://grafana.github.io/helm-charts" chart = "k8s-monitoring" version = "2.0.2" @@ -148,9 +148,9 @@ Once you have configured your `values.yml` file, you can use Helm to deploy the 1. [Connect](/containers/kubernetes/how-to/connect-cluster-kubectl/) `kubectl` to your Kubernetes cluster 2. Run the command below to install the `k8s-monitoring` Helm chart: ``` - helm install -f /your-path/to/values.yml your-metrics-ingester k8s-monitoring --version 1.6.16 + helm install -f /your-path/to/values.yml name-of-your-choice-for-your-metric-ingester k8s-monitoring --version 1.6.16 ``` - The `-f` flag specifies the path to your `values.yml` file, which contains the configuration for the 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 `your-metrics-ingester` with the metric ingester of your choice. In our configuration we are using `alloy-lm-ingester`. + The `-f` flag specifies the path to your `values.yml` file, which contains the configuration for the 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-metric-ingester` with a clear name (ex. `alloy-metrics-ingester`). In our configuration we are using `alloy-lm-ingester`. Helm installs the `k8s-monitoring` chart, which includes the Alloy DaemonSet configured to collect metrics from your Kubernetes cluster. The DaemonSet ensures that a pod is running on each node in your cluster, which collects metrics and forwards them to the specified Prometheus endpoint in your Cockpit. From e26ec9c8ae458d01c1d0d7495ae88ba0b6c22ef3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?N=C3=A9da?= <87707325+nerda-codes@users.noreply.github.com> Date: Tue, 21 Jan 2025 13:48:38 +0100 Subject: [PATCH 13/13] Apply suggestions from code review Co-authored-by: Jessica <113192637+jcirinosclwy@users.noreply.github.com> Co-authored-by: Rowena Jones <36301604+RoRoJ@users.noreply.github.com> --- .../how-to/send-log-from-k8s-to-cockpit.mdx | 18 +++++++++--------- .../send-metrics-from-k8s-to-cockpit.mdx | 18 +++++++++--------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/observability/cockpit/how-to/send-log-from-k8s-to-cockpit.mdx b/observability/cockpit/how-to/send-log-from-k8s-to-cockpit.mdx index 6715aadc3a..7fac6e1eaa 100644 --- a/observability/cockpit/how-to/send-log-from-k8s-to-cockpit.mdx +++ b/observability/cockpit/how-to/send-log-from-k8s-to-cockpit.mdx @@ -13,7 +13,7 @@ dates: posted: 2025/01/20 --- -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/). +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/). 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. @@ -23,7 +23,7 @@ We will use the [k8s-monitoring](https://artifacthub.io/packages/helm/grafana/k8 - [Owner](/identity-and-access-management/iam/concepts/#owner) status or [IAM permissions](/identity-and-access-management/iam/concepts/#permission) allowing you to perform actions in the intended Organization - [Created](/observability/cockpit/how-to/create-external-data-sources/) a custom external data source of the [logs type](/observability/cockpit/concepts/#data-types) - [Created](/observability/cockpit/how-to/create-token/) a Cockpit token in the same region as the logs data source - - A running Kubernetes cluster containing your application deployed + - A running Kubernetes cluster containing your deployed application - [Created](/identity-and-access-management/iam/how-to/create-api-keys/) an API key and retrieved your API secret key @@ -45,7 +45,7 @@ destinations: protocol: "http" logs: enabled: true - url: "$COCKPIT_CUSTOM_LOGS_DATASOURCE_URL/loki/api/v1/push" ##You can find your logs URL in the **Data sources** tab of the Scaleway conseole under the "API URL" section of the relevant data source + 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" metrics: @@ -77,20 +77,20 @@ alloy-singleton: ``` -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 doucumentation to [send metrics from your cluster to Cockpit](/observability/cockpit/how-to/send-metrics-froms-k8s-to-cockpit). + 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](/observability/cockpit/how-to/send-metrics-froms-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 you can install 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. 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](/containers/kubernetes/how-to/connect-cluster-kubectl/) `kubectl` to your Kubernetes cluster 2. Run the command below to install the `k8s-monitoring` Helm chart: ``` helm install -f /your-path/to/values.yml name-of-your-choice-for-your-log-ingester k8s-monitoring --version 1.6.16 ``` - The `-f` flag specifies the path to your `values.yml` file, which contains the configuration for the 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`). In our configuration we are using `alloy-lm-ingester`. + The `-f` flag specifies the path to your `values.yml` file, which contains the configuration for the 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`). In our configuration, we are using `alloy-lm-ingester`. 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. @@ -133,11 +133,11 @@ You can also use Terraform to manage and deploy Helm charts, providing you with 3. Save your changes. 4. Run `terraform init` to initialize your Terraform configuration and download any necessary providers. 5. Run `terraform apply` to apply your configuration. -5. Type `yes` when prompted to confirm the actions. +6. Type `yes` when prompted to confirm the actions. ## Explore your logs in Cockpit -1. Click **Cockpit** in the Observability section of the Scaleway [console](https://console.scaleway.com/) side menu. The **Cockpit** overview page displays. +1. Click **Cockpit** in the Observability section of the Scaleway [console](https://console.scaleway.com/) side menu. The **Cockpit Overview** page displays. 2. Click **Open dashboards** to open your managed dashboards in Grafana. You are redirected to the Grafana website. 3. Log in to Grafana using your [Grafana credentials](/observability/cockpit/how-to/retrieve-grafana-credentials/). 4. Click the **Home** icon, then click **Explore**. diff --git a/observability/cockpit/how-to/send-metrics-from-k8s-to-cockpit.mdx b/observability/cockpit/how-to/send-metrics-from-k8s-to-cockpit.mdx index 961c6a5573..c644f4e775 100644 --- a/observability/cockpit/how-to/send-metrics-from-k8s-to-cockpit.mdx +++ b/observability/cockpit/how-to/send-metrics-from-k8s-to-cockpit.mdx @@ -14,7 +14,7 @@ dates: --- -In this page we will show you how to send application metrics from your Kubernetes cluster to your Cockpit using either a Helm chart or deploying a Helm chart with [Terraform](https://www.terraform.io/). +In this page we will show you how to send application metrics from your Kubernetes cluster to your Cockpit, either by using a Helm chart or deploying a Helm chart with [Terraform](https://www.terraform.io/). 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 metrics to your Cockpit. @@ -24,7 +24,7 @@ We will use the [k8s-monitoring](https://artifacthub.io/packages/helm/grafana/k8 - [Owner](/identity-and-access-management/iam/concepts/#owner) status or [IAM permissions](/identity-and-access-management/iam/concepts/#permission) allowing you to perform actions in the intended Organization - [Created](/observability/cockpit/how-to/create-external-data-sources/) a custom external data source of the [metrics type](/observability/cockpit/concepts/#data-types) - [Created](/observability/cockpit/how-to/create-token/) a Cockpit token in the same region as the metrics data source - - A running Kubernetes cluster containing your application deployed + - A running Kubernetes cluster containing your deployed application - [Created](/identity-and-access-management/iam/how-to/create-api-keys/) an API key and retrieved your API secret key @@ -66,13 +66,13 @@ alloy-singleton: ``` -The template above is for sending metrics to your Cockpit. You can also configure it to send logs to Cockpit using this Helm chart. -Refer to our dedicated doucumentation to [send logs from your cluster to Cockpit](/observability/cockpit/how-to/send-logs-from-k8s-to-cockpit) + The template above is for sending metrics to your Cockpit. You can also configure it to send logs to Cockpit using this Helm chart. + Refer to our dedicated documentation to [send logs from your cluster to Cockpit](/observability/cockpit/how-to/send-logs-from-k8s-to-cockpit) ## Add annotations for auto-discovery -Annotations in Kubernetes provide a way to attach metadata to your resources. For `k8s-monitoring`, these annotations signal which pods should be scraped for metrics, and what port to use. For the sake of this documentation, we are adding annotations to specify we want `k8s-monitoring` to scrape the pods from your deployment. Make sure that you replace `$METRICS_PORT` with the port where your application exposes Prometheus metrics. +Annotations in Kubernetes provide a way to attach metadata to your resources. For `k8s-monitoring`, these annotations signal which pods should be scraped for metrics, and what port to use. For the sake of this documentation, we are adding annotations to specify we want `k8s-monitoring` to scrape the pods from our deployment. Make sure that you replace `$METRICS_PORT` with the port where your application exposes Prometheus metrics. ### Kubernetes deployment template @@ -139,18 +139,18 @@ resource "kubernetes_deployment_v1" "your_application_deployment" { 3. Save your changes. 4. Run `terraform init` to initialize your Terraform configuration and download any necessary providers. 5. Run `terraform apply` to apply your configuration. -5. Type `yes` when prompted to confirm the actions. +6. Type `yes` when prompted to confirm the actions. ## Send Kubernetes metrics using Helm chart -Once you have configured your `values.yml` file, you can use Helm to deploy the metric-forwarding configuration to your Kubernetes cluster. Before you can install 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 metric-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. 1. [Connect](/containers/kubernetes/how-to/connect-cluster-kubectl/) `kubectl` to your Kubernetes cluster 2. Run the command below to install the `k8s-monitoring` Helm chart: ``` helm install -f /your-path/to/values.yml name-of-your-choice-for-your-metric-ingester k8s-monitoring --version 1.6.16 ``` - The `-f` flag specifies the path to your `values.yml` file, which contains the configuration for the 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-metric-ingester` with a clear name (ex. `alloy-metrics-ingester`). In our configuration we are using `alloy-lm-ingester`. + The `-f` flag specifies the path to your `values.yml` file, which contains the configuration for the 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-metric-ingester` with a clear name (ex. `alloy-metrics-ingester`). In our configuration, we are using `alloy-lm-ingester`. Helm installs the `k8s-monitoring` chart, which includes the Alloy DaemonSet configured to collect metrics from your Kubernetes cluster. The DaemonSet ensures that a pod is running on each node in your cluster, which collects metrics and forwards them to the specified Prometheus endpoint in your Cockpit. @@ -166,7 +166,7 @@ Once you have configured your `values.yml` file, you can use Helm to deploy the Now that your metrics are exported to your Cockpit, you can access and query them. -1. Click **Cockpit** in the Observability section of the Scaleway [console](https://console.scaleway.com/) side menu. The **Cockpit** overview page displays. +1. Click **Cockpit** in the Observability section of the Scaleway [console](https://console.scaleway.com/) side menu. The **Cockpit Overview** page displays. 2. Click **Open dashboards** to open your managed dashboards in Grafana. You are redirected to the Grafana website. 3. Log in to Grafana using your [Grafana credentials](/observability/cockpit/how-to/retrieve-grafana-credentials/). 4. Click the **Home** icon, then click **Explore**.