diff --git a/config/config.go b/config/config.go index 86376577e..885d7d1e9 100644 --- a/config/config.go +++ b/config/config.go @@ -94,6 +94,9 @@ type Config struct { Persister *persister.Persister NumberSecrets uint64 + + seenAgentTable bool + seenAgentTableOnce sync.Once } // Ordered plugins used to keep the order in which they appear in a file @@ -516,6 +519,13 @@ func (c *Config) LoadConfigData(data []byte) error { // Parse agent table: if val, ok := tbl.Fields["agent"]; ok { + if c.seenAgentTable { + c.seenAgentTableOnce.Do(func() { + log.Printf("W! Overlapping settings in multiple agent tables are not supported: may cause undefined behavior") + }) + } + c.seenAgentTable = true + subTable, ok := val.(*ast.Table) if !ok { return errors.New("invalid configuration, error parsing agent table")