-
Notifications
You must be signed in to change notification settings - Fork 641
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
Support config.d
#628
Comments
The logical consequence of this is that |
Should we only load |
I would restrict it to loading snmp_xxx.yml or snmp.yml. Makes sure no unexpected files are read. I personally, am not a fan of multiple directories to read from. I would rather avoid updating flags often (anti pattern) and it is common to have lots of classes of devices, so it can get unwieldy fast. |
Hard fail is the right approach, IMO. The fail logic should be enhanced to give an indication in which module it broke if the current error messages are not clear enough. |
I agree that the dir option should be optional. It is a new feature. |
Our current thinking is at https://docs.google.com/document/d/1BK_Gc3ixoWyxr9F5qGC07HEcfDPtb6z96mfqoGyz52Y and I will open a thread on prometheus-developers to make people aware of it, as well. |
How about this for the flag changes:
|
JTMS, this would be in addition to https://docs.google.com/document/d/1BK_Gc3ixoWyxr9F5qGC07HEcfDPtb6z96mfqoGyz52Y/edit ? I am wondering if we even need to remove What would be the default heuristic of
|
@SuperQ Implementing https://docs.google.com/document/d/1BK_Gc3ixoWyxr9F5qGC07HEcfDPtb6z96mfqoGyz52Y/edit#heading=h.jxn0lovs8rll first would make the considerations in #628 (comment) largely go away. It could pull in |
Not really needed. Can achieve the same using directory with symlinks. |
I think
I think more than one directory would be useful particularly if you want to separate directories for modules and auths (#619)
FYI, exporter_exporter provides this feature. (Aside: it would be nice for blackbox_exporter too!) Since in the current design for separate auth has a single YAML file with both "auths" and "modules" keys, it would then be up to the user whether they want to have combined module+auth files, or separate files in the same directory, or separate directories. |
snmp_exporter 0.23(rc.0) is now out, with top level keys It would need to decided what to do about repeated module keys or auth keys: either a later one overrides a previous one, or an error is raised. I think as long as the ordering is deterministic (e.g. the filenames are sorted) I'd be happy with overriding. |
Overriding is the way to go IMO. |
Support loading multiple configuration files by by allowing `--config.file` to be repeateable. As well as supporting glob file matching for `config.d` style setups. * Conflicting auth or module keys are treated as errors. Fixes: #628 Signed-off-by: SuperQ <[email protected]>
Support loading multiple configuration files by by allowing `--config.file` to be repeateable. As well as supporting glob file matching for `config.d` style setups. * Conflicting auth or module keys are treated as errors. Fixes: #628 Signed-off-by: SuperQ <[email protected]>
Support loading multiple configuration files by by allowing `--config.file` to be repeateable. As well as supporting glob file matching for `config.d` style setups. * Conflicting auth or module keys are treated as errors. Fixes: #628 Signed-off-by: SuperQ <[email protected]>
Ok, I've made a proposed implementation that is pretty simple.
I tried to make override work, but ran into annoying issues with map copying. Maybe possible, but rejecting conflicts was an easier first pass at this. |
* Support loading multiple configuration files Support loading multiple configuration files by by allowing `--config.file` to be repeateable. As well as supporting glob file matching for `config.d` style setups. * Conflicting auth or module keys are treated as errors. Fixes: #628 --------- Signed-off-by: SuperQ <[email protected]> Signed-off-by: Ben Kochie <[email protected]> Co-authored-by: Richard Hartmann <[email protected]>
but .. i try to set ● snmp_exporter.service - Prometheus SNMP Exporter Service Agu 29 04:06:26 billingtmd systemd[1]: Started Prometheus SNMP Exporter Service. Agu 29 04:06:56 billingtmd systemd[1]: Started Prometheus SNMP Exporter Service. and 1'm still getting error .. how to fix that ? |
You're running version 0.23.0. You need to compile from source, or wait for the next release. See your logs:
|
* Support loading multiple configuration files Support loading multiple configuration files by by allowing `--config.file` to be repeateable. As well as supporting glob file matching for `config.d` style setups. * Conflicting auth or module keys are treated as errors. Fixes: prometheus#628 --------- Signed-off-by: SuperQ <[email protected]> Signed-off-by: Ben Kochie <[email protected]> Co-authored-by: Richard Hartmann <[email protected]> Signed-off-by: Stephan Windischmann <[email protected]>
We should allow a directory from which we build the configuration.
Open questions / debate:
--config.directory = 'foo'
.The text was updated successfully, but these errors were encountered: