Kubernetes Container Logs

Read container logs from Kubernetes nodes

Supported Platforms

OpenShift 4

Configuration Table

cluster_name*stringThe cluster name which will be added as the k8s.cluster.name resource attribute.
log_sourceenumFileWhere to read logs from. Generally this is file. file source supports Docker json-file and Containerd cri-o log formats. Options include file and journald.
file_pathstrings/var/log/containers/*.logWhen log_source is file. File or directory paths to tail for logs. Defaults to all container logs.
journald_path*stringThe directory containing Journald's log files.When log_source is journald. The directory containing Journald's log files.
exclude_file_pathstrings/var/log/containers/observiq--collector-File or directory paths to exclude. Generally, the collector's own log should be excluded.
start_atenumendStart reading logs from 'beginning' or 'end'.

*required field

Example Configuration

The Kubernetes Container logs source has one required parameter:

  • Cluster Name: The name of the cluster, which will be inserted as the k8s.cluster.name resource attribute

Once running on an agent, metrics will look like this: