Skip to content

Cloudwatch-exporter

cloudwatchExporter is a specification of the desired deployment of cloudwatch-exporter.

Note: Pay attention to settings that can be specified under the cloudwatchExporter.config parameter, such as,

cloudwatchExporter:
  serviceMonitor:
    interval: 2m
  config:
    period_seconds: 120
    delay_seconds: 60

These parameters are very important to get the actual metrics from CloudWatch without a delay. The default values of delay_seconds is 600 s, and this parameter is used to avoid collecting data that has not fully converged. 600 s specifies that the exporter fetches data only after 600 s = 10 m. To decrease the delay, it is recommended to decrease the value to 60 s. This time is enough for CloudWatch to collect the metrics and allows cloudwatch_exporter to fetch them.

Refer to the official documentation of cloudwatch_exporter for full descriptions of all parameters at https://github.com/prometheus/cloudwatch_exporter#configuration.

AWS credentials are mounted as a file at /root/.aws/credentials. The chart does not set AWS_CREDENTIAL_PROFILES_FILE and AWS_SHARED_CREDENTIALS_FILE. When a non-default path is used, volume mount path and these two environment variables must be adjusted in charts/qubership-monitoring-operator/charts/cloudwatchExporter/templates/deployment.yaml.

Field Description Scheme
install Allows to disable deploy cloudwatch-exporter. bool
replicas Number of created pods. int
name A deployment name for cloudwatch-exporter string
image A Docker image to use for cloudwatch-exporter deployment string
imagePullPolicy Image pull policy to use for cloudwatch-exporter deployment string
command Allow override command to run Docker container []string
resources The resources that describe the compute resource requests and limits for single pods. v1.ResourceRequirements
serviceAccount.install Allow to disable create ServiceAccount during deploy bool
serviceAccount.name Provide a name in place of cloudwatch-exporter for ServiceAccount bool
serviceAccount.automountServiceAccountToken Specifies whether to automount API credentials for the ServiceAccount. bool
rbac.createClusterRole Allow creating ClusterRole. If set to false, ClusterRole must be created manually. Default: true bool
rbac.createClusterRoleBinding Allow creating ClusterRoleBinding. If set to false, ClusterRoleBinding must be created manually. Default: true bool
nodeSelector Defines which nodes the pods are scheduled on. Specified just as map[string]string. For example: \"type: compute\" map[string]string
annotations Map of string keys and values stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. Specified just as map[string]string. For example: "annotations-key: annotation-value" map[string]string
labels Map of string keys and values that can be used to organize and categorize (scope and select) objects. Specified just as map[string]string. For example: "label-key: label-value" map[string]string
securityContext SecurityContext holds pod-level security attributes. Default for Kubernetes, securityContext:{ runAsUser: 65534, fsGroup: 65534 }. *v1.PodSecurityContext
tolerations Tolerations allow the pods to schedule onto nodes with matching taints. []v1.Toleration
affinity It specifies the pod's scheduling constraints. For more information, refer to https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.35/#affinity-v1-core *v1.Affinity
serviceMonitor ServiceMonitor holds configuration attributes for cloudwatch-exporter. object
aws.aws_access_key_id AWS Access Key ID for chart-managed credentials. Used only when aws.secret.name is not set. string
aws.aws_secret_access_key AWS Secret Access Key for chart-managed credentials. Used only when aws.secret.name is not set. string
aws.secret.name Name of pre-created Secret with credentials file content. The Secret must contain one key named credentials with INI content. string
aws.secret.includesSessionToken Backward-compatible flag kept in values for compatibility. Ignored in file-based credentials flow. bool
config Configuration is rendered with tpl function, therefore you can use any Helm variables and/or templates. string
priorityClassName PriorityClassName assigned to the Pods to prevent them from evicting. string

Example:

cloudwatchExporter:
  install: true
  replicas: 1
  name: cloudwatch-exporter
  image: prom/cloudwatch-exporter:cloudwatch_exporter-0.11.0
  imagePullPolicy: IfNotPresent
  command:
    - 'java'
    - '-Dhttp.proxyHost=proxy.example.com'
    - '-Dhttp.proxyPort=3128'
    - '-Dhttps.proxyHost=proxy.example.com'
    - '-Dhttps.proxyPort=3128'
    - '-jar'
    - '/cloudwatch_exporter.jar'
    - '9106'
    - '/config/config.yml'
  resources:
    limits:
      cpu: 200m
      memory: 256Mi
    requests:
      cpu: 100m
      memory: 128Mi
  serviceAccount:
    install: true
    name: cloudwatch-exporter
    annotations:
      eks.amazonaws.com/role-arn: arn:aws:iam::1234567890:role/prom-cloudwatch-exporter-oidc
    automountServiceAccountToken: true
  rbac:
    createClusterRole: true
    createClusterRoleBinding: true
  nodeSelector:
    node-role.kubernetes.io/worker: worker
  labels:
    label.key: label-value
  annotations:
    annotation.key: annotation-value
  securityContext:
    runAsUser: 65534  # run as nobody user instead of root
    fsGroup: 65534  # necessary to be able to read the EKS IAM token
  tolerations:
    - key: "example-key"
      operator: "Exists"
      effect: "NoSchedule"
  affinity: {}
  serviceMonitor:
    install: true
    interval: 5m
    telemetryPath: /metrics
    labels: {}
    timeout: 10s
    relabelings: []
    metricRelabelings:
      - sourceLabels: [dbinstance_identifier]
        action: replace
        replacement: mydbname
        targetLabel: dbname
  aws:
    secret:
      name: <secret_name>
      includesSessionToken: false
    aws_access_key_id: <access_key_id>
    aws_secret_access_key: <secret_access_key>
  config: |-