Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ code-coverage.datadog.yml @DataDog/agent-integr
/alertnow/ @Uijong-Kim uijong.kim@bespinglobal.com @DataDog/ecosystems-review
/algorithmia/ @koverholt support@algorithmia.io @DataDog/ecosystems-review
/altostra/ @yevk @altostra/engineering @DataDog/ecosystems-review
/amazon_vpc_cni/ @willianccs willianccs@gmail.com @DataDog/ecosystems-review
/ambassador/ @datawire hello@datawire.io @DataDog/ecosystems-review
/amixr/ @iskhakov ildar@amixr.io @DataDog/ecosystems-review
/apache-apisix/ @bisakhmondal bisakhmondal00@gmail.com @DataDog/ecosystems-review
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/test-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,25 @@ jobs:
test-py3: ${{ inputs.test-py3 }}
setup-env-vars: "${{ inputs.setup-env-vars }}"
secrets: inherit
ja9c433d:
uses: DataDog/integrations-core/.github/workflows/test-target.yml@5f6b58dfb609ea0afb37762612dbb6e2c37d2933
with:
job-name: Amazon VPC CNI
target: amazon_vpc_cni
platform: linux
runner: '["ubuntu-22.04"]'
repo: "${{ inputs.repo }}"
context: ${{ inputs.context }}
python-version: "${{ inputs.python-version }}"
latest: ${{ inputs.latest }}
agent-image: "${{ inputs.agent-image }}"
agent-image-py2: "${{ inputs.agent-image-py2 }}"
agent-image-windows: "${{ inputs.agent-image-windows }}"
agent-image-windows-py2: "${{ inputs.agent-image-windows-py2 }}"
test-py2: ${{ inputs.test-py2 }}
test-py3: ${{ inputs.test-py3 }}
setup-env-vars: "${{ inputs.setup-env-vars }}"
secrets: inherit
j7a4721a:
uses: DataDog/integrations-core/.github/workflows/test-target.yml@5f6b58dfb609ea0afb37762612dbb6e2c37d2933
with:
Expand Down
7 changes: 7 additions & 0 deletions amazon_vpc_cni/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# CHANGELOG - Amazon VPC CNI

## 0.1.0 / 2026-09-15

***Added***:

* Initial release of the Amazon VPC CNI integration.
68 changes: 68 additions & 0 deletions amazon_vpc_cni/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Agent Check: Amazon VPC CNI

## Overview

The [Amazon VPC CNI plugin for Kubernetes][13] 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][1] to install checks with the [Agent Manager][2] or in a [Docker environment][4].

1. [Download and launch the Datadog Agent][3].
2. Run the following command to install the Agent integration:

```shell
datadog-agent integration install -t datadog-amazon-vpc-cni==<INTEGRATION_VERSION>
```

3. Configure your integration in the same way as core [integrations][5].

### Configuration

Comment thread
willianccs marked this conversation as resolved.
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][6] to start collecting your Amazon VPC CNI metrics. See the [sample amazon_vpc_cni.d/conf.yaml][7] for all available configuration options.

2. [Restart the Agent][8].

### Validation

