Support add_docker_metadata in Windows #7797
Labels
enhancement
Filebeat
Filebeat
good first issue
Indicates a good issue for first-time contributors
:Processors
I'm trying to collect docker logs using filebeat in Windows, but I've found that it can't be done due to current limitation.
In the current master branch,
source
field is used to get docker container id of the log.Since
source
field of docker logs in Windows looks like"C:\\ProgramData\\docker\\containers\\{{ docker container id }}\\{{ docker container id }}-json.log"
, the path can't be parsed because the separator is/
(beats/libbeat/processors/add_docker_metadata/add_docker_metadata.go
Line 88 in fb0d7d4
I think it would be better to use
func SplitList(path string) []string
inpath/filepath
package rather than usingextract_field
processor to get the container id. Or, at least, the directory separator should be configurable.The text was updated successfully, but these errors were encountered: