Skip to content

Commit adf9f87

Browse files
author
Bibas
committed
Update documentation to follow upgrade of k8s-monitoring from 1.6.16 to 2.0.2
1 parent 98244d3 commit adf9f87

File tree

2 files changed

+56
-69
lines changed

2 files changed

+56
-69
lines changed

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

Lines changed: 33 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -32,57 +32,48 @@ In this example, we use [k8s-monitoring](https://artifacthub.io/packages/helm/gr
3232

3333
## Configure the Helm chart
3434

35-
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.
35+
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.
3636

3737
```yaml
3838
cluster:
39-
name: "$SCW_CLUSTER_NAME"
40-
externalServices:
41-
loki:
42-
host: "$COCKPIT_CUSTOM_DATASOURCE_HOST"
39+
name: "$SCW_CLUSTER_NAME"
40+
global:
41+
scrape_interval: 60s
42+
destinations:
43+
- name: "my-cockpit-logs"
44+
type: "loki"
45+
protocol: "http"
46+
logs:
47+
enabled: true
48+
url: "$COCKPIT_CUSTOM_DATASOURCE_HOST/loki/api/v1/push"
4349
tenantId: "$COCKPIT_TOKEN"
44-
authMode: none
45-
externalLabels: {
46-
cluster: "$SCW_CLUSTER_NAME"
47-
}
48-
49-
logs:
50+
51+
metrics:
52+
enabled: false
53+
traces:
54+
enabled: false
55+
clusterEvents:
5056
enabled: true
51-
pod_logs:
57+
destinations: ["my-cockpit-logs"]
58+
# -- Node logs.
59+
nodeLogs:
5260
enabled: true
53-
discovery: "all"
54-
# This annotation is mandatory to gather your logs
55-
annotation: "cockpit.scw.cloud/logs.autogather"
56-
# -- Only capture logs from pods in these namespaces (`[]` means all namespaces).
57-
namespaces: []
58-
# -- Do not capture logs from any pods in these namespaces.
59-
excludeNamespaces: []
60-
61-
metrics:
62-
enabled: false
63-
kube-state-metrics:
64-
enabled: false
65-
prometheus-node-exporter:
66-
enabled: false
67-
prometheus-operator-crds:
68-
enabled: false
69-
opencost:
70-
enabled: false
71-
72-
alloy:
73-
logging:
74-
level: info
75-
format: logfmt
76-
alloy-events:
77-
logging:
78-
level: info
79-
format: logfmt
61+
destinations: ["my-cockpit-logs"]
62+
# -- Pod logs.
63+
podLogs:
64+
enabled: true
65+
destinations: ["my-cockpit-logs"]
66+
volumeGatherSettings:
67+
onlyGatherNewLogLines: true
68+
69+
# An Alloy instance for collecting log data.
8070
alloy-logs:
71+
enabled: true
8172
logging:
82-
# -- Level at which Alloy log lines should be written.
8373
level: info
84-
# -- Format to use for writing Alloy log lines.
8574
format: logfmt
75+
alloy-singleton:
76+
enabled: true
8677
```
8778
8879
<Message type="info">
@@ -119,7 +110,7 @@ You can check our guide to [send metrics from your cluster to Cockpit](// ADD LI
119110
name = "my-log-ingester"
120111
repository = "https://grafana.github.io/helm-charts"
121112
chart = "k8s-monitoring"
122-
version = "1.6.16"
113+
version = "2.0.2"
123114
124115
namespace = "log-ingester"
125116
create_namespace = true

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

Lines changed: 23 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -34,39 +34,35 @@ In this example, we use [k8s-monitoring](https://artifacthub.io/packages/helm/gr
3434

3535
## Configure the Helm chart
3636

37-
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.
37+
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.
3838

3939
```yaml
4040
cluster:
4141
name: "$SCW_CLUSTER_NAME"
42-
externalServices:
43-
prometheus:
44-
host: "$COCKPIT_CUSTOM_DATASOURCE_HOST"
42+
global:
43+
scrape_interval: 60s
44+
destinations:
45+
- name: "my-cockpit-metrics"
46+
type: "prometheus"
47+
protocol: "http"
48+
metrics:
49+
enabled: true
50+
url: "$COCKPIT_CUSTOM_DATASOURCE_HOST/api/v1/push"
4551
tenantId: "$COCKPIT_TOKEN"
46-
writeEndpoint: "/api/v1/push"
47-
authMode: none
48-
externalLabels: {
49-
cluster: "$SCW_CLUSTER_NAME"
50-
}
52+
53+
logs:
54+
enabled: false
55+
traces:
56+
enabled: false
57+
58+
annotationAutodiscovery:
59+
enabled: true
60+
destinations: ["my-cockpit-metrics"]
5161

52-
metrics:
62+
alloy-metrics:
63+
enabled: true
64+
alloy-singleton:
5365
enabled: true
54-
scrapeInterval: 60s
55-
autoDiscover:
56-
enabled: true
57-
# -- Only capture metrics from pods in these namespaces (`[]` means all namespaces).
58-
namespaces: []
59-
60-
logs:
61-
enabled: false
62-
kube-state-metrics:
63-
enabled: false
64-
prometheus-node-exporter:
65-
enabled: false
66-
prometheus-operator-crds:
67-
enabled: false
68-
opencost:
69-
enabled: false
7066
```
7167
7268
<Message type="info">
@@ -135,7 +131,7 @@ resource "kubernetes_deployment_v1" "your_application_deployment" {
135131
name = "my-metrics-ingester"
136132
repository = "https://grafana.github.io/helm-charts"
137133
chart = "k8s-monitoring"
138-
version = "1.6.16"
134+
version = "2.0.2"
139135
140136
namespace = "metrics-ingester"
141137
create_namespace = true

0 commit comments

Comments
 (0)