I harvest logs from gitlab runners created in kubernetes namespace. I implement the opciton to store elastic index in pod annotation. So all my gitlab runners has elastic.index: runner-jobs
annotation.
This is my autodsicover configuration:
filebeat.autodiscover:
providers:
- type: kubernetes
node: ${NODE_NAME}
hints.enabled: true
hints.default_config:
type: container
paths:
- /var/log/containers/*${data.kubernetes.container.id}.log
The logs has been harvested properly for a long time, but since I implement annotation, it stopped working. I find out in my logs error about check config failed.
2020-10-29T10:19:32.486Z ERROR [autodiscover] autodiscover/autodiscover.go:210 Auto discover config check failed for config '{ │
"docker-json": { │
"cri_flags": true, │
"format": "auto", │
"partial": true, │
"stream": "all" │
}, │
"paths": [ │
"/var/log/containers/*9a15c9051d6dfa378c6438b67067cb92b8c29233c8b50ea23b176204fc7ed76d.log" │
], │
"symlinks": true, │
"type": "container" │
}', won't start runner: Can only start an input when all related states are finished: {Id:9877265-65025 Finished:false Fileinfo:0xc0004a7e10 Source:/var/log/containers/runner-yecxnkr-project-340-concurrent-12f6pw_gitlab-runners_helper-9a15c9051
I find this issue on github, but still not sure how to solve this and basically, where is the problem. Could anybody give an explanation whats going on, and how to fix this issue?
I am using filebeat version 7.8.1
deployed from this helm chart.