[Run the Agent's status subcommand][9] and look for `amazon_vpc_cni` under the Checks section.

## Data Collected

### Metrics

See [metadata.csv][10] for a list of metrics provided by this integration.

### Service Checks

See [service_checks.json][11] for a list of service checks provided by this integration.

### Events

The Amazon VPC CNI integration does not include any events.

## Troubleshooting

Need help? Contact [Datadog support][12].

[1]: https://docs.datadoghq.com/agent/guide/use-community-integrations/
[2]: https://docs.datadoghq.com/agent/guide/agent-commands/?tab=agentv6v7#start-stop-and-restart-the-agent
[3]: /account/settings/agent/latest
[4]: https://docs.datadoghq.com/agent/guide/use-community-integrations/?tab=docker
[5]: https://docs.datadoghq.com/getting_started/integrations/
[6]: https://docs.datadoghq.com/agent/guide/agent-configuration-files/#agent-configuration-directory
[7]: https://github.com/DataDog/integrations-extras/blob/master/amazon_vpc_cni/datadog_checks/amazon_vpc_cni/data/conf.yaml.example
[8]: https://docs.datadoghq.com/agent/guide/agent-commands/#start-stop-and-restart-the-agent
[9]: https://docs.datadoghq.com/agent/guide/agent-commands/#agent-status-and-information
[10]: https://github.com/DataDog/integrations-extras/blob/master/amazon_vpc_cni/metadata.csv
[11]: https://github.com/DataDog/integrations-extras/blob/master/amazon_vpc_cni/assets/service_checks.json
[12]: https://docs.datadoghq.com/help/
[13]: https://github.com/aws/amazon-vpc-cni-k8s
21 changes: 21 additions & 0 deletions amazon_vpc_cni/assets/configuration/spec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Amazon VPC CNI
files:
- name: amazon_vpc_cni.yaml
options:
- template: init_config
options:
- template: init_config/default
- template: instances
options:
- template: instances/openmetrics
overrides:
openmetrics_endpoint.value.example: http://localhost:61678/metrics
Comment thread
willianccs marked this conversation as resolved.
openmetrics_endpoint.description: |
Endpoint exposing the Amazon VPC CNI Prometheus metrics.

The `aws-node` DaemonSet runs with host networking, so `localhost` only
resolves to the IPAMD endpoint when the Agent also runs with host
networking (or directly on the node host). If the Agent runs as a pod
without host networking, set this to the node's IP address, for example
`http://<NODE_IP>:61678/metrics`, or use Autodiscovery with a template
that resolves the node address.
11 changes: 11 additions & 0 deletions amazon_vpc_cni/assets/service_checks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[
{
"agent_version": "7.59.0",
"integration": "Amazon VPC CNI",
"check": "amazon_vpc_cni.openmetrics.health",
"statuses": ["ok", "critical"],
"groups": ["host", "endpoint"],
"name": "Amazon VPC CNI OpenMetrics endpoint health",
"description": "Returns `CRITICAL` if the Agent is unable to connect to the Amazon VPC CNI OpenMetrics endpoint, otherwise returns `OK`."
}
]
1 change: 1 addition & 0 deletions amazon_vpc_cni/datadog_checks/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
1 change: 1 addition & 0 deletions amazon_vpc_cni/datadog_checks/amazon_vpc_cni/__about__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = '0.1.0'
4 changes: 4 additions & 0 deletions amazon_vpc_cni/datadog_checks/amazon_vpc_cni/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from .__about__ import __version__
from .check import AmazonVpcCniCheck

__all__ = ['__version__', 'AmazonVpcCniCheck']
13 changes: 13 additions & 0 deletions amazon_vpc_cni/datadog_checks/amazon_vpc_cni/check.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from datadog_checks.base import OpenMetricsBaseCheckV2

from .metrics import METRIC_MAP


class AmazonVpcCniCheck(OpenMetricsBaseCheckV2):
__NAMESPACE__ = 'amazon_vpc_cni'
DEFAULT_METRIC_LIMIT = 0

def get_default_config(self):
return {
'metrics': [METRIC_MAP],
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# This file is autogenerated.
# To change this file you should edit assets/configuration/spec.yaml and then run the following commands:
# ddev -x validate config -s <INTEGRATION_NAME>
# ddev -x validate models -s <INTEGRATION_NAME>

from .instance import InstanceConfig
from .shared import SharedConfig


class ConfigMixin:
_config_model_instance: InstanceConfig
_config_model_shared: SharedConfig

@property
def config(self) -> InstanceConfig:
return self._config_model_instance

@property
def shared_config(self) -> SharedConfig:
return self._config_model_shared
124 changes: 124 additions & 0 deletions amazon_vpc_cni/datadog_checks/amazon_vpc_cni/config_models/defaults.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
# This file is autogenerated.
# To change this file you should edit assets/configuration/spec.yaml and then run the following commands:
# ddev -x validate config -s <INTEGRATION_NAME>
# ddev -x validate models -s <INTEGRATION_NAME>


def instance_allow_redirects():
return True


def instance_auth_type():
return 'basic'


def instance_cache_metric_wildcards():
return True


def instance_cache_shared_labels():
return True


def instance_collect_counters_with_distributions():
return False


def instance_collect_histogram_buckets():
return True


def instance_disable_generic_tags():
return False


def instance_empty_default_hostname():
return False


def instance_enable_health_service_check():
return True


def instance_enable_legacy_tags_normalization():
return True


def instance_histogram_buckets_as_distributions():
return False


def instance_ignore_connection_errors():
return False


def instance_kerberos_auth():
return 'disabled'


def instance_kerberos_delegate():
return False


def instance_kerberos_force_initiate():
return False


def instance_log_requests():
return False


def instance_min_collection_interval():
return 15


def instance_non_cumulative_histogram_buckets():
return False


def instance_persist_connections():
return False


def instance_request_size():
return 16


def instance_skip_proxy():
return False


def instance_tag_by_endpoint():
return True


def instance_telemetry():
return False


def instance_timeout():
return 10


def instance_tls_ignore_warning():
return False


def instance_tls_use_host_header():
return False


def instance_tls_verify():
return True


def instance_use_latest_spec():
return False


def instance_use_legacy_auth_encoding():
return True


def instance_use_process_start_time():
return False
Loading
Loading