Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Packetbeat: DNS processor configuration parsing error #21103

Closed
dddpaul opened this issue Sep 15, 2020 · 2 comments · Fixed by #21085
Closed

Packetbeat: DNS processor configuration parsing error #21103

dddpaul opened this issue Sep 15, 2020 · 2 comments · Fixed by #21085
Labels

Comments

@dddpaul
Copy link
Contributor

dddpaul commented Sep 15, 2020

Hi.

For example, given configuration:

processors:
  - dns:
      type: reverse
      success_cache:
        min_ttl: 2000m

Results with default SuccessCache MinTTL (1m):

DEBUG	[processor.dns]	dns/dns.go:67	DNS processor config: {CacheConfig:{SuccessCache:{TTL:0s MinTTL:1m0s InitialCapacity:1000 MaxCapacity:10000} FailureCache:{TTL:1m0s MinTTL:1m0s InitialCapacity:1000 MaxCapacity:10000}} Nameservers:[] Timeout:500ms Type:reverse Action:append TagOnFailure:[] Fields:null Transport:udp reverseFlat:map[]}	{"instance_id": 1}

The point is that this piece of code (see

type Config struct {
):

// Config defines the configuration options for the DNS processor.
type Config struct {
	CacheConfig
	Nameservers  []string      `config:"nameservers"`
	...
}

// CacheConfig defines the success and failure caching parameters.
type CacheConfig struct {
	SuccessCache CacheSettings `config:"success_cache"`
	FailureCache CacheSettings `config:"failure_cache"`
}

should work like:

// Config defines the configuration options for the DNS processor.
type Config struct {
	SuccessCache CacheSettings `config:"success_cache"`
	FailureCache CacheSettings `config:"failure_cache"`
	Nameservers  []string      `config:"nameservers"`
	...
}

But it doesn't.

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Sep 15, 2020
@ycombinator ycombinator added bug Team:Integrations Label for the Integrations team labels Sep 15, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations (Team:Integrations)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Sep 15, 2020
@andresrc andresrc added Team:SIEM and removed Team:Integrations Label for the Integrations team labels Sep 16, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/siem (Team:SIEM)

andrewkroh pushed a commit that referenced this issue Sep 28, 2020
* Adds a default for failure_cache.min_ttl

* Parse YAML as inline + fix default value

Fixes #21103

Co-authored-by: Adrian Serrano <adrisr83@gmail.com>
andrewkroh pushed a commit to andrewkroh/beats that referenced this issue Sep 28, 2020
* Adds a default for failure_cache.min_ttl

* Parse YAML as inline + fix default value

Fixes elastic#21103

Co-authored-by: Adrian Serrano <adrisr83@gmail.com>
(cherry picked from commit ddfe085)
andrewkroh added a commit that referenced this issue Oct 1, 2020
* Adds a default for failure_cache.min_ttl

* Parse YAML as inline + fix default value

Fixes #21103

Co-authored-by: Adrian Serrano <adrisr83@gmail.com>
(cherry picked from commit ddfe085)

Co-authored-by: Shaunak Kashyap <ycombinator@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants