I'm trying to aggregate logs from my Kubernetes cluster into Elasticsearch server.
To do that, I've deployed Filebeat on the cluster, but I think it doesn't have a chance to work since in the /var/lib/docker/containers
directories, there are no logs.
I'm able to see container logs via kubectl logs
, but no idea how to make the Filebeat to reach it.
Here is the fragment of the docker inspect
command output:
"LogPath": "",
"Name": "/k8s_POD_checkit-incubator-6bd48754c5-s64bk_checkit-incubator_2cb40353-c7b4-11e8-9574-005056b1f077_1",
"RestartCount": 0,
"Driver": "devicemapper",
"MountLabel": "",
"ProcessLabel": "",
"AppArmorProfile": "",
"ExecIDs": null,
"HostConfig": {
"Binds": null,
"ContainerIDFile": "",
"LogConfig": {
"Type": "journald",
"Config": {}
},
"NetworkMode": "none",
"PortBindings": {},
"RestartPolicy": {
"Name": "",
"MaximumRetryCount": 0
},
Any clues how I can figure out the valid configuration for Filebeat?