mirror of
https://github.com/netdata/netdata.git
synced 2025-04-14 17:48:37 +00:00
fix(go.d dyncfg): don't overwrite source (#19673)
This commit is contained in:
parent
231813871a
commit
943bfe5286
2 changed files with 2 additions and 10 deletions
src/go/plugin/go.d/agent/jobmgr
|
@ -674,12 +674,8 @@ func (m *Manager) dyncfgConfigUpdate(fn functions.Function) {
|
|||
}
|
||||
|
||||
func (m *Manager) dyncfgSetConfigMeta(cfg confgroup.Config, module, name string, fn functions.Function) {
|
||||
src := fmt.Sprintf("type=dyncfg,module=%s,job=%s", module, name)
|
||||
if v := getFnSourceValue(fn, "user"); v != "" {
|
||||
src += fmt.Sprintf(", user=%s", v)
|
||||
}
|
||||
cfg.SetProvider("dyncfg")
|
||||
cfg.SetSource(src)
|
||||
cfg.SetSource(fn.Source)
|
||||
cfg.SetSourceType("dyncfg")
|
||||
cfg.SetModule(module)
|
||||
cfg.SetName(name)
|
||||
|
|
|
@ -311,11 +311,7 @@ func (m *Manager) verifyVnodeUnique(newCfg *vnodes.VirtualNode) error {
|
|||
|
||||
func dyncfgUpdateVnodeConfig(cfg *vnodes.VirtualNode, name string, fn functions.Function) {
|
||||
cfg.SourceType = confgroup.TypeDyncfg
|
||||
src := "type=dyncfg"
|
||||
if v := getFnSourceValue(fn, "user"); v != "" {
|
||||
src += fmt.Sprintf(", user=%s", v)
|
||||
}
|
||||
cfg.Source = src
|
||||
cfg.Source = fn.Source
|
||||
cfg.Name = name
|
||||
if cfg.Hostname == "" {
|
||||
cfg.Hostname = name
|
||||
|
|
Loading…
Add table
Reference in a new issue