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

Serving SRV targets and getting all nodes in single request #835

Merged
merged 39 commits into from
Oct 4, 2024

Conversation

adnull
Copy link
Contributor

@adnull adnull commented Apr 3, 2024

As it stated in #773 there is no chance to monitor cluster nodes with the only mongodb+srv url specified.
According to the specification, direct connection couldn't be used with a cluster, specified as a SRV domain

This update adds

  • --split-cluster option, which:
    • extracts mongodb+srv domain into cluster connection string containing nodes from DNS server
    • splits all cluster connection string into separate targets that can be queried by "target" parameter of multitarget endpoint
  • overall target endpoint "/scrapeall" which outputs all the targets metrics with a "instance" label containing nodename as a host:port pair (or only host if no port specified)

Combining all that features we can specify cluster url as mongodb+srv domain and monitor all the nodes metrics and states in one request by querying /scrapeall endpoint

@adnull adnull requested a review from a team as a code owner April 3, 2024 19:42
@adnull adnull requested review from BupycHuk and JiriCtvrtka and removed request for a team April 3, 2024 19:42
@JiriCtvrtka JiriCtvrtka enabled auto-merge (squash) May 7, 2024 12:16
@BupycHuk BupycHuk disabled auto-merge May 30, 2024 10:36
README.md Show resolved Hide resolved
exporter/server.go Outdated Show resolved Hide resolved
exporter/server.go Show resolved Hide resolved
exporter/server.go Show resolved Hide resolved
REFERENCE.md Outdated Show resolved Hide resolved
Copy link
Contributor

@idoqo idoqo left a comment

Choose a reason for hiding this comment

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

Looks good, we should also enable fcv collector.

exporter/exporter.go Show resolved Hide resolved
Signed-off-by: ad <d.lexand@gmail.com>
@idoqo idoqo merged commit 7aaecd0 into percona:main Oct 4, 2024
6 checks passed
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.

4 participants