Amazon VPC CNI

Supported OS Linux Mac OS Windows

Integration version0.1.0

To find out if this integration is available in your organization, see your Datadog Integrations page or ask your organization administrator.

To initiate an exception request to enable this integration for your organization, email support@ddog-gov.com.

Overview

The Amazon VPC CNI plugin for Kubernetes is the networking plugin deployed on each Amazon EC2 node in an Amazon EKS cluster. It manages elastic network interfaces (ENIs) and assigns private IPv4 or IPv6 addresses from the VPC to each pod.

This integration scrapes the Prometheus metrics exposed by the VPC CNI plugin (awscni_*) and provides visibility into IP address allocation, ENI usage, AWS API activity, and IPAMD health. It lets you replace ad-hoc awscni_* custom metrics with an official, curated integration.

Setup

Installation

If you are using Datadog Agent v6.8+, follow the instructions below to install the Amazon VPC CNI check on your host. See the dedicated Agent guide for installing community integrations to install checks with the Agent Manager or in a Docker environment.

  1. Download and launch the Datadog Agent.

  2. Run the following command to install the Agent integration:

    datadog-agent integration install -t datadog-amazon-vpc-cni==<INTEGRATION_VERSION>
    
  3. Configure your integration in the same way as core integrations.

Configuration

Metrics are enabled by default on the aws-node DaemonSet. To control them, set the environment variable DISABLE_METRICS to false. The plugin exposes metrics at http://localhost:61678/metrics on each node.

Because the aws-node DaemonSet runs with host networking, localhost only resolves to the IPAMD endpoint when the Agent also runs with host networking (or directly on the node). If the Agent runs as a pod without host networking, set openmetrics_endpoint to the node’s IP address, for example http://<NODE_IP>:61678/metrics, or use Autodiscovery to resolve the node address.

  1. Edit the amazon_vpc_cni.d/conf.yaml file in the conf.d/ folder at the root of your Agent’s configuration directory to start collecting your Amazon VPC CNI metrics. See the sample amazon_vpc_cni.d/conf.yaml for all available configuration options.

  2. Restart the Agent.

Validation

Run the Agent’s status subcommand and look for amazon_vpc_cni under the Checks section.

Data Collected

Metrics

amazon_vpc_cni.ipamd_action_inprogress
(gauge)
The number of ipamd actions in progress.
amazon_vpc_cni.eni_max
(gauge)
The maximum number of ENIs that can be attached to the instance (accounting for unmanaged ENIs).
amazon_vpc_cni.ip_max
(gauge)
The maximum number of IP addresses that can be allocated to the instance.
amazon_vpc_cni.eni_allocated
(gauge)
The number of ENIs allocated.
amazon_vpc_cni.total_ip_addresses
(gauge)
The total number of IP addresses.
amazon_vpc_cni.assigned_ip_addresses
(gauge)
The number of IP addresses assigned to pods.
amazon_vpc_cni.total_ipv4_prefixes
(gauge)
The total number of IPv4 prefixes.
amazon_vpc_cni.assigned_ip_per_cidr
(gauge)
The total number of IP addresses assigned per CIDR.
amazon_vpc_cni.assigned_ip_per_eni
(gauge)
The number of allocated IPs partitioned by ENI.
amazon_vpc_cni.connmark_backend
(gauge)
The connmark backend in use; the active backend series is set to 1.
amazon_vpc_cni.ipamd_error_count.count
(count)
The number of errors encountered in ipamd.
amazon_vpc_cni.reconcile_count.count
(count)
The number of times ipamd reconciles on ENIs and IP/Prefix addresses.
amazon_vpc_cni.add_ip_req_count.count
(count)
The number of add IP address requests.
amazon_vpc_cni.del_ip_req_count.count
(count)
The number of delete IP address requests.
amazon_vpc_cni.pod_eni_error_count.count
(count)
The number of errors encountered for pod ENIs.
amazon_vpc_cni.aws_api_error_count.count
(count)
The number of times AWS API returns an error.
amazon_vpc_cni.aws_utils_error_count.count
(count)
The number of errors not handled in the awsutils library.
amazon_vpc_cni.ec2api_req_count.count
(count)
The number of requests made to EC2 APIs by the CNI.
amazon_vpc_cni.ec2api_error_count.count
(count)
The number of failed EC2 API requests.
amazon_vpc_cni.sagemakerapi_req_count.count
(count)
The number of requests made to SageMaker APIs by the CNI.
amazon_vpc_cni.sagemakerapi_error_count.count
(count)
The number of failed SageMaker API requests.
amazon_vpc_cni.force_removed_enis.count
(count)
The number of ENIs force removed while they had assigned pods.
amazon_vpc_cni.force_removed_ips.count
(count)
The number of IPs force removed while they had assigned pods.
amazon_vpc_cni.no_available_ip_addresses.count
(count)
The number of pod IP assignments that fail due to no available IP addresses.
amazon_vpc_cni.connmark_reconcile_total.count
(count)
The number of connmark reconciliations by result.
amazon_vpc_cni.aws_api_latency_ms.count
(count)
Number of AWS API latency observations.
amazon_vpc_cni.aws_api_latency_ms.sum
(count)
Sum of AWS API call latencies.
Shown as millisecond
amazon_vpc_cni.ipamd_startup_duration_seconds.count
(count)
Number of IPAMD startup duration observations.
amazon_vpc_cni.ipamd_startup_duration_seconds.sum
(count)
Sum of IPAMD startup durations.
Shown as second
amazon_vpc_cni.ipamd_startup_duration_seconds.bucket
(count)
Histogram buckets of IPAMD startup durations.
amazon_vpc_cni.ipamd_node_initialization_duration_seconds.count
(count)
Number of node initialization duration observations.
amazon_vpc_cni.ipamd_node_initialization_duration_seconds.sum
(count)
Sum of node initialization durations.
Shown as second
amazon_vpc_cni.ipamd_node_initialization_duration_seconds.bucket
(count)
Histogram buckets of node initialization durations.

Service Checks

amazon_vpc_cni.openmetrics.health

Returns CRITICAL if the Agent is unable to connect to the Amazon VPC CNI OpenMetrics endpoint, otherwise returns OK.

Statuses: ok, critical

Events

The Amazon VPC CNI integration does not include any events.

Troubleshooting

Need help? Contact Datadog support.

Further Reading