Skip to content

Commit e26ec9c

Browse files
nerda-codesjcirinosclwyRoRoJ
authored
Apply suggestions from code review
Co-authored-by: Jessica <[email protected]> Co-authored-by: Rowena Jones <[email protected]>
1 parent 7ceabd7 commit e26ec9c

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

observability/cockpit/how-to/send-log-from-k8s-to-cockpit.mdx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ dates:
1313
posted: 2025/01/20
1414
---
1515

16-
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/).
16+
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/).
1717

1818
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.
1919

@@ -23,7 +23,7 @@ We will use the [k8s-monitoring](https://artifacthub.io/packages/helm/grafana/k8
2323
- [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
2424
- [Created](/observability/cockpit/how-to/create-external-data-sources/) a custom external data source of the [logs type](/observability/cockpit/concepts/#data-types)
2525
- [Created](/observability/cockpit/how-to/create-token/) a Cockpit token in the same region as the logs data source
26-
- A running Kubernetes cluster containing your application deployed
26+
- A running Kubernetes cluster containing your deployed application
2727
- [Created](/identity-and-access-management/iam/how-to/create-api-keys/) an API key and retrieved your API secret key
2828

2929
<Message type="important">
@@ -45,7 +45,7 @@ destinations:
4545
protocol: "http"
4646
logs:
4747
enabled: true
48-
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
48+
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
4949
tenantId: "$COCKPIT_TOKEN"
5050

5151
metrics:
@@ -77,20 +77,20 @@ alloy-singleton:
7777
```
7878
7979
<Message type="note">
80-
The template above is for sending logs to your Cockpit. You can also configure it to send metrics to Cockpit using this Helm chart.
81-
Refer to our dedicated doucumentation to [send metrics from your cluster to Cockpit](/observability/cockpit/how-to/send-metrics-froms-k8s-to-cockpit).
80+
The template above is for sending logs to your Cockpit. You can also configure it to send metrics to Cockpit using this Helm chart.
81+
Refer to our dedicated documentation to [send metrics from your cluster to Cockpit](/observability/cockpit/how-to/send-metrics-froms-k8s-to-cockpit).
8282
</Message>
8383
8484
## Send Kubernetes logs using Helm chart
8585
86-
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.
86+
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.
8787

8888
1. [Connect](/containers/kubernetes/how-to/connect-cluster-kubectl/) `kubectl` to your Kubernetes cluster
8989
2. Run the command below to install the `k8s-monitoring` Helm chart:
9090
```
9191
helm install -f /your-path/to/values.yml name-of-your-choice-for-your-log-ingester k8s-monitoring --version 1.6.16
9292
```
93-
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`.
93+
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`.
9494

9595
Helm installs the `k8s-monitoring` chart, which includes the Alloy DaemonSet configured to collect logs from your Kubernetes cluster.
9696
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
133133
3. Save your changes.
134134
4. Run `terraform init` to initialize your Terraform configuration and download any necessary providers.
135135
5. Run `terraform apply` to apply your configuration.
136-
5. Type `yes` when prompted to confirm the actions.
136+
6. Type `yes` when prompted to confirm the actions.
137137
138138
## Explore your logs in Cockpit
139139
140-
1. Click **Cockpit** in the Observability section of the Scaleway [console](https://console.scaleway.com/) side menu. The **Cockpit** overview page displays.
140+
1. Click **Cockpit** in the Observability section of the Scaleway [console](https://console.scaleway.com/) side menu. The **Cockpit Overview** page displays.
141141
2. Click **Open dashboards** to open your managed dashboards in Grafana. You are redirected to the Grafana website.
142142
3. Log in to Grafana using your [Grafana credentials](/observability/cockpit/how-to/retrieve-grafana-credentials/).
143143
4. Click the **Home** icon, then click **Explore**.

observability/cockpit/how-to/send-metrics-from-k8s-to-cockpit.mdx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ dates:
1414
---
1515

1616

17-
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/).
17+
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/).
1818

1919
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.
2020

@@ -24,7 +24,7 @@ We will use the [k8s-monitoring](https://artifacthub.io/packages/helm/grafana/k8
2424
- [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
2525
- [Created](/observability/cockpit/how-to/create-external-data-sources/) a custom external data source of the [metrics type](/observability/cockpit/concepts/#data-types)
2626
- [Created](/observability/cockpit/how-to/create-token/) a Cockpit token in the same region as the metrics data source
27-
- A running Kubernetes cluster containing your application deployed
27+
- A running Kubernetes cluster containing your deployed application
2828
- [Created](/identity-and-access-management/iam/how-to/create-api-keys/) an API key and retrieved your API secret key
2929

3030
<Message type="important">
@@ -66,13 +66,13 @@ alloy-singleton:
6666
```
6767
6868
<Message type="note">
69-
The template above is for sending metrics to your Cockpit. You can also configure it to send logs to Cockpit using this Helm chart.
70-
Refer to our dedicated doucumentation to [send logs from your cluster to Cockpit](/observability/cockpit/how-to/send-logs-from-k8s-to-cockpit)
69+
The template above is for sending metrics to your Cockpit. You can also configure it to send logs to Cockpit using this Helm chart.
70+
Refer to our dedicated documentation to [send logs from your cluster to Cockpit](/observability/cockpit/how-to/send-logs-from-k8s-to-cockpit)
7171
</Message>
7272
7373
## Add annotations for auto-discovery
7474
75-
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.
75+
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.
7676

7777
### Kubernetes deployment template
7878

@@ -139,18 +139,18 @@ resource "kubernetes_deployment_v1" "your_application_deployment" {
139139
3. Save your changes.
140140
4. Run `terraform init` to initialize your Terraform configuration and download any necessary providers.
141141
5. Run `terraform apply` to apply your configuration.
142-
5. Type `yes` when prompted to confirm the actions.
142+
6. Type `yes` when prompted to confirm the actions.
143143
144144
## Send Kubernetes metrics using Helm chart
145145
146-
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.
146+
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.
147147
148148
1. [Connect](/containers/kubernetes/how-to/connect-cluster-kubectl/) `kubectl` to your Kubernetes cluster
149149
2. Run the command below to install the `k8s-monitoring` Helm chart:
150150
```
151151
helm install -f /your-path/to/values.yml name-of-your-choice-for-your-metric-ingester k8s-monitoring --version 1.6.16
152152
```
153-
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`.
153+
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`.
154154
155155
Helm installs the `k8s-monitoring` chart, which includes the Alloy DaemonSet configured to collect metrics from your Kubernetes cluster.
156156
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
166166

167167
Now that your metrics are exported to your Cockpit, you can access and query them.
168168

169-
1. Click **Cockpit** in the Observability section of the Scaleway [console](https://console.scaleway.com/) side menu. The **Cockpit** overview page displays.
169+
1. Click **Cockpit** in the Observability section of the Scaleway [console](https://console.scaleway.com/) side menu. The **Cockpit Overview** page displays.
170170
2. Click **Open dashboards** to open your managed dashboards in Grafana. You are redirected to the Grafana website.
171171
3. Log in to Grafana using your [Grafana credentials](/observability/cockpit/how-to/retrieve-grafana-credentials/).
172172
4. Click the **Home** icon, then click **Explore**.

0 commit comments

Comments
 (0)