Relevant fields in performance log events for Amazon EKS and Kubernetes
For Amazon EKS and Kubernetes, the containerized CloudWatch agent emits data as performance log events. This enables CloudWatch to ingest and store high-cardinality data. CloudWatch uses the data in the performance log events to create aggregated CloudWatch metrics at the cluster, node, and pod levels without the need to lose granular details.
The following table lists the fields in these performance log events that are relevant to the collection of Container Insights metric data. You can use CloudWatch Logs Insights to query for any of these fields to collect data or investigate issues. For more information, see Analyze Log Data With CloudWatch Logs Insights.
Type | Log field | Source | Formula or notes |
---|---|---|---|
Pod |
|
Calculated |
Formula: |
Pod |
|
cadvisor |
|
Pod |
|
Calculated |
Formula:
If any containers in the pod don't have a CPU limit defined, this field
doesn't appear in the log event. This includes init containers |
Pod |
|
Calculated |
Formula:
|
Pod |
|
Calculated |
Formula: |
Pod |
|
Calculated |
Formula: |
Pod |
|
Calculated |
Formula: It is the percentage of pod memory usage over the node memory limitation. |
Pod |
|
cadvisor |
|
Pod |
|
Calculated |
Formula: If any containers in the pod don't have a memory limit defined, this field
doesn't appear in the log event. This includes init containers |
Pod |
|
Calculated |
Formula:
|
Pod |
|
Calculated |
Formula: If any containers in the pod don't have a memory limit defined, this field
doesn't appear in the log event. This includes init containers |
Pod |
|
Calculated |
Formula: |
Pod |
|
Calculated |
Formula: This data is available for all the network interfaces per pod. The CloudWatch agent calculates the total and adds metric extraction rules. |
Pod |
|
Calculated |
Formula: |
Pod |
|
Calculated |
Formula: |
PodNet |
|
cadvisor |
This data is network rx bytes per second of a pod network interface. |
PodNet |
|
cadvisor |
This data is network tx bytes per second of a pod network interface. |
Container |
|
cadvisor |
|
Container |
|
cadvisor |
Not guaranteed to be set. It's not emitted if it's not set. |
Container |
|
cadvisor |
Not guaranteed to be set. It's not emitted if it's not set. |
Container |
|
cadvisor |
|
Container |
|
pod |
Not guaranteed to be set. It's not emitted if it's not set. |
Container |
|
pod |
Not guaranteed to be set. It's not emitted if it's not set. |
Node |
|
Calculated |
Formula: |
Node |
|
cadvisor |
|
Node |
|
/proc |
|
Node |
|
Calculated |
Formula: For cronjobs, |
Node |
|
Calculated |
Formula: |
Node |
|
Calculated |
Formula: |
Node |
|
cadvisor |
|
Node |
|
/proc |
|
Node |
|
Calculated |
Formula: |
Node |
|
Calculated |
Formula: |
Node |
|
Calculated |
Formula: |
Node |
|
Calculated |
Formula: |
Node |
|
Calculated |
Formula: |
Node |
|
Pod List |
|
Node |
|
Pod List |
|
NodeNet |
|
cadvisor |
This data is network rx bytes per second of a worker node network interface. |
NodeNet |
|
cadvisor |
This data is network tx bytes per second of a worker node network interface. |
NodeFS |
|
cadvisor |
|
NodeFS |
|
cadvisor |
|
NodeFS |
|
Calculated |
Formula: This data is available per device name. |
Cluster |
|
API Server |
|
Cluster |
|
API Server |
|
Service |
|
API Server |
|
|
|
API Server |
Metrics calculation examples
This section includes examples that show how some of the values in the preceding table are calculated.
Suppose that you have a cluster in the following state.
Node1 node_cpu_limit = 4 node_cpu_usage_total = 3 Pod1 pod_cpu_usage_total = 2 Container1 container_cpu_limit = 1 container_cpu_request = 1 container_cpu_usage_total = 0.8 Container2 container_cpu_limit = null container_cpu_request = null container_cpu_usage_total = 1.2 Pod2 pod_cpu_usage_total = 0.4 Container3 container_cpu_limit = 1 container_cpu_request = 0.5 container_cpu_usage_total = 0.4 Node2 node_cpu_limit = 8 node_cpu_usage_total = 1.5 Pod3 pod_cpu_usage_total = 1 Container4 container_cpu_limit = 2 container_cpu_request = 2 container_cpu_usage_total = 1
The following table shows how pod CPU metrics are calculated using this data.
Metric | Formula | Pod1 | Pod2 | Pod3 |
---|---|---|---|---|
|
|
2 / 4 = 50% |
0.4 / 4 = 10% |
1 / 8 = 12.5% |
|
|
N/A because CPU limit for |
0.4 / 1 = 40% |
1 / 2 = 50% |
|
|
(1 + 0) / 4 = 25% |
0.5 / 4 = 12.5% |
2 / 8 = 25% |
The following table shows how node CPU metrics are calculated using this data.
Metric | Formula | Node1 | Node2 |
---|---|---|---|
|
|
3 / 4 = 75% |
1.5 / 8 = 18.75% |
|
|
1.5 / 4 = 37.5% |
2 / 8 = 25% |