Add documentation for claiming k8s parent pods and Prometheus service discovery (#10001)
* Quick fix to Pi guide * Add claiming instructions * Remove specific number and change sd text * Slight tweaks to sd text * Remove 23 in packaging doc
Joel Hans committed
Sep 30, 2020 at 06:41 UTC
e788b1a8547fcb444ba4cba1adb863457c84d472
4 files changed
+72
-16
claim/README.md
+5
@@ -135,6 +135,11 @@ with the name of your container if different.
135
docker logs netdata 2>&1 | grep -E --line-buffered 'ACLK|claim|cloud'
136
```
137
138
+### Claim a Kubernetes cluster's parent Netdata pod
139
+
140
+Read our [Kubernetes installation](/packaging/installer/methods/kubernetes.md#claim-a-kubernetes-clusters-parent-pod)
141
+for details on claiming a parent Netdata pod.
142
+
143
### Claim through a proxy
144
145
A Space's administrator can claim a node through a SOCKS5 or HTTP(S) proxy.
docs/guides/monitor/kubernetes-k8s-netdata.md
+11
-8
@@ -28,11 +28,13 @@ your k8s infrastructure.
28
29
- A [Helm chart](https://github.com/netdata/helmchart), which bootstraps a Netdata Agent pod on every node in your
30
cluster, plus an additional parent pod for storing metrics and managing alarm notifications.
31
-- A [service discovery plugin](https://github.com/netdata/agent-service-discovery), which discovers and immediately
32
- monitors 22 different services that might be running inside of your cluster's pods. Service discovery happens
33
- without manual intervention as pods are created, destroyed, or moved between nodes. [Compatible
34
- services](https://github.com/netdata/helmchart#service-discovery-and-supported-services) include Nginx, Apache,
35
- MySQL, CoreDNS, and much more.
31
+- A [service discovery plugin](https://github.com/netdata/agent-service-discovery), which discovers and creates
32
+ configuration files for [compatible
33
+ applications](https://github.com/netdata/helmchart#service-discovery-and-supported-services) and any endpoints
34
+ covered by our [generic Prometheus
35
+ collector](https://learn.netdata.cloud/docs/agent/collectors/go.d.plugin/modules/prometheus). With these
36
+ configuration files, Netdata collects metrics from any compatible applications as they run _inside_ of a pod.
37
+ Service discovery happens without manual intervention as pods are created, destroyed, or moved between nodes.
38
- A [Kubelet collector](https://learn.netdata.cloud/docs/agent/collectors/go.d.plugin/modules/k8s_kubelet), which runs
39
on each node in a k8s cluster to monitor the number of pods/containers, the volume of operations on each container,
40
and more.
@@ -143,9 +145,10 @@ Thanks to Netdata's service discovery feature, you monitor containerized applica
145
configuration or manual intervention. Service discovery is like a watchdog for created or deleted pods, recognizing the
146
service they run based on the image name and port and immediately attempting to apply a logical default configuration.
147
146
-Service configuration supports [22
147
-services](https://github.com/netdata/helmchart#service-discovery-and-supported-services), which are automatically added
148
-or removed from Netdata as soon as the pods are created or destroyed.
148
+Service configuration supports [popular
149
+applications](https://github.com/netdata/helmchart#service-discovery-and-supported-services), plus any endpoints covered
150
+by our [generic Prometheus collector](https://learn.netdata.cloud/docs/agent/collectors/go.d.plugin/modules/prometheus),
151
+which are automatically added or removed from Netdata as soon as the pods are created or destroyed.
152
153
You can find these service discovery sections near the bottom of the menu. The names for these sections follow a
154
pattern: the name of the detected service, followed by a string of the module name, pod TUID, service type, port
docs/guides/monitor/pi-hole-raspberry-pi.md
+2
-2
@@ -31,8 +31,8 @@ directly using a keyboard, mouse, and monitor.
31
Netdata helps you monitor and troubleshoot all kinds of devices and the applications they run, including IoT devices
32
like the Raspberry Pi and applications like Pi-hole.
33
34
-After a two-minute installation and with zero configuration, you'll be able all of Pi-hole's metrics, including the
35
-volume of queries, connected clients, DNS queries per type, top clients, top blocked domains, and more.
34
+After a two-minute installation and with zero configuration, you'll be able to seeall of Pi-hole's metrics, including
35
+the volume of queries, connected clients, DNS queries per type, top clients, top blocked domains, and more.
36
37
With Netdata installed, you can also monitor system metrics and any other applications you might be running. By default,
38
Netdata collects metrics on CPU usage, disk IO, bandwidth, per-application resource usage, and a ton more. With the
packaging/installer/methods/kubernetes.md
+54
-6
@@ -11,9 +11,10 @@ will use Netdata's [Helm chart](https://github.com/netdata/helmchart) to bootstr
11
The Helm chart installs one parent pod for storing metrics and managing alarm notifications plus an additional child pod
12
for every node in the cluster.
13
14
-Each child pod will collect metrics from the node it runs on in addition to [22 supported
15
-services](https://github.com/netdata/helmchart#service-discovery-and-supported-services) via [service
16
-discovery](https://github.com/netdata/agent-service-discovery/). Each child pod will also collect
14
+Each child pod will collect metrics from the node it runs on, in addition to [compatible
15
+applications](https://github.com/netdata/helmchart#service-discovery-and-supported-services), plus any endpoints covered
16
+by our [generic Prometheus collector](https://learn.netdata.cloud/docs/agent/collectors/go.d.plugin/modules/prometheus),
17
+via [service discovery](https://github.com/netdata/agent-service-discovery/). Each child pod will also collect
18
[cgroups](/collectors/cgroups.plugin/README.md),
19
[Kubelet](https://learn.netdata.cloud/docs/agent/collectors/go.d.plugin/modules/k8s_kubelet), and
20
[kube-proxy](https://learn.netdata.cloud/docs/agent/collectors/go.d.plugin/modules/k8s_kubeproxy) metrics from its node.
@@ -84,8 +85,9 @@ metrics from the service they run. The Netdata Helm chart installs this service
85
86
Service discovery scans your cluster for pods exposed on certain ports and with certain image names. By default, it
87
looks for its supported services on the ports they most commonly listen on, and using default image names. Service
87
-discovery currently supports [22 popular
88
-services](https://github.com/netdata/helmchart#service-discovery-and-supported-services).
88
+discovery currently supports [popular
89
+applications](https://github.com/netdata/helmchart#service-discovery-and-supported-services), plus any endpoints covered
90
+by our [generic Prometheus collector](https://learn.netdata.cloud/docs/agent/collectors/go.d.plugin/modules/prometheus).
91
92
If you haven't changed listening ports or other defaults, service discovery should find your pods, create the proper
93
configurations based on the service that pod runs, and begin monitoring them immediately after depolyment.
@@ -138,6 +140,52 @@ netdata LoadBalancer 10.245.160.131 203.0.113.0 19999:32231/
140
141
In the above example, access the dashboard by navigating to `http://203.0.113.0:19999`.
142
143
+## Claim a Kubernetes cluster's parent pod
144
+
145
+You can [claim](/claim/README.md) a cluster's parent Netdata pod to see its real-time metrics alongside any other nodes
146
+you monitor using [Netdata Cloud](https://app.netdata.cloud).
147
+
148
+> Netdata Cloud does not currently support claiming child nodes because the Helm chart does not allocate a persistent
149
+> volume for them.
150
+
151
+Ensure persistence is enabled on the parent pod by running the following `helm upgrade` command.
152
+
153
+```bash
154
+helm upgrade \
155
+ --set parent.database.persistence=true \
156
+ --set parent.alarms.persistence=true \
157
+ netdata ./netdata-helmchart
158
+```
159
+
160
+Next, find your claiming script in Netdata Cloud by clicking on your Space's dropdown, then **Manage your Space**. Click
161
+the **Nodes** tab. Netdata Cloud shows a script similar to the following:
162
+
163
+```bash
164
+sudo netdata-claim.sh -token=TOKEN -rooms=ROOM1,ROOM2 -url=https://app.netdata.cloud
165
+```
166
+
167
+You will need the values of `TOKEN` and `ROOM1,ROOM2` for the command, which sets `parent.claiming.enabled`,
168
+`parent.claiming.token`, and `parent.claiming.rooms` to complete the parent pod claiming process.
169
+
170
+Run the following `helm upgrade` command after replacing `TOKEN` and `ROOM1,ROOM2` with the values found in the claiming
171
+script from Netdata Cloud. The quotations are required.
172
+
173
+```bash
174
+helm upgrade \
175
+ --set parent.claiming.enabled=true \
176
+ --set parent.claiming.token="TOKEN" \
177
+ --set parent.claiming.rooms="ROOM1,ROOM2" \
178
+ netdata ./netdata-helmchart
179
+```
180
+
181
+The cluster terminates the old parent pod and creates a new one with the proper claiming configuration. You can see your
182
+parent pod in Netdata Cloud after a few moments. You can now [build new
183
+dashboards](https://learn.netdata.cloud/docs/cloud/visualize/dashboards) using the parent pod's metrics or run [Metric
184
+Correlations](https://learn.netdata.cloud/docs/cloud/insights/metric-correlations) to troubleshoot anomalies.
185
+
186
+
188
+
189
## Update/reinstall the Netdata Helm chart
190
191
If you update the Helm chart's configuration, run `helm upgrade` to redeploy your Netdata service, replacing `netdata`
@@ -158,4 +206,4 @@ especially if you want to change any of the configuration settings for either th
206
To futher configure Netdata for your cluster, see our [Helm chart repository](https://github.com/netdata/helmchart) and
207
the [service discovery repository](https://github.com/netdata/agent-service-discovery/).
208
161
-[](<>)
209
+[](<>)