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 instance age metric #40

Merged
merged 3 commits into from
Nov 27, 2023
Merged

Add instance age metric #40

merged 3 commits into from
Nov 27, 2023

Conversation

vmercierfr
Copy link
Collaborator

@vmercierfr vmercierfr commented Nov 27, 2023

Objective

Add instance age metric

Why

Some workloads require raising alerts based on instance age.

At Qonto, we raise alerts when some instances (based on name patterns) run too long to prevent uncontrolled AWS costs.

How

  • Add rds_instance_age_seconds
  • Document how to add a new metric

Release plan

  • Merge this PR

@vmercierfr vmercierfr added this to the 0.4.0 milestone Nov 27, 2023
@vmercierfr vmercierfr added the enhancement New feature or request label Nov 27, 2023
@vmercierfr vmercierfr self-assigned this Nov 27, 2023
@vmercierfr
Copy link
Collaborator Author

#sre

@vmercierfr
Copy link
Collaborator Author

vmercierfr commented Nov 27, 2023

Reviewer's note: The rds_instance_uptime metric in rds-management was a little misleading, as it appears to be the time since the RDS instance was last start, when it is the creation date. rds_instance_age_seconds sounds more accurate.

Copy link
Contributor

@qfritz qfritz left a comment

Choose a reason for hiding this comment

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

LGTM

Maybe if we have the need for it, future releases can include an rds_instance_uptime which will completely disambiguate rds_instance_age.

README.md 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 🚀

README.md Show resolved Hide resolved
@vmercierfr
Copy link
Collaborator Author

I've added the docs/add-metric.md file to explain how to add a metric for future metrics.

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 79%
github.com/qonto/prometheus-rds-exporter/internal/app/servicequotas 51%
github.com/qonto/prometheus-rds-exporter/internal/app/unit 100%
Summary 82% (523 / 640)

Minimum allowed line rate is 60%

@vmercierfr vmercierfr merged commit 0650ed2 into main Nov 27, 2023
8 checks passed
@vmercierfr vmercierfr deleted the add-instance-age branch November 27, 2023 14:46
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.

3 participants