mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-02-17 10:16:35 +00:00
fix: fail, if unknown collector is defined in enabled list (#1693)
This commit is contained in:
@@ -188,7 +188,11 @@ func run() int {
|
||||
}
|
||||
|
||||
enabledCollectorList := utils.ExpandEnabledCollectors(*enabledCollectors)
|
||||
collectors.Enable(enabledCollectorList)
|
||||
if err := collectors.Enable(enabledCollectorList); err != nil {
|
||||
logger.Error(err.Error())
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
// Initialize collectors before loading
|
||||
if err = collectors.Build(logger); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user