Skip to content
This repository has been archived by the owner on Mar 27, 2024. It is now read-only.

Commit

Permalink
disable dyncfg (#1456)
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyam8 authored Jan 4, 2024
1 parent e51ecc8 commit ee8b2c5
Showing 1 changed file with 14 additions and 15 deletions.
29 changes: 14 additions & 15 deletions agent/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import (

"github.com/netdata/go.d.plugin/agent/confgroup"
"github.com/netdata/go.d.plugin/agent/discovery"
"github.com/netdata/go.d.plugin/agent/discovery/dyncfg"
"github.com/netdata/go.d.plugin/agent/filelock"
"github.com/netdata/go.d.plugin/agent/filestatus"
"github.com/netdata/go.d.plugin/agent/functions"
Expand Down Expand Up @@ -186,20 +185,20 @@ func (a *Agent) run(ctx context.Context) {
jobsManager.Out = a.Out
jobsManager.Modules = enabledModules

// TODO: rm 'if' after https://github.com/netdata/netdata/issues/16079
if logger.Level.Enabled(slog.LevelDebug) {
dyncfgDiscovery, _ := dyncfg.NewDiscovery(dyncfg.Config{
Plugin: a.Name,
API: netdataapi.New(a.Out),
Modules: enabledModules,
ModuleConfigDefaults: discCfg.Registry,
Functions: functionsManager,
})

discoveryManager.Add(dyncfgDiscovery)

jobsManager.Dyncfg = dyncfgDiscovery
}
// TODO: API will be changed in https://github.com/netdata/netdata/pull/16702
//if logger.Level.Enabled(slog.LevelDebug) {
// dyncfgDiscovery, _ := dyncfg.NewDiscovery(dyncfg.Config{
// Plugin: a.Name,
// API: netdataapi.New(a.Out),
// Modules: enabledModules,
// ModuleConfigDefaults: discCfg.Registry,
// Functions: functionsManager,
// })
//
// discoveryManager.Add(dyncfgDiscovery)
//
// jobsManager.Dyncfg = dyncfgDiscovery
//}

if reg := a.setupVnodeRegistry(); reg == nil || reg.Len() == 0 {
vnodes.Disabled = true
Expand Down

0 comments on commit ee8b2c5

Please sign in to comment.