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

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

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
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.

None yet

2 participants