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

Feature request: allow .d-style configuration files #1648

Closed
matevarga opened this Issue May 19, 2016 · 4 comments

Comments

Projects
None yet
3 participants
@matevarga
Copy link

matevarga commented May 19, 2016

Currently, Prometheus' configuration is stored in one single file. However, maintaining a single file is inconvenient if there are multiple, logically separate, individually deployed or maintained monitored targets.

Example: we try to use one single Prometheus instance to monitor a set of hosts and services. Let's say we have service set A and B. Set A and B consist of multiple services, all of them should be monitored by Prometheus. Now the deployment both set of services is automated, the actual host names, ports can change over time. What I want to be able to do: whenever A is deployed, a file called A.yml describing the monitored resources of A is placed into a directory checked by Prometheus, then the deployment script sends a SIGHUP to Prometheus. Same in case of B.

This means that Prometheus' scrape config can be updated on a per-target(-set) basis, and there is no direct coupling between monitored services.

@grobie

This comment has been minimized.

Copy link
Member

grobie commented May 19, 2016

This is already possible using the file service discovery: https://prometheus.io/docs/operating/configuration/#<file_sd_config>. There are some blog posts about that as well, for example https://prometheus.io/blog/2015/06/01/advanced-service-discovery/. Using file sd even removes the need to reload the config as prometheus will watch for changes to the files on its own.

@fabxc

This comment has been minimized.

Copy link
Member

fabxc commented May 19, 2016

Please check file-based service discovery:
https://prometheus.io/docs/operating/configuration/#file_sd_config

@matevarga

This comment has been minimized.

Copy link
Author

matevarga commented May 20, 2016

Thanks guys, this works -- I'll close the issue and sorry for the hassle.

@matevarga matevarga closed this May 20, 2016

@lock

This comment has been minimized.

Copy link

lock bot commented Mar 24, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 24, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.