Skip to content

Latest commit

 

History

History
122 lines (89 loc) · 5.2 KB

docker.md

File metadata and controls

122 lines (89 loc) · 5.2 KB
description Ingests data through the docker engine daemon and outputs `log` events.

docker source

{% hint style="warning" %} The docker source is in beta. Please see the current enhancements and bugs for known issues. We kindly ask that you add any missing issues as it will help shape the roadmap of this component. {% endhint %}

The docker source ingests data through the docker engine daemon and outputs log events.

Example

{% code-tabs %} {% code-tabs-item title="vector.toml (simple)" %}

[sources.my_source_id]
  type = "docker" # must be: "docker"

{% endcode-tabs-item %} {% code-tabs-item title="vector.toml (advanced)" %}

[sources.my_source_id]
  # REQUIRED
  type = "docker" # must be: "docker"
  
  # OPTIONAL
  include_containers = "ffd2bc2cb74a" # no default
  include_labels = "key=value" # no default

{% endcode-tabs-item %} {% endcode-tabs %}

Options

include_containers

optional no default type: [string] example: "ffd2bc2cb74a"

A list of container ids to match against when filtering running containers. This will attempt to match the container id from the beginning meaning you do not need to include the whole id but just the first few characters. If no containers ids are provided, all containers will be included.

include_labels

optional no default type: [string] example: "key=value"

A list of container object labels to match against when filtering running containers. This should follow the described label's synatx in docker object labels docs.

How It Works

Connecting to the Docker daemon

Vector will automatically attempt to connect to the docker daemon for you. In most situations if your current user is able to run docker ps then Vector will be able to connect. Vector will also respect if DOCKER_HOST and DOCKER_VERIFY_TLS are set. Vector will also use the other default docker environment variables if they are set. See the Docker daemon docs.

Delivery Guarantee

Due to the nature of this component, it offers a best effort delivery guarantee.

Environment Variables

Environment variables are supported through all of Vector's configuration. Simply add ${MY_ENV_VAR} in your Vector configuration file and the variable will be replaced before being evaluated.

You can learn more in the Environment Variables section.

Troubleshooting

The best place to start with troubleshooting is to check the Vector logs. This is typically located at /var/log/vector.log, then proceed to follow the Troubleshooting Guide.

If the Troubleshooting Guide does not resolve your issue, please:

  1. Check for any open docker_source issues.
  2. If encountered a bug, please file a bug report.
  3. If encountered a missing feature, please file a feature request.
  4. If you need help, join our chat/forum community. You can post a question and search previous questions.

Resources