Skip to content
share

Shipping Container Logs

To enable automatic container logs shipping, start by clicking on the Set Up button.

Setup Log Files

This will open the following flyout panel where you can configure container log shipping:

Enable Container Logs

  1. Enable the "Automatically ship logs" toggle
  2. Select the destination Logs App. If the Logs App doesn't exist, you'll be able to create one from the same screen
  3. Click the Save Changes button

Log shipping is configured on a per container image basis. This implies that any freshly created containers that match this image name will automatically have their logs shipped to Sematext Cloud.

Filtering container logs by labels

If you want to restrict the scope of log collection, it is possible to filter the container logs by labels. You can either select a label from the list of already defined labels in this container or write a custom label. Labels can contain a key/value pair, or just a key.

Route Container Logs

Observability should not be an afterthought. You can prepare container-based log filtering and routing rules even if you are not using those labels with your containers yet. For example, if you label different jobs with different labels, you can ensure their logs will go to the appropriate destination from the very beginning without being lost or getting mixed up with other logs.