nerdswords / yet-another-cloudwatch-exporter

Prometheus exporter for AWS CloudWatch - Discovers services through AWS tags, gets CloudWatch metrics data and provides them as Prometheus metrics with AWS tags as labels
Apache License 2.0
978 stars 333 forks source link

[BUG] exportedTagsOnMetrics no longer works with latest version for lambda (0.61.2) #1520

Open paulsjohnson91 opened 1 month ago

paulsjohnson91 commented 1 month ago

Is there an existing issue for this?

YACE version

0.61.2

Config file

apiVersion: v1alpha1
sts-region: eu-central-1
discovery:
  exportedTagsOnMetrics:
    AWS/RDS:
      - Name
    AWS/Lambda:
      - Name
  jobs:
  - type: AWS/RDS
    regions:
      - eu-central-1
    searchTags:
      - key: inv_sub_env
        value: stable-int
    metrics:
      - name: AbortedClients
        statistics:
          - Maximum
          - Sum
          - Average
        period: 60
        length: 300

Current Behavior

yace crashes on startup

Expected Behavior

yace works as it did before and adds the tag name to the metrics.

I've tried with

  lambda:
    - Name

(which was working in an older version) and

  AWS/Lambda:
    - Name

which is the new version but yace crashes on startup for both

Steps To Reproduce

config:

apiVersion: v1alpha1
sts-region: eu-central-1
discovery:
  exportedTagsOnMetrics:
    AWS/RDS:
      - Name
    AWS/Lambda:
      - Name
  jobs:
  - type: AWS/RDS
    regions:
      - eu-central-1
    searchTags:
      - key: inv_sub_env
        value: stable-int
    metrics:
      - name: AbortedClients
        statistics:
          - Maximum
          - Sum
          - Average
        period: 60
        length: 300

service file

[Unit]
Description=Prometheus Yet Another Cloudwatch Exporter
After=network.target

[Service]
Type=simple
User=prometheus
Group=prometheus

ExecStart=/opt/prometheus/exporters/yace/yace -config.file /etc/prometheus/exporters/yace/config.yml -listen-address :5000 -enable-feature=max-dimensions-associator

SyslogIdentifier=prometheus_yace_exporter
Restart=always

[Install]
WantedBy=multi-user.target

Anything else?

Nothing else

paulsjohnson91 commented 1 month ago

config works in version 0.58.0