master
md 196 lines 7.99 KB
Rendered Raw
1 <!--startmeta
2 custom_edit_url: "https://github.com/netdata/netdata/edit/master/src/collectors/cgroups.plugin/integrations/kubernetes_containers.md"
3 meta_yaml: "https://github.com/netdata/netdata/edit/master/src/collectors/cgroups.plugin/metadata.yaml"
4 sidebar_label: "Kubernetes Containers"
5 learn_status: "Published"
6 learn_rel_path: "Collecting Metrics/Collectors/Containers and VMs"
7 keywords: ['k8s', 'kubernetes', 'pods', 'containers', 'openshift', 'rancher', 'rke', 'rke2', 'k3s', 'microk8s', 'eks', 'gke', 'aks', 'tanzu', 'minikube', 'kind', 'containerd', 'cri-o', 'kubelet', 'kubepods']
8 message: "DO NOT EDIT THIS FILE DIRECTLY, IT IS GENERATED BY THE COLLECTOR'S metadata.yaml FILE"
9 endmeta-->
10
11 # Kubernetes Containers
12
13
14 <img src="https://netdata.cloud/img/kubernetes.svg" width="150"/>
15
16
17 Plugin: cgroups.plugin
18 Module: /sys/fs/cgroup
19
20 <img src="https://img.shields.io/badge/maintained%20by-Netdata-%2300ab44" />
21
22 ## Overview
23
24 Monitor containers and virtual machines resource utilization — CPU, memory, disk I/O, and network — via Linux cgroups.
25
26
27
28 This collector is only supported on the following platforms:
29
30 - Linux
31
32 This collector supports collecting metrics from multiple instances of this integration, including remote instances.
33
34
35 Kubernetes Containers can be monitored further using the following other integrations:
36
37 - [Kubernetes Cluster State](/src/go/plugin/go.d/collector/k8s_state/integrations/kubernetes_cluster_state.md)
38 - [Kubernetes API Server](/src/go/plugin/go.d/collector/k8s_apiserver/integrations/kubernetes_api_server.md)
39 - [Kubelet](/src/go/plugin/go.d/collector/k8s_kubelet/integrations/kubelet.md)
40 - [Kubeproxy](/src/go/plugin/go.d/collector/k8s_kubeproxy/integrations/kubeproxy.md)
41 - [CoreDNS](/src/go/plugin/go.d/collector/coredns/integrations/coredns.md)
42
43 ### Default Behavior
44
45 #### Auto-Detection
46
47 This integration doesn't support auto-detection.
48
49 #### Limits
50
51 The default configuration for this integration does not impose any limits on data collection.
52
53 #### Performance Impact
54
55 The default configuration for this integration is not expected to impose a significant performance impact on the system.
56
57 ## Setup
58
59
60 ### Prerequisites
61
62 No action required.
63
64 ### Configuration
65
66 #### Options
67
68
69
70 There are no configuration options.
71
72
73
74 #### via File
75
76 There is no configuration file.
77
78 ##### Examples
79 There are no configuration examples.
80
81
82
83 ## Alerts
84
85
86 The following alerts are available:
87
88 | Alert name | On metric | Description |
89 |:------------|:----------|:------------|
90 | [ k8s_cgroup_10min_cpu_usage ](https://github.com/netdata/netdata/blob/master/src/health/health.d/cgroups.conf) | k8s.cgroup.cpu_limit | average cgroup CPU utilization over the last 10 minutes |
91 | [ k8s_cgroup_ram_in_use ](https://github.com/netdata/netdata/blob/master/src/health/health.d/cgroups.conf) | k8s.cgroup.mem_usage | cgroup memory utilization |
92 | [ k8s_cgroup_1m_received_packets_rate ](https://github.com/netdata/netdata/blob/master/src/health/health.d/cgroups.conf) | k8s.cgroup.net_packets | average number of packets received by the network interface ${label:device} over the last minute |
93 | [ k8s_cgroup_10s_received_packets_storm ](https://github.com/netdata/netdata/blob/master/src/health/health.d/cgroups.conf) | k8s.cgroup.net_packets | ratio of average number of received packets for the network interface ${label:device} over the last 10 seconds, compared to the rate over the last minute |
94
95
96 ## Metrics
97
98 Metrics grouped by *scope*.
99
100 The scope defines the instance that the metric belongs to. An instance is uniquely identified by a set of labels.
101
102
103
104 ### Per k8s cgroup
105
106 These metrics refer to the Pod container.
107
108 Labels:
109
110 | Label | Description |
111 |:-----------|:----------------|
112 | k8s_node_name | Node name. The value of _pod.spec.nodeName_. |
113 | k8s_namespace | Namespace name. The value of _pod.metadata.namespace_. |
114 | k8s_controller_kind | Controller kind (ReplicaSet, DaemonSet, StatefulSet, Job, etc.). The value of _pod.OwnerReferences.Controller.Kind_. |
115 | k8s_controller_name | Controller name.The value of _pod.OwnerReferences.Controller.Name_. |
116 | k8s_pod_name | Pod name. The value of _pod.metadata.name_. |
117 | k8s_container_name | Container name. The value of _pod.spec.containers.name_. |
118 | k8s_kind | Instance kind: "pod" or "container". |
119 | k8s_qos_class | QoS class (guaranteed, burstable, besteffort). |
120 | k8s_cluster_id | Cluster ID. The value of kube-system namespace _namespace.metadata.uid_. |
121
122 Metrics:
123
124 | Metric | Dimensions | Unit |
125 |:------|:----------|:----|
126 | k8s.cgroup.cpu_limit | used | percentage |
127 | k8s.cgroup.cpu | user, system | percentage |
128 | k8s.cgroup.cpu_per_core | a dimension per core | percentage |
129 | k8s.cgroup.throttled | throttled | percentage |
130 | k8s.cgroup.throttled_duration | duration | ms |
131 | k8s.cgroup.cpu_shares | shares | shares |
132 | k8s.cgroup.mem | cache, rss, swap, rss_huge, mapped_file | MiB |
133 | k8s.cgroup.writeback | dirty, writeback | MiB |
134 | k8s.cgroup.mem_activity | in, out | MiB/s |
135 | k8s.cgroup.pgfaults | pgfault, swap | MiB/s |
136 | k8s.cgroup.mem_usage | ram, swap | MiB |
137 | k8s.cgroup.mem_usage_limit | available, used | MiB |
138 | k8s.cgroup.mem_utilization | utilization | percentage |
139 | k8s.cgroup.mem_failcnt | failures | count |
140 | k8s.cgroup.io | read, write | KiB/s |
141 | k8s.cgroup.serviced_ops | read, write | operations/s |
142 | k8s.cgroup.throttle_io | read, write | KiB/s |
143 | k8s.cgroup.throttle_serviced_ops | read, write | operations/s |
144 | k8s.cgroup.queued_ops | read, write | operations |
145 | k8s.cgroup.merged_ops | read, write | operations/s |
146 | k8s.cgroup.cpu_some_pressure | some10, some60, some300 | percentage |
147 | k8s.cgroup.cpu_some_pressure_stall_time | time | ms |
148 | k8s.cgroup.cpu_full_pressure | some10, some60, some300 | percentage |
149 | k8s.cgroup.cpu_full_pressure_stall_time | time | ms |
150 | k8s.cgroup.memory_some_pressure | some10, some60, some300 | percentage |
151 | k8s.cgroup.memory_some_pressure_stall_time | time | ms |
152 | k8s.cgroup.memory_full_pressure | some10, some60, some300 | percentage |
153 | k8s.cgroup.memory_full_pressure_stall_time | time | ms |
154 | k8s.cgroup.io_some_pressure | some10, some60, some300 | percentage |
155 | k8s.cgroup.io_some_pressure_stall_time | time | ms |
156 | k8s.cgroup.io_full_pressure | some10, some60, some300 | percentage |
157 | k8s.cgroup.io_full_pressure_stall_time | time | ms |
158 | k8s.cgroup.pids_current | pids | pids |
159
160 ### Per k8s cgroup network device
161
162 These metrics refer to the Pod container network interface.
163
164 Labels:
165
166 | Label | Description |
167 |:-----------|:----------------|
168 | device | The name of the host network interface linked to the container's network interface. |
169 | container_device | Container network interface name. |
170 | interface_type | Network interface type. Always "virtual" for the containers. |
171 | k8s_node_name | Node name. The value of _pod.spec.nodeName_. |
172 | k8s_namespace | Namespace name. The value of _pod.metadata.namespace_. |
173 | k8s_controller_kind | Controller kind (ReplicaSet, DaemonSet, StatefulSet, Job, etc.). The value of _pod.OwnerReferences.Controller.Kind_. |
174 | k8s_controller_name | Controller name.The value of _pod.OwnerReferences.Controller.Name_. |
175 | k8s_pod_name | Pod name. The value of _pod.metadata.name_. |
176 | k8s_container_name | Container name. The value of _pod.spec.containers.name_. |
177 | k8s_kind | Instance kind: "pod" or "container". |
178 | k8s_qos_class | QoS class (guaranteed, burstable, besteffort). |
179 | k8s_cluster_id | Cluster ID. The value of kube-system namespace _namespace.metadata.uid_. |
180
181 Metrics:
182
183 | Metric | Dimensions | Unit |
184 |:------|:----------|:----|
185 | k8s.cgroup.net_net | received, sent | kilobits/s |
186 | k8s.cgroup.net_packets | received, sent, multicast | pps |
187 | k8s.cgroup.net_errors | inbound, outbound | errors/s |
188 | k8s.cgroup.net_drops | inbound, outbound | errors/s |
189 | k8s.cgroup.net_fifo | receive, transmit | errors/s |
190 | k8s.cgroup.net_compressed | receive, sent | pps |
191 | k8s.cgroup.net_events | frames, collisions, carrier | events/s |
192 | k8s.cgroup.net_operstate | up, down, notpresent, lowerlayerdown, testing, dormant, unknown | state |
193 | k8s.cgroup.net_carrier | up, down | state |
194 | k8s.cgroup.net_mtu | mtu | octets |
195
196