-
Notifications
You must be signed in to change notification settings - Fork 10
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
Dynamic Zero Config Prometheus setup #4
Comments
Thanks for this proposal. Here are some thoughts:
|
In terms of storage, each Prometheus instance manages its own storage, so once federated, the stack local instances only need enough retention for their own private rules. If any. The |
Note: If we do this, we should do the implementation over at https://github.com/neuroforgede/swarmsible-stacks |
Description
As a consumer of a Swarm, I want to deploy a stack that contains its own Prometheus instance. This prometheus instance already knows how to scrape all the services in this stack. However, all the metrics need to be scraped by the swarms main Prometheus instance to arrive in the central Grafana dashboard.
Proposal
The main prometheus instance can contain a federation job. Something like this :-
Two additional requirements are present: a common prometheus network, and a convention based naming approach: each child prometheus instance needs to add itself to the common prometheus network, and declare an alias there that allows its discovery by the main Prometheus instance.
Stack local prometheus instances could use this minimal declaration to become eligable for scraping.
Result
By probing
scrape.target
viadns_sd_configs
the main instance gets a dynamic list of IPs of all active stack local prometheus instances, and grabs all their metrics via the/federate
endpoint.The text was updated successfully, but these errors were encountered: