datadog-agent icon indicating copy to clipboard operation
datadog-agent copied to clipboard

Logs reported before tags and kubernetes information populated

Open cknowles opened this issue 8 years ago • 11 comments

Describe what happened:

  • Agent 6.3.2 with log reporting enabled on Kubernetes as a Daemon Set using the helm chart
  • Log exclusion filters we have are based mostly off Kubernetes labels coming through as tags
  • Perform rolling update of worker nodes
  • Receive large spike in logs with no Kubernetes labels as tags
  • These logs are not excluded due to tags to filter them not being present
  • Did not see any specific errors coming from the agent

Describe what you expected:

If information is not yet available to augment the logs such as Kubernetes labels, I'd expect log collection to pause if there's no particular error.

Steps to reproduce the issue:

Perform any update such as cycling a Kubernetes worker node or scale up a worker pool.

Additional environment details (Operating System, Cloud provider, etc):

AWS, Container Linux 1745.7.0.

cknowles avatar Jul 11 '18 14:07 cknowles

BTW, sometimes the logs coming through in the datadog UI also don't have the docker tag information such as what the image_name. Looks like a similar problem. Eventually it seems to have cleared up as the indexed log count per minute has reduced back down again.

cknowles avatar Jul 11 '18 14:07 cknowles

Hello @c-knowles ,

Thanks for reporting. Just to make sure I correctly understand the issue:

  1. Sometimes container logs are not properly tagged with container metadata
  2. During Spikes logs that should be excluded are still sent with no metadata

We will try to replicate the issue and investigate to fix this. Meanwhile, it might be helpful to provide the agent flare and the result of the docker inspect of one of the container which should be excluded. (Feel free to send those to [email protected] and reference this issue).

Thanks.

NilsBunge avatar Jul 11 '18 15:07 NilsBunge

Hi @NBParis, I've flared to 155927. We've since discovered some hosts are not reporting any of the metadata anymore still with various errors in the logs:

datadog-master-datadog-cfrhr datadog [ AGENT ] 2018-07-12 08:06:29 UTC | ERROR | (integration_config.go:108 in buildLogSourcesFromDirectory) | Invalid file path: ..2018_07_12_08_06_19.133422244/docker.yaml 
datadog-master-datadog-cfrhr datadog [ AGENT ] 2018-07-12 08:06:29 UTC | ERROR | (auditor.go:127 in recoverRegistry) | open /opt/datadog-agent/run/registry.json: no such file or directory 
datadog-master-datadog-cfrhr datadog [ AGENT ] 2018-07-12 08:06:31 UTC | ERROR | (services.go:113 in ServicesForPod) | could not get services: no mapping for pod obfuscated-996f448c4-9wcc5 in namespace int

cknowles avatar Jul 12 '18 08:07 cknowles

@c-knowles Thanks for all the info, we're following up on our side and with you on that ticket.

dabcoder avatar Jul 13 '18 14:07 dabcoder

I am seeing very similar errors and lack of kubernetes metadata using agent 6.3.3 (Also installed with Helm)

sudermanjr avatar Aug 28 '18 14:08 sudermanjr

@sudermanjr Would you mind sending us a note on [email protected] with details of the issue you're experiencing? You can send us some agent logs with https://docs.datadoghq.com/agent/troubleshooting/?tab=agentv6#send-a-flare.

@c-knowles Also sent you a note on the ticket 155927.

dabcoder avatar Aug 29 '18 07:08 dabcoder

For those reading this issue, Datadog support has been provided with logs and is looking into the issue.

sudermanjr avatar Sep 06 '18 22:09 sudermanjr

Hi,

This issue should be solved as we plugged the logs-agent to autodiscovery to collect new containers. The fix is available on the version 6.5 that will be released beginning of next week. Waiting for your feedback. Thanks

ajacquemot avatar Sep 07 '18 08:09 ajacquemot

The 6.5 container was available a bit ago and seems to have been working well for us.

sudermanjr avatar Oct 11 '18 14:10 sudermanjr

Thanks @sudermanjr for your feedback.

@c-knowles Any update on your end with the latest version of the agent (6.5.2)?

NilsBunge avatar Oct 11 '18 14:10 NilsBunge

As it seems that everything is going well since version 6.5.x I'll go ahead and close this issue.

Feel free to reach out to [email protected] if you have any other questions or issues.

Thanks a lot.

NilsBunge avatar Jan 30 '19 13:01 NilsBunge