Skip to content

Commit

Permalink
Don't try to emit docker autodiscover event with missing container (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
jsoriano authored Feb 25, 2019
1 parent 897936e commit a89b13f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libbeat/autodiscover/providers/docker/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,10 @@ func (d *Provider) generateMetaDocker(event bus.Event) (*docker.Container, *dock

func (d *Provider) emitContainer(event bus.Event, flag string) {
container, meta := d.generateMetaDocker(event)
if container == nil || meta == nil {
return
}

var host string
if len(container.IPAddresses) > 0 {
host = container.IPAddresses[0]
Expand Down

0 comments on commit a89b13f

Please sign in to comment.