-
Notifications
You must be signed in to change notification settings - Fork 634
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
Split config of auth and modules #859
Conversation
3fb0b34
to
bcd8ebf
Compare
503e1f4
to
9b3b0e9
Compare
f4ee7d2
to
4a7a6f0
Compare
4a7a6f0
to
ea8444c
Compare
Hey thanks for the tag, the only thing that might not be straighforward would be what to do with the auth.
But that might not be clear when reading the parameter in the Readme |
Also CC @dswarbrick for review. |
ea8444c
to
97e2206
Compare
@sebastien-coavoux Thanks, yea, I forgot to update the top-level README. I've updated that with some more information on how to use the the split auth/module. I've also renamed the default auth to |
053ff00
to
cf42453
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
It seems that this would also address what #601 attempted to solve. |
37a8099
to
8db8ef0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! I've been working on adapting the changes to Grafana Agent's SNMP integration and overall I didn't find any problems. It will introduce breaking changes but for sake of simplicity. If you curious how is looking, here's WIP branch (cc @RichiH).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What would a typical rollout of this version look like? It seems like it requires both changes to the configuration, and to the scrape parameters, at the same time?
How could we ease this transition? For example, could the exporter understand the legacy configuration for a while? Or could we still support modules referencing a certain auth, so that the scrape URL doesn't have to change atomically?
This function is very very useful. I hope I can use this function asap. |
Any last thoughts? I plan to merge this soon. |
@@ -60,17 +63,21 @@ var ( | |||
DefaultRegexpExtract = RegexpExtract{ | |||
Value: "$1", | |||
} | |||
|
|||
ErrUnsupportedVersion = errors.New("unsupported config version") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ErrUnsupportedVersion = errors.New("unsupported config version") | |
ErrUnsupportedVersion = errors.New("Unsupported config version, we only support config version 2. Please see https://github.com/prometheus/snmp_exporter/blob/main/README.md#debugging") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a Go error, it shouldn't be this verbose.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will the user see it on CLI?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but basically no. That's the whole reason for the "Possible old config file" error. The user won't directly see this error. It's for internal errors.Is()
use.
There's no in-review way to add the
to the end of the README. |
@RichiH That change is not needed as we already give a URL on error. |
Unless there's an active reason not to, I would prefer to leave more rather than fewer breadcrumbs for users hitting a wall. |
There already is |
@@ -0,0 +1,59 @@ | |||
# Module and Auth Split Migration | |||
|
|||
In [version 0.23.0](https://github.com/prometheus/snmp_exporter/releases/tag/v0.23.0) the configuration for the `snmp_epxorter` the configuration file format has changed. Configuration files for versions v0.22.0 and before will not work. The configuration was split from a flat list of modules to separate metric walking/mapping modules and authentication configuratoins. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/configuratoins/configurations/
BREAKING CHANGES: This version of the exporter introduces a new configuration file format. This new format separates the walk and metric mappings from the connection and authentication settings. This allows for easier configuration of different auth params without having to duplicate the full walk and metric mapping. See auth-split-migration.md for more details. * [CHANGE] Split config of auth and modules #859 * [BUGFIX] Fix metrics path not using command-line argument value #904 Signed-off-by: SuperQ <[email protected]>
BREAKING CHANGES: This version of the exporter introduces a new configuration file format. This new format separates the walk and metric mappings from the connection and authentication settings. This allows for easier configuration of different auth params without having to duplicate the full walk and metric mapping. See auth-split-migration.md for more details. * [CHANGE] Split config of auth and modules #859 * [ENHANCEMENT] Improved Lookup process for label information #908 * [BUGFIX] Fix metrics path not using command-line argument value #904 Signed-off-by: SuperQ <[email protected]>
BREAKING CHANGES: This version of the exporter introduces a new configuration file format. This new format separates the walk and metric mappings from the connection and authentication settings. This allows for easier configuration of different auth params without having to duplicate the full walk and metric mapping. See auth-split-migration.md for more details. * [CHANGE] Split config of auth and modules #859 * [ENHANCEMENT] Improved Lookup process for label information #908 * [BUGFIX] Fix metrics path not using command-line argument value #904 Signed-off-by: SuperQ <[email protected]>
BREAKING CHANGES: This version of the exporter introduces a new configuration file format. This new format separates the walk and metric mappings from the connection and authentication settings. This allows for easier configuration of different auth params without having to duplicate the full walk and metric mapping. See auth-split-migration.md for more details. * [CHANGE] Split config of auth and modules #859 * [ENHANCEMENT] Improved Lookup process for label information #908 * [BUGFIX] Fix metrics path not using command-line argument value #904 Signed-off-by: SuperQ <[email protected]>
BREAKING CHANGES: This version of the exporter introduces a new configuration file format. This new format separates the walk and metric mappings from the connection and authentication settings. This allows for easier configuration of different auth params without having to duplicate the full walk and metric mapping. See auth-split-migration.md for more details. * [CHANGE] Split config of auth and modules #859 * [FEATURE] Improved Lookup process for label information #908 * [ENHANCEMENT] Add support for parsing SNMP transport from target #914 * [BUGFIX] Fix metrics path not using command-line argument value #904 Signed-off-by: SuperQ <[email protected]>
BREAKING CHANGES: This version of the exporter introduces a new configuration file format. This new format separates the walk and metric mappings from the connection and authentication settings. This allows for easier configuration of different auth params without having to duplicate the full walk and metric mapping. See auth-split-migration.md for more details. * [CHANGE] Split config of auth and modules #859 * [FEATURE] Improved Lookup process for label information #908 * [ENHANCEMENT] Add support for parsing SNMP transport from target #914 * [BUGFIX] Fix metrics path not using command-line argument value #904 Signed-off-by: SuperQ <[email protected]>
BREAKING CHANGES: This version of the exporter introduces a new configuration file format. This new format separates the walk and metric mappings from the connection and authentication settings. This allows for easier configuration of different auth params without having to duplicate the full walk and metric mapping. See auth-split-migration.md for more details. * [CHANGE] Split config of auth and modules #859 * [FEATURE] Add support for parsing SNMP transport from target #914 * [ENHANCEMENT] Improved Lookup process for label information #908 * [BUGFIX] Fix metrics path not using command-line argument value #904 Signed-off-by: SuperQ <[email protected]>
BREAKING CHANGES: This version of the exporter introduces a new configuration file format. This new format separates the walk and metric mappings from the connection and authentication settings. This allows for easier configuration of different auth params without having to duplicate the full walk and metric mapping. See auth-split-migration.md for more details. * [CHANGE] Split config of auth and modules #859 * [FEATURE] Add support for parsing SNMP transport from target #914 * [ENHANCEMENT] Improved Lookup process for label information #908 * [BUGFIX] Fix metrics path not using command-line argument value #904 Signed-off-by: SuperQ <[email protected]>
BREAKING CHANGES: This version of the exporter introduces a new configuration file format. This new format separates the walk and metric mappings from the connection and authentication settings. This allows for easier configuration of different auth params without having to duplicate the full walk and metric mapping. See auth-split-migration.md for more details. * [CHANGE] Split config of auth and modules #859 * [FEATURE] Add support for parsing SNMP transport from target #914 * [ENHANCEMENT] Improved Lookup process for label information #908 * [BUGFIX] Fix metrics path not using command-line argument value #904 Signed-off-by: SuperQ <[email protected]>
BREAKING CHANGES: This version of the exporter introduces a new configuration file format. This new format separates the walk and metric mappings from the connection and authentication settings. This allows for easier configuration of different auth params without having to duplicate the full walk and metric mapping. See auth-split-migration.md for more details. * [CHANGE] Split config of auth and modules #859 * [FEATURE] Add support for parsing SNMP transport from target #914 * [ENHANCEMENT] Improved Lookup process for label information #908 * [BUGFIX] Fix metrics path not using command-line argument value #904 Signed-off-by: SuperQ <[email protected]>
* Release v0.23.0 BREAKING CHANGES: This version of the exporter introduces a new configuration file format. This new format separates the walk and metric mappings from the connection and authentication settings. This allows for easier configuration of different auth params without having to duplicate the full walk and metric mapping. See auth-split-migration.md for more details. * [CHANGE] Split config of auth and modules #859 * [FEATURE] Add support for parsing SNMP transport from target #914 * [ENHANCEMENT] Improved Lookup process for label information #908 * [BUGFIX] Fix metrics path not using command-line argument value #904 Signed-off-by: SuperQ <[email protected]> * Lint dashboards Update dashboards to latest mixin linting. Signed-off-by: SuperQ <[email protected]> --------- Signed-off-by: SuperQ <[email protected]>
BREAKING CHANGES: This version of the exporter introduces a new configuration file format. This new format separates the walk and metric mappings from the connection and authentication settings. This allows for easier configuration of different auth params without having to duplicate the full walk and metric mapping. See auth-split-migration.md for more details. * [CHANGE] Split config of auth and modules prometheus#859 * [ENHANCEMENT] Improved Lookup process for label information prometheus#908 * [BUGFIX] Fix metrics path not using command-line argument value prometheus#904 Signed-off-by: SuperQ <[email protected]> Signed-off-by: Stephan Windischmann <[email protected]>
BREAKING CHANGES: This version of the exporter introduces a new configuration file format. This new format separates the walk and metric mappings from the connection and authentication settings. This allows for easier configuration of different auth params without having to duplicate the full walk and metric mapping. See auth-split-migration.md for more details. * [CHANGE] Split config of auth and modules prometheus#859 * [FEATURE] Add support for parsing SNMP transport from target prometheus#914 * [ENHANCEMENT] Improved Lookup process for label information prometheus#908 * [BUGFIX] Fix metrics path not using command-line argument value prometheus#904 Signed-off-by: SuperQ <[email protected]> Signed-off-by: Stephan Windischmann <[email protected]>
* Release v0.23.0 BREAKING CHANGES: This version of the exporter introduces a new configuration file format. This new format separates the walk and metric mappings from the connection and authentication settings. This allows for easier configuration of different auth params without having to duplicate the full walk and metric mapping. See auth-split-migration.md for more details. * [CHANGE] Split config of auth and modules prometheus#859 * [FEATURE] Add support for parsing SNMP transport from target prometheus#914 * [ENHANCEMENT] Improved Lookup process for label information prometheus#908 * [BUGFIX] Fix metrics path not using command-line argument value prometheus#904 Signed-off-by: SuperQ <[email protected]> * Lint dashboards Update dashboards to latest mixin linting. Signed-off-by: SuperQ <[email protected]> --------- Signed-off-by: SuperQ <[email protected]> Signed-off-by: Stephan Windischmann <[email protected]>
Allow configuration of auth/version parameters separately from the walk and metrics in the generator and exporter configuration.
ReloadConfig()
Fixes: #619