diff --git a/CHANGELOG.md b/CHANGELOG.md index ecd0d88..e482baf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## Unreleased - Loki logs gain a `component` label (`coderd`, `provisioner`, `workspace`) derived from `global.coder.coderdSelector`, `provisionerdSelector` and `workspacesSelector`. Coder log parsing (`level`, `logger`, multi-line joins) now applies to the pods those selectors match instead of every pod named `coder*`; if your pods don't match the selectors, set them. +- New optional `cloudwatch-exporter` subchart (yet-another-cloudwatch-exporter, off by default) brings CloudWatch metrics for RDS into Prometheus as `aws_rds_*`. Give its service account an IRSA role annotation, or associate the `cloudwatch-exporter` service account with an IAM role through EKS Pod Identity; the role needs `cloudwatch:GetMetricData`, `GetMetricStatistics`, `ListMetrics` and `tag:GetResources`. - BREAKING: replaces the `grafana-agent` subchart with Grafana Alloy (`alloy` chart 1.13.1). Rename any `grafana-agent:` values overrides to `alloy:`. - Pod `job` label changes from `/grafana-agent/grafana-agent` to `/alloy/alloy`; update queries and alerts that match the old label. - Alloy listens on port 12345 instead of 80. diff --git a/README.md b/README.md index d4f265a..3cd7b93 100644 --- a/README.md +++ b/README.md @@ -292,6 +292,7 @@ If you switch from classic to native histograms, dashboards may need to account | https://prometheus-community.github.io/helm-charts | kube-state-metrics | 8.0.* | | https://prometheus-community.github.io/helm-charts | prometheus | ~v29.20.1 | | https://prometheus-community.github.io/helm-charts | prometheus-node-exporter | 4.56.1 | +| https://prometheus-community.github.io/helm-charts | cloudwatch-exporter(prometheus-yet-another-cloudwatch-exporter) | 0.50.* | Each subchart can be disabled by setting the `enabled` field to `false`. @@ -354,6 +355,7 @@ values which are defined [here](https://github.com/grafana/helm-charts/tree/main | alloy.rbac.rules[0].verbs[1] | string | `"list"` | | | alloy.rbac.rules[0].verbs[2] | string | `"watch"` | | | alloy.withOTLPReceiver | bool | `false` | | +| cloudwatch-exporter | object | `{"config":"apiVersion: v1alpha1\nsts-region: us-east-1\ndiscovery:\n jobs:\n - type: AWS/RDS\n regions: [us-east-1]\n period: 60\n length: 300\n metrics:\n - {name: CPUUtilization, statistics: [Average]}\n - {name: DatabaseConnections, statistics: [Average]}\n - {name: FreeableMemory, statistics: [Average]}\n - {name: FreeStorageSpace, statistics: [Average]}\n - {name: ReadLatency, statistics: [Average]}\n - {name: WriteLatency, statistics: [Average]}\n - {name: DiskQueueDepth, statistics: [Average]}\n - {name: ReplicaLag, statistics: [Average]}\n - {name: BurstBalance, statistics: [Average]}","enabled":false,"fullnameOverride":"cloudwatch-exporter","podAnnotations":{"prometheus.io/port":"5000","prometheus.io/scrape":"true"},"resources":{"limits":{"cpu":"200m","memory":"256Mi"},"requests":{"cpu":"50m","memory":"64Mi"}},"serviceAccount":{"annotations":{},"create":true,"name":"cloudwatch-exporter"},"testConnection":false}` | yet-another-cloudwatch-exporter (YACE) brings AWS CloudWatch metrics into Prometheus, starting with RDS (CPU, memory, storage, connections, latency, disk queue). Off by default. AWS access: set `serviceAccount.annotations` to your IRSA role ARN, or associate the `cloudwatch-exporter` service account with a role through EKS Pod Identity (no annotation needed). The role needs cloudwatch:GetMetricData, GetMetricStatistics, ListMetrics and tag:GetResources (none support resource-level scoping). Set `sts-region` and each job's `regions` in `config` to your region; overriding `config` replaces this whole block. | | global.alerts.enabled | bool | `true` | enable or disable alerting | | global.alerts.kind | string | `"configmap"` | the container resource kind in which alerts should be created; valid values are "prometheusrule" or "configmap" | | global.coder.alerts | object | `{"coderd":{"groups":{"CPU":{"delay":"10m","enabled":true,"period":"10m","thresholds":{"critical":0.9,"warning":0.8}},"IneligiblePrebuilds":{"delay":"10m","enabled":true,"thresholds":{"notify":1}},"Memory":{"delay":"10m","enabled":true,"thresholds":{"critical":0.9,"warning":0.8}},"Replicas":{"delay":"5m","enabled":true,"thresholds":{"critical":1,"notify":3,"warning":2}},"Restarts":{"delay":"1m","enabled":true,"period":"10m","thresholds":{"critical":3,"notify":1,"warning":2}},"UnprovisionedPrebuiltWorkspaces":{"delay":"10m","enabled":true,"thresholds":{"warn":1}},"WorkspaceBuildFailures":{"delay":"10m","enabled":true,"period":"10m","thresholds":{"critical":10,"notify":2,"warning":5}}}},"enterprise":{"groups":{"Licences":{"delay":"1m","enabled":true,"thresholds":{"critical":1,"warning":0.9}}}},"provisionerd":{"groups":{"Replicas":{"delay":"5m","enabled":true,"thresholds":{"critical":1,"notify":3,"warning":2}}}}}` | alerts for the various aspects of Coder | diff --git a/coder-observability/Chart.lock b/coder-observability/Chart.lock index 2b0088b..df5f76a 100644 --- a/coder-observability/Chart.lock +++ b/coder-observability/Chart.lock @@ -23,5 +23,8 @@ dependencies: - name: alloy repository: https://grafana.github.io/helm-charts version: 1.13.1 -digest: sha256:74fb46fc23472a8879c3138bfe31568c9ee116d8de9d3ffcd4c14fa60d89f9fb -generated: "2026-11-06T18:34:41.684215818Z" +- name: prometheus-yet-another-cloudwatch-exporter + repository: https://prometheus-community.github.io/helm-charts + version: 0.50.0 +digest: sha256:fb6b47b36623756439f014fbea94bc4f73d651678bc46988d53e80e59907118b +generated: "2026-11-24T10:26:39.401558-05:00" diff --git a/coder-observability/Chart.yaml b/coder-observability/Chart.yaml index 3411cae..3429714 100644 --- a/coder-observability/Chart.yaml +++ b/coder-observability/Chart.yaml @@ -37,6 +37,11 @@ dependencies: condition: alloy.enabled repository: https://grafana.github.io/helm-charts version: '~1.13.1' + - name: prometheus-yet-another-cloudwatch-exporter + alias: cloudwatch-exporter + condition: cloudwatch-exporter.enabled + repository: https://prometheus-community.github.io/helm-charts + version: '0.50.*' maintainers: - name: Coder Technologies, Inc. url: https://github.com/coder/observability/issues diff --git a/coder-observability/values.yaml b/coder-observability/values.yaml index 3d03ffb..9696cbb 100644 --- a/coder-observability/values.yaml +++ b/coder-observability/values.yaml @@ -648,6 +648,51 @@ prometheus-node-exporter: containerSecurityContext: allowPrivilegeEscalation: false +# cloudwatch-exporter -- yet-another-cloudwatch-exporter (YACE) brings AWS CloudWatch metrics into Prometheus, starting +# with RDS (CPU, memory, storage, connections, latency, disk queue). Off by default. +# AWS access: set `serviceAccount.annotations` to your IRSA role ARN, or associate the `cloudwatch-exporter` service account +# with a role through EKS Pod Identity (no annotation needed). The role needs cloudwatch:GetMetricData, GetMetricStatistics, +# ListMetrics and tag:GetResources (none support resource-level scoping). +# Set `sts-region` and each job's `regions` in `config` to your region; overriding `config` replaces this whole block. +cloudwatch-exporter: + enabled: false + fullnameOverride: cloudwatch-exporter + testConnection: false + serviceAccount: + create: true + name: cloudwatch-exporter + annotations: {} + # eks.amazonaws.com/role-arn: arn:aws:iam::123456789012:role/cloudwatch-exporter + podAnnotations: + prometheus.io/scrape: "true" + prometheus.io/port: "5000" + resources: + requests: + cpu: 50m + memory: 64Mi + limits: + cpu: 200m + memory: 256Mi + config: |- + apiVersion: v1alpha1 + sts-region: us-east-1 + discovery: + jobs: + - type: AWS/RDS + regions: [us-east-1] + period: 60 + length: 300 + metrics: + - {name: CPUUtilization, statistics: [Average]} + - {name: DatabaseConnections, statistics: [Average]} + - {name: FreeableMemory, statistics: [Average]} + - {name: FreeStorageSpace, statistics: [Average]} + - {name: ReadLatency, statistics: [Average]} + - {name: WriteLatency, statistics: [Average]} + - {name: DiskQueueDepth, statistics: [Average]} + - {name: ReplicaLag, statistics: [Average]} + - {name: BurstBalance, statistics: [Average]} + pyroscope: enabled: false alloy: