vector icon indicating copy to clipboard operation
vector copied to clipboard

Docker API and Vector on Mac OS X

Open safaci2000 opened this issue 4 years ago • 1 comments

Vector Version

timberio/vector:0.10.0-alpine

Vector Configuration File


[sources.docker]
  type = "docker" # required
#  auto_partial_merge = true # optional, default
  include_images = ["hello-world", "alpine"] # optional, no default

## Transforms
[transforms.tag_log]
  # General
  type = "add_fields" # required
  inputs = ["docker"] # required
  overwrite = true # optional, default

  # Fields
  fields.source_id = "${NETBEAM_SOURCE_ID}"
  fields.envrionment = "${ENVIRONMENT}"

## Output
[sinks.console]
  type = "console" # required
  inputs = ["tag_log"] # required
  target = "stdout" # optional, default
  encoding.codec = "json" # required
  encoding.timestamp_format = "rfc3339" # optional, default

Debug Output

https://gist.github.com/safaci2000/516a3462c3d4da5f579d2cd205eaa47b

Expected Behavior

When running vector inside of a docker, on linux, the logs are processed correctly. On Mac, OS X it fails to work as advertised.

I created a demo repo here which you can use as an example. When running on OS X the logs of vector are empty. When running on Linux it works as expected.

I am running Docker Desktop for mac, version 2.3.6.1

Additional Damon configurations:

{
  "experimental": true,
  "debug": true,
  "ipv6": true,
  "fixed-cidr-v6": "fd00::/80",
  "log-driver": "json-file",
  "log-opts": {
    "max-size": "10m",
    "max-file": "3"
  }
}

Actual Behavior

No logs are printed from vector

Example Data

Please see demo github repo.

Additional Context

If useful, I am running MacOS Catalina version 10.15.6.

References

NA

safaci2000 avatar Oct 15 '20 17:10 safaci2000

Side note, I just tested this on another OS X laptop with the same behavior, so at least it's consistent.

safaci2000 avatar Oct 16 '20 05:10 safaci2000

Closing this since I wasn't able to reproduce it with Vector v0.26.0. Running Docker Desktop 4.15.0 (93002). Please leave a comment if you have any issues with this!

jszwedko avatar Dec 23 '22 20:12 jszwedko