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

[Filebeat] add_kubernetes_metadata matcher broken 7.0.0-rc1 #11543

Closed
EthanStrider opened this issue Mar 29, 2019 · 4 comments
Closed

[Filebeat] add_kubernetes_metadata matcher broken 7.0.0-rc1 #11543

EthanStrider opened this issue Mar 29, 2019 · 4 comments
Labels

Comments

@EthanStrider
Copy link

EthanStrider commented Mar 29, 2019

  • Version: 7.0.0-rc1
  • Operating System: Cloud

Getting the following error consistently in Filebeat K8's pod:

2019-03-29T15:43:15.893Z    DEBUG    [autodiscover]    autodiscover/autodiscover.go:183    Generated configs: []
2019-03-29T15:43:15.893Z    DEBUG    [autodiscover]    autodiscover/autodiscover.go:243    Got a meta field in the event
panic: interface conversion: interface {} is nil, not common.MapStr

goroutine 577 [running]:
github.com/elastic/beats/filebeat/processor/add_kubernetes_metadata.(*LogPathMatcher).MetadataIndex(0xc0003e1840, 0xc000997cb0, 0xc0002f16b0, 0xc000bdb830)
    /go/src/github.com/elastic/beats/filebeat/processor/add_kubernetes_metadata/matchers.go:80 +0x8a8
github.com/elastic/beats/libbeat/processors/add_kubernetes_metadata.(*Matchers).MetadataIndex(0xc0002f16b0, 0xc000997cb0, 0x0, 0x0)
    /go/src/github.com/elastic/beats/libbeat/processors/add_kubernetes_metadata/matchers.go:82 +0xb2
github.com/elastic/beats/libbeat/processors/add_kubernetes_metadata.(*kubernetesAnnotator).Run(0xc0002f1a40, 0xc0006433c0, 0xc0006433c0, 0x0, 0x0)
    /go/src/github.com/elastic/beats/libbeat/processors/add_kubernetes_metadata/kubernetes.go:147 +0x58
github.com/elastic/beats/libbeat/publisher/processing.(*group).Run(0xc00046c3f0, 0xc0006433c0, 0xc0006433c0, 0x0, 0x0)
    /go/src/github.com/elastic/beats/libbeat/publisher/processing/processors.go:101 +0x94
github.com/elastic/beats/libbeat/publisher/processing.(*group).Run(0xc0008de5a0, 0xc0006433c0, 0x198, 0xc000881050, 0xa)
    /go/src/github.com/elastic/beats/libbeat/publisher/processing/processors.go:101 +0x94
github.com/elastic/beats/libbeat/publisher/pipeline.(*client).publish(0xc000b61320, 0x0, 0xed4303413, 0x0, 0x0, 0xc000997500, 0x0, 0x0)
    /go/src/github.com/elastic/beats/libbeat/publisher/pipeline/client.go:85 +0x498
github.com/elastic/beats/libbeat/publisher/pipeline.(*client).Publish(0xc000b61320, 0x0, 0xed4303413, 0x0, 0x0, 0xc000997500, 0x0, 0x0)
    /go/src/github.com/elastic/beats/libbeat/publisher/pipeline/client.go:64 +0x99
github.com/elastic/beats/filebeat/channel.(*outlet).OnEvent(0xc0008de6f0, 0xc000186a80, 0x1614ca0)
    /go/src/github.com/elastic/beats/filebeat/channel/outlet.go:63 +0x1ab
github.com/elastic/beats/filebeat/harvester.(*Forwarder).Send(0xc000b28450, 0xc000186a80, 0x1807d43, 0x5)
    /go/src/github.com/elastic/beats/filebeat/harvester/forwarder.go:50 +0x41
github.com/elastic/beats/filebeat/input/redis.(*Harvester).Run(0xc0009973b0, 0x0, 0x0)
    /go/src/github.com/elastic/beats/filebeat/input/redis/harvester.go:164 +0xd7a
github.com/elastic/beats/filebeat/harvester.(*Registry).Start.func1(0xc000642d40, 0x195d980, 0xc0009973b0)
    /go/src/github.com/elastic/beats/filebeat/harvester/registry.go:96 +0x73
created by github.com/elastic/beats/filebeat/harvester.(*Registry).Start
    /go/src/github.com/elastic/beats/filebeat/harvester/registry.go:90 +0x12b
@ruflin ruflin added bug Filebeat Filebeat labels Mar 29, 2019
@ruflin
Copy link
Member

ruflin commented Mar 29, 2019

I think this is cause by https://github.com/elastic/beats/blob/master/filebeat/processor/add_kubernetes_metadata/matchers.go#L80 introduced in #10506. The reason is that the redis input is used (@EthanStrider can you confirm this) so the log.file.path field is not available.

@alakahakai Could you have a look at this as you introduce this change.

@andrewkroh @tsg FYI.

@EthanStrider
Copy link
Author

EthanStrider commented Mar 29, 2019

@ruflin Yes, we are using Filebeat for redis (as well as other things).

@alakahakai
Copy link

Addressed in pull #11549 and pull #11553

@alakahakai
Copy link

I am closing this because the issue should have been fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants