Skip to content

Add LIS CSI metrics support to OTEL container insights - #308

Merged
nathalapooja merged 1 commit into
release-6.2.0from
feature/add-lis-csi-otel-container-insights
May 11, 2026
Merged

nathalapooja merged 1 commit into
release-6.2.0from
feature/add-lis-csi-otel-container-insights

Conversation

@nathalapooja

@nathalapooja nathalapooja commented May 4, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Add Local Instance Store (LIS) CSI driver metrics support to the OTEL container insights pipeline, mirroring the existing EBS CSI pattern. This enables the OTEL collector to scrape LIS CSI metrics and export them with proper OTEL attributes via the OTLP endpoint.

Changes

Added 4 components to _otel-container-insights-config.tpl:

  1. Receiver (prometheus/cw_k8s_ci_v0_lis_csi_node) β€” Prometheus scrape config targeting pods with label app=ec2-instance-store-plugin in kube-system namespace, filtered to the current node and the metrics port (8101).

  2. Scope Transform (transform/cw_k8s_ci_v0_set_scope_lis_csi) β€” Sets instrumentation scope attributes:

    • cloudwatch.pipeline = "lis-csi"
    • cloudwatch.solution = "k8s-otel-container-insights"
    • cloudwatch.source = "cloudwatch-agent"
  3. Attribute Promote Transform (transform/cw_k8s_ci_v0_lis_csi_promote) β€” Promotes instance_id and volume_id from datapoint attributes to resource attributes (same as EBS CSI, since LIS CSI uses the same dimension sets).

  4. Pipeline (metrics/cw_k8s_ci_v0_lis_csi_node) β€” Wires the receiver through the standard processor chain: scrape metadata filter β†’ set unit β†’ metric start time β†’ cluster name β†’ lis_csi promote β†’ node name β†’ resource detection β†’ cloud resource ID β†’ k8s node attributes β†’ lis_csi scope β†’ clear schema β†’ workload β†’ attribute limit β†’ batch β†’ OTLP export.

Metrics Collected (13 metrics)

The LIS CSI driver exposes these raw Prometheus metrics (scraped as-is by the OTEL pipeline):

Metric Type
aws_ec2_instance_store_csi_read_bytes_total Counter
aws_ec2_instance_store_csi_write_bytes_total Counter
aws_ec2_instance_store_csi_read_ops_total Counter
aws_ec2_instance_store_csi_write_ops_total Counter
aws_ec2_instance_store_csi_read_seconds_total Counter
aws_ec2_instance_store_csi_write_seconds_total Counter
aws_ec2_instance_store_csi_ec2_exceeded_iops_seconds_total Counter
aws_ec2_instance_store_csi_ec2_exceeded_tp_seconds_total Counter
aws_ec2_instance_store_csi_volume_queue_length Gauge
aws_ec2_instance_store_csi_read_io_latency_seconds Histogram
aws_ec2_instance_store_csi_write_io_latency_seconds Histogram
aws_ec2_instance_store_csi_nvme_collector_errors_total Counter (collector-internal)
aws_ec2_instance_store_csi_nvme_collector_scrapes_total Counter (collector-internal)

Note on metric names: The OTEL pipeline passes through the raw Prometheus metric names (aws_ec2_instance_store_csi_*) as-is. This differs from the enhanced container insights (EMF) pipeline which renames them to node_diskio_instance_store_* via a metricstransform processor.
Note on collector-internal metrics: nvme_collector_errors_total and nvme_collector_scrapes_total are included for exporter health observability. They are low-cardinality and follow the same _total β†’ unit "1" convention.

Testing

End-to-end validated on EKS cluster cwa-liscsi-test-arm64 (arm64 nodes).

Setup

  • Installed aws-ec2-local-instance-store-csi-driver EKS addon with {"metrics":{"enabled":true}}
  • Installed eks-pod-identity-agent EKS addon
  • Created Pod Identity association for CloudWatch agent service account
  • Deployed test PVC (ec2-instance-store-sc) and pod generating continuous disk I/O
  • Installed helm chart from this branch with agent.image.tag=latest

