-
Notifications
You must be signed in to change notification settings - Fork 634
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow configuration of auth/version parameters separately from the walk and metrics in the generator and exporter configuration. * Simplify startup with `ReloadConfig()` * Make sure to init metrics on config reload. Fixes: #619 Signed-off-by: SuperQ <superq@gmail.com>
- Loading branch information
Showing
14 changed files
with
49,326 additions
and
49,135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. | ||
|
||
This change necessitates migration of the generator config and `snmp_exporter` config to the new format. | ||
|
||
The complete `generator` format is [documented in generator/README.md#file-format](generator/README.md#file-format) | ||
|
||
The complete `snmp_exporter` format is [documented in /generator/FORMAT.md](/generator/FORMAT.md). | ||
|
||
## Examples | ||
|
||
A generator containing the following config: | ||
|
||
```yaml | ||
modules: | ||
sys_uptime: | ||
version: 2 | ||
walk: | ||
- sysUpTime | ||
auth: | ||
community: public | ||
``` | ||
Would now become: | ||
```yaml | ||
auths: | ||
public_v2: | ||
community: public | ||
version: 2 | ||
modules: | ||
sys_uptime: | ||
walk: | ||
- sysUpTime | ||
``` | ||
The newly generated `snmp_exporter` config would be: | ||
|
||
```yaml | ||
# WARNING: This file was auto-generated using snmp_exporter generator, manual changes will be lost. | ||
auths: | ||
public_v2: | ||
community: public | ||
security_level: noAuthNoPriv | ||
auth_protocol: MD5 | ||
priv_protocol: DES | ||
version: 2 | ||
modules: | ||
if_mib: | ||
get: | ||
- 1.3.6.1.2.1.1.3.0 | ||
metrics: | ||
- name: sysUpTime | ||
oid: 1.3.6.1.2.1.1.3 | ||
type: gauge | ||
help: The time (in hundredths of a second) since the network management portion | ||
of the system was last re-initialized. - 1.3.6.1.2.1.1.3 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.