Forward all your stats to Librato Metrics, like a breeze.
The simplest way to forward all your container's log to Librato Metrics is to run this repository as a container, with:
docker run \
-v /var/run/docker.sock:/var/run/docker.sock \
-e LIBRATO_EMAIL="" \
-e LIBRATO_TOKEN="" \
meteorhacks/docker-librato
You can also use two different tokens for logging and stats:
docker run \
-v /var/run/docker.sock:/var/run/docker.sock \
-e LIBRATO_EMAIL="" \
-e LIBRATO_TOKEN="" \
meteorhacks/docker-librato
Some environments(such as Google Compute Engine) does not allow to access the docker socket without special privileges. You will get EACCES(Error: read EACCES
) error if you try to run the container. To run the container in such environments add --privileged to the docker run
command.
Example:
docker run --privileged \
-v /var/run/docker.sock:/var/run/docker.sock \
-e LIBRATO_EMAIL="" \
-e LIBRATO_TOKEN="" \
meteorhacks/docker-librato
First clone this repository, then:
docker build -t librato .
docker run \
-v /var/run/docker.sock:/var/run/docker.sock \
librato
This module wraps four Docker APIs:
POST /containers/{id}/attach
, to fetch the logsGET /containers/{id}/stats
, to fetch the stats of the containerGET /containers/json
, to detect the containers that are running when this module startsGET /events
, to detect new containers that will start after the module has started
This module wraps docker-loghose and docker-stats to fetch the logs and the stats as a never ending stream of data.
All the originating requests are wrapped in a never-ending-stream.
This app is based on nearform/docker-logentries.
MIT