Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add aws_instance_tags containing AWS tags attached to the instance #72

Merged
merged 1 commit into from
Dec 11, 2023

Conversation

vmercierfr
Copy link
Collaborator

Objective

Add aws_instance_tags containing AWS tags attached to the instance.

Why

We received a feature request to have AWS tags in #37.

Implementation is similar to yet-another-cloudwatch-exporter. To limit cardinality, the tags are published in rds_instance_tags metric.

The metrics looks like:

rds_instance_tags{aws_account_id="<account_id>",aws_region="<aws_region>",dbidentifier="<rds_identifier>",tag_Tag1="value1",tag_Tag2="value2"} 0

So it could be used to join metrics:

max by (aws_account_id, aws_region, dbidentifier) (rds_free_storage_bytes{} * 100 / rds_allocated_storage_bytes{}) + on (aws_account_id, aws_region, dbidentifier) group_left(tag_Environment) rds_instance_tags

How

  • Add aws_instance_tags containing AWS tags attached to the instance.

Release plan

  • Merge this PR

@vmercierfr vmercierfr added the enhancement New feature or request label Dec 7, 2023
@vmercierfr vmercierfr added this to the 0.5 milestone Dec 7, 2023
@vmercierfr vmercierfr linked an issue Dec 7, 2023 that may be closed by this pull request
@vmercierfr vmercierfr mentioned this pull request Dec 7, 2023
@vmercierfr
Copy link
Collaborator Author

#sre

Copy link
Member

@victorboissiere victorboissiere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

internal/app/exporter/exporter.go Outdated Show resolved Hide resolved
Copy link
Contributor

@dcupif dcupif left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

internal/app/rds/rds_test.go Show resolved Hide resolved
internal/app/exporter/exporter.go Outdated Show resolved Hide resolved
Copy link

Code Coverage

Package Line Rate Health
github.com/qonto/prometheus-rds-exporter/internal/app/cloudwatch 88%
github.com/qonto/prometheus-rds-exporter/internal/app/ec2 88%
github.com/qonto/prometheus-rds-exporter/internal/app/rds 80%
github.com/qonto/prometheus-rds-exporter/internal/app/servicequotas 51%
github.com/qonto/prometheus-rds-exporter/internal/app/unit 100%
Summary 82% (535 / 652)

Minimum allowed line rate is 60%

@vmercierfr vmercierfr merged commit b144d9d into main Dec 11, 2023
8 checks passed
@vmercierfr vmercierfr deleted the add-tags branch December 11, 2023 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add RDS tags
3 participants