Logs

Container log files are located in the /var/log/pods/ or /var/log/containers directory (that is a link to /var/log/pods/).

Filebeat

Filebeat is configured to work with Docker by default. Selectel uses containerd as the container runtime (CRI) instead of Docker.

To configure the mechanism for obtaining log metadata via Filebeat, use the configuration file:

    filebeat.inputs:
    - type: container
      fields_under_root: true
      paths:
      - "/var/log/containers/*.log"
      processors:
        - add_kubernetes_metadata:
            host: ${NODE_NAME}
            in_cluster: true
            default_matchers.enabled: false
            matchers:
            - logs_path:
                logs_path: "/var/log/containers/"