diff --git a/provider/docker.go b/provider/docker.go index abeb59018..4f4a7742a 100644 --- a/provider/docker.go +++ b/provider/docker.go @@ -560,6 +560,10 @@ func parseContainer(container dockertypes.ContainerJSON) dockerData { if container.ContainerJSONBase.HostConfig != nil { dockerData.NetworkSettings.NetworkMode = container.ContainerJSONBase.HostConfig.NetworkMode } + + if container.State != nil && container.State.Health != nil { + dockerData.Health = container.State.Health.Status + } } if container.Config != nil && container.Config.Labels != nil { @@ -583,10 +587,6 @@ func parseContainer(container dockertypes.ContainerJSON) dockerData { } - if container.State != nil && container.State.Health != nil { - dockerData.Health = container.State.Health.Status - } - return dockerData }