Validation

Queried the OTLP PromQL API at https://monitoring.us-west-2.amazonaws.com/api/v1/query with SigV4 signing:

All 13 metrics returned results βœ…

Attribute validations βœ…

  • @resource.instance_id present, starts with i- (promoted from datapoint to resource scope)
  • @resource.volume_id present (promoted from datapoint to resource scope)
  • instance_id absent from datapoint scope (confirms promotion)
  • volume_id absent from datapoint scope (confirms promotion)
  • @instrumentation.cloudwatch.pipeline = lis-csi
  • @instrumentation.cloudwatch.solution = k8s-otel-container-insights
  • @resource.k8s.cluster.name = cwa-liscsi-test-arm64
  • @resource.service.name = lis-csi-node

Add prometheus receiver, scope transform, attribute promote transform,
and pipeline for local instance store CSI driver metrics collection,
mirroring the existing EBS CSI pattern. Scrapes pods with label
app=ec2-instance-store-plugin in kube-system namespace and promotes
instance_id and volume_id to resource attributes.
@miconeilaws

Copy link
Copy Markdown
Collaborator

Can we check with @louisall or @spanaik about the E2E testing? We must ensure these metrics conform to the same semantic conventions, resource attributes, K8s labels etc as the exsiting OtelCI metrics

