feat(amazon-vpc-cni): add new integration for Amazon VPC CNI - #3159
willianccs wants to merge 14 commits into
Conversation
|
Thanks for the PR! I've created DOCS-15717 for documentation team review. |
|
Thanks for the PR! I left a few comments below. Comment legendrequest: a change I believe is necessary before merging. |
- Fix connmark_reconcile mapping (prometheus_client strips the _total suffix) - Strengthen unit test assertions (at_least=1, check_symmetric_inclusion) - Restore @DataDog/ecosystems-review on CODEOWNERS entries and add it to amazon_vpc_cni - Correct duration sub-metric units in metadata.csv - Simplify check.py (drop unused V1-only config and pass-through overrides) - Add missing sagemaker metrics for full parity - Remove unused mock fixture from e2e tests
joepeeples
left a comment
There was a problem hiding this comment.
Approved with small edit suggestion, thanks!
Co-authored-by: Joe Peeples <joe.peeples@datadoghq.com>
Review from joepeeples is dismissed. Related teams and files:
- documentation
- amazon_vpc_cni/README.md
|
@lucia-sb could you check again please? Thank you! |
|
Requested review from ecosystems-review as per Merge Gate |
Wyrine
left a comment
There was a problem hiding this comment.
agent: Requesting changes for the setup and validation findings below. The earlier metric-map, unit-test, and metadata-unit fixes are present in this revision.
I checked the implementation against the upstream AWS exporter and inspected the passing CI results, including Agent E2E tests against the static HTTP fixture. I did not run a live EKS deployment. Please address the Kubernetes endpoint instructions and exporter toggle, align the latency fixture/metadata with actual exporter output, and strengthen the remaining E2E metric assertions.
| options: | ||
| - template: instances/openmetrics | ||
| overrides: | ||
| openmetrics_endpoint.value.example: http://localhost:61678/metrics |
There was a problem hiding this comment.
agent: [P2] Document a reachable endpoint for Kubernetes Agents
Could you document an Autodiscovery or node-address configuration, and explain that localhost only works when the Agent shares the node network? AWS's aws-node DaemonSet uses hostNetwork, while an Agent pod without host networking resolves localhost to its own pod. Following the current example in that deployment therefore fails to reach IPAMD and collects no metrics. Please update the README and generated example consistently. AWS DaemonSet configuration.
There was a problem hiding this comment.
Done in ce0680b. The openmetrics_endpoint description now covers the host-networking caveat in both spec.yaml and the generated conf.yaml.example, and the README Configuration section explains that localhost only resolves when the Agent shares the node network, pointing to node-IP / Autodiscovery alternatives.
| 3. Configure your integration in the same way as core [integrations][5]. | ||
|
|
||
| ### Configuration | ||
|
|
There was a problem hiding this comment.
agent: [P2] Use the supported AWS metrics toggle
Could you replace ENABLE_PROMETHEUS_METRICS=true with the documented DISABLE_METRICS=false setting and mention that metrics are enabled by default? AWS documents DISABLE_METRICS as the IPAMD endpoint control; the variable given here will not re-enable the endpoint on a deployment that has DISABLE_METRICS=true. AWS configuration reference.
There was a problem hiding this comment.
Done in ce0680b. README now uses DISABLE_METRICS=false and states metrics are enabled by default.
| awscni_pod_eni_error_count{fn="podENIHandler"} 4 | ||
| # HELP awscni_aws_api_latency_ms AWS API call latency in ms | ||
| # TYPE awscni_aws_api_latency_ms summary | ||
| awscni_aws_api_latency_ms{api="DescribeNetworkInterfaces",error="false",status="200",quantile="0.5"} 15 |
There was a problem hiding this comment.
agent: [P2] Match the latency fixture and metadata to actual exporter output
These quantile samples make the test pass for amazon_vpc_cni.aws_api_latency_ms.quantile, but upstream creates AwsAPILatency with Name/Help and no Objectives. The Prometheus Go client's default is an empty Objectives map, which emits count/sum without quantiles. Could you use representative exporter output in both fixture copies and remove the unsupported quantile expectation/metadata row, unless a supported CNI version can be shown to emit it? Otherwise the integration advertises a metric users cannot receive. AWS summary definition, Prometheus summary options.
There was a problem hiding this comment.
Done in ce0680b. Removed the quantile samples from both fixture copies and dropped the aws_api_latency_ms.quantile row from metadata.csv and the test expectations, so only .count/.sum are advertised for the summary.
| dd_agent_check(instance) | ||
|
|
||
| for metric in EXPECTED_PROMETHEUS_METRICS: | ||
| aggregator.assert_metric(metric, at_least=0) |
There was a problem hiding this comment.
agent: [P2] Require metrics to be emitted in the Agent E2E test
The unit-test assertions were strengthened, but this Agent-side test still uses at_least=0. That succeeds even when an expected metric has no samples, and the subsequent coverage/metadata checks do not require every expected metric to exist. Could you use at_least=1 here and check_symmetric_inclusion=True in the metadata assertion, as in the unit test, so an Agent-only collection regression fails this test?
There was a problem hiding this comment.
Done in ce0680b. E2E now asserts at_least=1 and uses check_symmetric_inclusion=True in the metadata assertion.
- Document node-reachability caveat for openmetrics_endpoint and use DISABLE_METRICS=false toggle - Remove unsupported aws_api_latency_ms.quantile from fixtures and metadata - Strengthen e2e metric assertions (at_least=1, symmetric inclusion)
Review from joepeeples is dismissed. Related teams and files:
- documentation
- amazon_vpc_cni/README.md
- amazon_vpc_cni/metadata.csv
OpenMetrics V2 counters are not emitted on the first scrape (flush_first_value), so a single dd_agent_check run produced no *.count metrics. Run with rate=True, matching the gatekeeper/aerospike_enterprise pattern, so counters flush.
|
@Wyrine could you review again please ? |
Co-authored-by: bgoldberg122 <ben.goldberg@datadoghq.com>
What does this PR do?
Adds a new Agent-based integration for the Amazon VPC CNI plugin for Kubernetes.
The check scrapes the Prometheus metrics exposed by the VPC CNI plugin (
awscni_*) and maps them toamazon_vpc_cni.*, covering IP address allocation, ENI usage, IPAMD activity, AWS API calls, and startup duration.Motivation
These metrics are currently collected as
kube_system.awscni_*custom metrics, incurring custom metric billing. This integration promotes them to an official, curated integration.Review checklist
Additional Notes
Metrics sourced from the VPC CNI plugin's Prometheus endpoint (port 61678), enabled via
ENABLE_PROMETHEUS_METRICS=true.