diff --git a/libbeat/processors/dns/config.go b/libbeat/processors/dns/config.go index b5e7cf0a0d3..8b0d6c9bd97 100644 --- a/libbeat/processors/dns/config.go +++ b/libbeat/processors/dns/config.go @@ -29,7 +29,7 @@ import ( // Config defines the configuration options for the DNS processor. type Config struct { - CacheConfig + CacheConfig `config:",inline"` Nameservers []string `config:"nameservers"` // Required on Windows. /etc/resolv.conf is used if none are given. Timeout time.Duration `conifg:"timeout"` // Per request timeout (with 2 nameservers the total timeout would be 2x). Type string `config:"type" validate:"required"` // Reverse is the only supported type currently. @@ -89,7 +89,7 @@ type CacheSettings struct { TTL time.Duration `config:"ttl"` // Minimum TTL value for successful DNS responses. - MinTTL time.Duration `config:"min_ttl" validate:"min=1"` + MinTTL time.Duration `config:"min_ttl" validate:"min=1ns"` // Initial capacity. How much space is allocated at initialization. InitialCapacity int `config:"capacity.initial" validate:"min=0"` @@ -166,6 +166,7 @@ var defaultConfig = Config{ MaxCapacity: 10000, }, FailureCache: CacheSettings{ + MinTTL: time.Minute, TTL: time.Minute, InitialCapacity: 1000, MaxCapacity: 10000,