prometheus-cloudwatch-exporter

by Prometheus

Helm chartv0.29.0App 0.16.0Verified publisher

A Helm chart for prometheus cloudwatch-exporter

About this chart

Prometheus Cloudwatch Exporter

An exporter for Amazon CloudWatch, for Prometheus.

This chart bootstraps a cloudwatch exporter deployment on a Kubernetes cluster using the Helm package manager.

Prerequisites

  • kube2iam installed to used the aws.role config option otherwise configure aws.aws_access_key_id and aws.aws_secret_access_key or aws.secret.name
  • Or an IAM Role for service account attached to a service account with an annotation. If you run the pod as nobody in securityContext.runAsUser then also set securityContext.fsGroup to the same value so it will be able to access to the mounted secret.

Usage

The chart is distributed as an OCI Artifact as well as via a traditional Helm Repository.

  • OCI Artifact: oci://ghcr.io/prometheus-community/charts/prometheus-cloudwatch-exporter
  • Helm Repository: https://prometheus-community.github.io/helm-charts with chart prometheus-cloudwatch-exporter

The installation instructions use the OCI registry. Refer to the [helm repo](helm repo) command documentation for information on installing charts via the traditional repository.

Install Chart

# Helm 3
$ helm install [RELEASE_NAME] oci://ghcr.io/prometheus-community/charts/prometheus-cloudwatch-exporter

# Helm 2
$ helm install --name [RELEASE_NAME] oci://ghcr.io/prometheus-community/charts/prometheus-cloudwatch-exporter

See Configuring below.

See helm install for command documentation.

Uninstall Chart

# Helm 3
$ helm uninstall [RELEASE_NAME]

# Helm 2
# helm delete --purge [RELEASE_NAME]

This removes all the Kubernetes components associated with the chart and deletes the release.

See helm uninstall for command documentation.

Upgrading Chart

# Helm 3 or 2
$ helm upgrade [RELEASE_NAME] [CHART] --install

See helm upgrade for command documentation.

Configuring

See Customizing the Chart Before Installing. To see all configurable options with detailed comments, visit the chart's values.yaml, or run these configuration commands:

# Helm 2
$ helm inspect values oci://ghcr.io/prometheus-community/charts/prometheus-cloudwatch-exporter

# Helm 3
$ helm show values oci://ghcr.io/prometheus-community/charts/prometheus-cloudwatch-exporter

AWS Credentials or Role

For Cloudwatch Exporter to operate properly, you must configure either AWS credentials or an AWS role with the correct policy.

  • To configure AWS credentials by value, set aws.aws_access_key_id to your [AWS_ACCESS_KEY_ID], and aws.aws_secret_access_key to [AWS_SECRET_ACCESS_KEY].
  • To configure AWS credentials by secret, you must store them in a secret (kubectl create secret generic [SECRET_NAME] --from-literal=access_key=[AWS_ACCESS_KEY_ID] --from-literal=secret_key=[AWS_SECRET_ACCESS_KEY]) and set aws.secret.name to [SECRET_NAME]
  • To configure an AWS role (with correct policy linked above), set aws.role to [ROLE_NAME]

Deploy prometheus-cloudwatch-exporter with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has prometheus-cloudwatch-exporter on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartprometheus-cloudwatch-exporter is pinned at v0.29.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply