Hi Filebeat experts,
I deployed Filebeat on my Kubernetes cluster using deamon set. I have many nodes in my cluster. In each node of my cluster, I have a Filebeat pods that is running and collecting all the pods logs on that node and push them to Kibana.
- I noticed that for some node, Filebeat pod is working fine and collecting the logs properly. I can see that based on the following logs that is reading 2 logs files currently.
{"level":"info","timestamp":"2021-02-08T14:29:14.116Z","logger":"monitoring","caller":"log/log.go:141","message":"Non-zero metrics in the last 30s","monitoring":{"metrics":{"beat":{"cpu":{"system":{"ticks":52680},"total":{"ticks":160400,"time":{"ms":10},"value":160400},"user":{"ticks":107720,"time":{"ms":10}}},"info":{"ephemeral_id":"d41b232b-867d-4d8d-b111-be8a5590d1a4","uptime":{"ms":488940103}},"memstats":{"gc_next":4194304,"memory_alloc":1852552,"memory_total":31294830272}},"filebeat":{"events":{"added":1,"done":1},"harvester":{"open_files":2,"running":2}},"libbeat":{"config":{"module":{"running":0}},"output":{"events":{"acked":1,"batches":1,"total":1},"read":{"bytes":35},"write":{"bytes":974}},"pipeline":{"clients":4,"events":{"active":0,"published":1,"total":1},"queue":{"acked":1}}},"registrar":{"states":{"current":4,"update":1},"writes":{"success":1,"total":1}},"system":{"load":{"1":0,"15":0,"5":0,"norm":{"1":0,"15":0,"5":0}}}}}}
- But in some other node in the cluster, Filebeat pod is not collecting logs and keep rebooting.I noticed in the logs that there is no harvester reading logs files as show below
{"level":"info","timestamp":"2021-02-05T22:11:08.499Z","logger":"monitoring","caller":"log/log.go:141","message":"Non-zero metrics in the last 30s","monitoring":{"metrics":{"beat":{"cpu":{"system":{"ticks":2310,"time":{"ms":376}},"total":{"ticks":17790,"time":{"ms":2968},"value":17790},"user":{"ticks":15480,"time":{"ms":2592}}},"info":{"ephemeral_id":"a09ef099-1762-4ea4-b61c-efd8aff99f64","uptime":{"ms":180191}},"memstats":{"gc_next":10846512,"memory_alloc":7585384,"memory_total":2297070640,"rss":270336}},"filebeat":{"events":{"added":223,"done":223},"harvester":{"open_files":0,"running":0}},"libbeat":{"config":{"module":{"running":0}},"pipeline":{"clients":1,"events":{"active":1,"filtered":223,"total":223}}},"registrar":{"states":{"current":3889,"update":223},"writes":{"success":223,"total":223}},"system":{"load":{"1":0.22,"15":0.58,"5":0.47,"norm":{"1":0.055,"15":0.145,"5":0.1175}}}}}}
Also I noticed that after the above event in the logs is appearing 19 times
, Filebeat pod reboots automatically.
I just want to add that the configuration of the Filebeat pod is the same for all of them because it is a deamonset, Filebeat pod is created on kubernetes node with the same config.
So my question is that, what could be causing some Filebeat pods to read the log files correctly and some other Filebeat pods not reading the log files and just keep rebooting ?
I look forward to reading from you.
Thanks
Gael