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 support for tracking RDS pending maintenance actions #32

Merged
merged 2 commits into from
May 31, 2022

Conversation

steveteahan
Copy link
Contributor

Having information about RDS pending maintenance actions can be helpful in addition to the engine_version data for tracking database maintenance initiatives.

A database that doesn't require maintenance will look like this:

aws_resources_exporter_rds_pendingmaintenanceactions{action="",auto_apply_after="",aws_region="us-east-1",current_apply_date="",dbinstance_identifier="<some_identifier>",description=""} 0

And a database that requires maintenance will have a metric like:

aws_resources_exporter_rds_pendingmaintenanceactions{action="system-update",auto_apply_after="2022-06-30 00:00:00 +0000 UTC",aws_region="us-east-1",current_apply_date="2022-06-30 00:00:00 +0000 UTC",dbinstance_identifier="<some_identifier>",description="New Operating System update is available"} 1

Testing

I executed this locally against an AWS account with >50 RDS instances:

  • Confirmed that a metric was published for each RDS instance
  • Confirmed that the metric was correctly identifying those instances needing maintenance or not

@steveteahan steveteahan merged commit b8b1cc2 into app-sre:master May 31, 2022
@steveteahan steveteahan deleted the rds-pending-maint-actions branch May 31, 2022 14:02
@BumbleFeng
Copy link

aws-resource-exporter are CrashLoopBackOff with error

level=info ts=2022-06-02T08:36:58.626Z caller=main.go:45 msg=Startingaws_resources_exporter version="(version=, branch=, revision=)"
level=info ts=2022-06-02T08:36:58.626Z caller=main.go:46 msg="Build context" (gogo1.16.13,user,date)=(MISSING)
level=info ts=2022-06-02T08:36:58.626Z caller=rds.go:205 msg="Initializing RDS exporter"
level=info ts=2022-06-02T08:36:58.626Z caller=main.go:86 msg="Starting HTTP server" address=:9115
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x98ca5d]
goroutine 25 [running]:
main.(*RDSExporter).Collect(0xc00028da40, 0xc0000922a0)
/var/lib/jenkins/workspace/app-sre-aws-resource-exporter-gh-build-master/rds.go:396 +0x261d
github.com/prometheus/client_golang/prometheus.(*Registry).Gather.func1()
/var/lib/jenkins/go/pkg/mod/github.com/prometheus/[email protected]/prometheus/registry.go:443 +0x12b
created by github.com/prometheus/client_golang/prometheus.(*Registry).Gather
/var/lib/jenkins/go/pkg/mod/github.com/prometheus/[email protected]/prometheus/registry.go:535 +0xe4d

@steveteahan
Copy link
Contributor Author

This was fixed in #33

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants