Hey there, I have a question. I am trying to conf...
# logging
i
Hey there, I have a question. I am trying to configure Filebeat to consume logs and populate them with the
add_kubernetes_metadata
option. However, for some reason filebeat isn't adding the kubernetes metadata to the logs? It can consume the logs just fine, but it isn't able to add the metadata. I've added a service account with the correct permissions to the pods and it detects that it can connect to a kubernetes cluster. But no metadata is getting added... Thoughts? I am thinking that the filenames are wrong and that the
add_kubernetes_metadata
cannot detect the container ID from the file name. For example, in
/var/log/containers
I have a file
topolvm-node-skc65_topolvm-system_topolvm-node-d9cb73bf83f814efcae8ab06194666521450fc69ce94e35f39e890563cbda7fb.log
. The docs for filebeat though state "To change the default value: container ID must follow right after the
logs_path
-
<log_path>/<container_id>
, where
container_id
is a 64-character-long hexadecimal string." which does not seem to be the format that containerd has the logs in?
Can't delete my message. Not sure what fixed it, but it started working after I tried to add debug logging to filebeat to investigate. Weird stuff. Maybe the pods just needed another restart? Idk