Add aurora_replica_status collector#1311
Open
megative wants to merge 1 commit into
Open
Conversation
Add the first Amazon Aurora PostgreSQL collector, with the supporting Aurora detection infrastructure on the instance struct. - instance.isAurora bool field, set by setup() via a one-shot SELECT aurora_version() (sync.Once, one probe per process) - aurora_replica_status collector exposes replica lag, replay latency, and pending read IOs from aurora_replica_status(). Gated on instance.isAurora — on non-Aurora servers returns ErrNoData. - Disabled by default; opt-in via --collector.aurora_replica_status. First in a series of per-collector PRs splitting prometheus-community#1308 as requested by @sysadmind. Signed-off-by: Pavel K <megativ3@gmail.com>
5 tasks
Author
|
hi @SuperQ @sysadmind |
Author
|
@SuperQ @sysadmind guys, sorry for pushing but any luck you have a chance to review this one? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
First PR in a series splitting #1308 (Aurora support) into one-PR-per-collector as requested by @sysadmind.
This PR adds:
Aurora auto-detection infrastructure on
instancestruct. Mirrors the existingversionfield pattern (per @SuperQ feedback). On everysetup(), a one-shotSELECT aurora_version()runs viasync.Once— exactly one probe per process lifetime. The result is cached ininstance.isAuroraand read by Aurora-specific collectors.aurora_replica_statuscollector. Exposes the values from Aurora'saurora_replica_status()built-in: replica lag (per server), replay latency, and pending read IOs. Disabled by default (--collector.aurora_replica_status); on non-Aurora servers it short-circuits toErrNoDatacleanly.Test plan
go build ./...,go vet ./...,go test ./...clean.emits metrics; per-process
aurora_version()probe fires exactly once.ErrNoDatasilently; no error logs.
Follow-up PRs in the series will add the remaining 8 Aurora collectors on top of this infrastructure.