This project implements a Docker logging driver that will allow Docker to stream logs to local JSON files and Microsoft Application Insights.
This log plugin supports the docker logs
command.
docker plugin install --alias appinsights michaelgolfi/appinsights
docker run -d --name "example-logger" \
--log-driver appinsights \
--log-opt token=$AppInsightsToken \
ubuntu bash -c 'while true; do echo "{\"msg\": \"something\", \"time\": \"`date +%s`\"}"; sleep 2; done;'
Option | Default |
---|---|
endpoint | "https://dc.services.visualstudio.com/v2/track" |
token | |
verify-connection | "true" |
insecure-skip-verify | "false" |
gzip | "false" |
gzip-level | "0" |
batch-size | "1024" |
batch-interval | "5s" |
This plugin uses godep for vendoring.
- Run
make install
to install all dependencies. - Run
./scripts/build.sh
to build the plugin.
Documentation: https://docs.docker.com/engine/admin/logging/json-file/#options