@nathalapooja
nathalapooja changed the base branch from release-6.1.0 to release-6.2.0 May 11, 2026 19:45
@nathalapooja
nathalapooja merged commit 64f6877 into release-6.2.0 May 11, 2026
30 of 33 checks passed
@nathalapooja
nathalapooja deleted the feature/add-lis-csi-otel-container-insights branch May 11, 2026 19:46
mitali-salvi added a commit that referenced this pull request Jun 10, 2026
* Add OTEL Container Insights infrastructure (#282)

* Add v6.0.0 release notes

* Cluster-scraper deployment now uses cloudwatch-agent SA (cluster-scraper SA retained as dead resource)

* Bump chart version to 6.0.1 and add release notes

* Scope config-map permission for cloudwatch-agent to namespace only (#287)

* scope configmap permission to namesapce

* integ tests

* updates

* Retain configmap get permission at cluster scope (#291)

* Fix template whitespace control and hardcoded test names

- Use {{- if instead of {{ if in cloudwatch-agent-role.yaml and
  cloudwatch-agent-rolebinding.yaml to prevent leading blank lines
- Extract agentName constant in configmap_permission_scoping_test.go
  to replace hardcoded strings

* Keep configmaps get at cluster scope, scope create/update to namespace

- Add configmaps get-only rule to ClusterRole
- Narrow namespace-scoped Role to create and update only
- Update test assertions to match

* Run integration tests on PRs targeting release-* branches

* Set hostNetwork: true for default $.agent

* Feature/ksm enrichment and label preservation (#296)

* Fix agent.config bleed-through into cluster-scraper deployment (#298)

* Fix scrapeTimeout, add missing scrape_timeout, remove dead RBAC, cleanup docs and tests (#297)

* Add ClusterIP Service for node-exporter and use service DNS for scraping (#304)

* Refactor fluent-bit region-specific (isolated) config using tpl conditionals (#271)

* Pin GitHub Actions to commit SHAs (#306)

* minor fixes (#307)

* release v6.1.0

* Add LIS CSI metrics support to OTEL container insights config (#308)

Add prometheus receiver, scope transform, attribute promote transform,
and pipeline for local instance store CSI driver metrics collection,
mirroring the existing EBS CSI pattern. Scrapes pods with label
app=ec2-instance-store-plugin in kube-system namespace and promotes
instance_id and volume_id to resource attributes.

* feat(otel): Add k8sattributes processor node filter to daemonset (#311)

* fix(integration-test): include node-exporter-service in EKS resource counts (#312)

* Add OTEL-native Container Insights log pipelines (app, host) (#310)

* release v6.2.0

* Address PR review: use v0.18 CRD schema, add version bumps to release notes

---------

Co-authored-by: Louise Allen <147041218+louisall@users.noreply.github.com>
Co-authored-by: Kaushik Surya <kausyas@amazon.com>
Co-authored-by: Kaushik Surya <108111936+sky333999@users.noreply.github.com>
Co-authored-by: Petru Anica-Popa <66786772+petruanica@users.noreply.github.com>
Co-authored-by: Trey Richbourg <63218430+treyrichbourg@users.noreply.github.com>
Co-authored-by: POOJA REDDY NATHALA <poojardy@amazon.com>
Co-authored-by: Michael O'Neill <miconeil@amazon.com>
Co-authored-by: Mitali Salvi <mitsalvi@amazon.com>
vaishnavi-30-beep pushed a commit to vaishnavi-30-beep/helm-charts that referenced this pull request Jul 2, 2026
* Add OTEL Container Insights infrastructure (aws-observability#282)

* Add v6.0.0 release notes

* Cluster-scraper deployment now uses cloudwatch-agent SA (cluster-scraper SA retained as dead resource)

* Bump chart version to 6.0.1 and add release notes

* Scope config-map permission for cloudwatch-agent to namespace only (aws-observability#287)

* scope configmap permission to namesapce

* integ tests

* updates

* Retain configmap get permission at cluster scope (aws-observability#291)

* Fix template whitespace control and hardcoded test names

- Use {{- if instead of {{ if in cloudwatch-agent-role.yaml and
  cloudwatch-agent-rolebinding.yaml to prevent leading blank lines
- Extract agentName constant in configmap_permission_scoping_test.go
  to replace hardcoded strings

* Keep configmaps get at cluster scope, scope create/update to namespace

- Add configmaps get-only rule to ClusterRole
- Narrow namespace-scoped Role to create and update only
- Update test assertions to match

* Run integration tests on PRs targeting release-* branches

* Set hostNetwork: true for default $.agent

* Feature/ksm enrichment and label preservation (aws-observability#296)

* Fix agent.config bleed-through into cluster-scraper deployment (aws-observability#298)

* Fix scrapeTimeout, add missing scrape_timeout, remove dead RBAC, cleanup docs and tests (aws-observability#297)

* Add ClusterIP Service for node-exporter and use service DNS for scraping (aws-observability#304)

* Refactor fluent-bit region-specific (isolated) config using tpl conditionals (aws-observability#271)

* Pin GitHub Actions to commit SHAs (aws-observability#306)

* minor fixes (aws-observability#307)

* release v6.1.0

* Add LIS CSI metrics support to OTEL container insights config (aws-observability#308)

Add prometheus receiver, scope transform, attribute promote transform,
and pipeline for local instance store CSI driver metrics collection,
mirroring the existing EBS CSI pattern. Scrapes pods with label
app=ec2-instance-store-plugin in kube-system namespace and promotes
instance_id and volume_id to resource attributes.

* feat(otel): Add k8sattributes processor node filter to daemonset (aws-observability#311)

* fix(integration-test): include node-exporter-service in EKS resource counts (aws-observability#312)

* Add OTEL-native Container Insights log pipelines (app, host) (aws-observability#310)

* release v6.2.0

* Address PR review: use v0.18 CRD schema, add version bumps to release notes

---------

Co-authored-by: Louise Allen <147041218+louisall@users.noreply.github.com>
Co-authored-by: Kaushik Surya <kausyas@amazon.com>
Co-authored-by: Kaushik Surya <108111936+sky333999@users.noreply.github.com>
Co-authored-by: Petru Anica-Popa <66786772+petruanica@users.noreply.github.com>
Co-authored-by: Trey Richbourg <63218430+treyrichbourg@users.noreply.github.com>
Co-authored-by: POOJA REDDY NATHALA <poojardy@amazon.com>
Co-authored-by: Michael O'Neill <miconeil@amazon.com>
Co-authored-by: Mitali Salvi <mitsalvi@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants