Name: docker-librato
Owner: meteorhacks
Description: Forward all stats from all running docker containers to Librato
Created: 2015-03-26 10:24:55.0
Updated: 2017-05-17 18:41:08.0
Pushed: 2015-03-26 11:22:36.0
Size: 324
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
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:
er run \
/var/run/docker.sock:/var/run/docker.sock \
LIBRATO_EMAIL="" \
LIBRATO_TOKEN="" \
teorhacks/docker-librato
You can also use two different tokens for logging and stats:
er run \
/var/run/docker.sock:/var/run/docker.sock \
LIBRATO_EMAIL="" \
LIBRATO_TOKEN="" \
teorhacks/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:
er run --privileged \
/var/run/docker.sock:/var/run/docker.sock \
LIBRATO_EMAIL="" \
LIBRATO_TOKEN="" \
teorhacks/docker-librato
First clone this repository, then:
er build -t librato .
er run \
/var/run/docker.sock:/var/run/docker.sock \
brato
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 startedThis 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