Skip to content

A UDP-based GELF log aggregator with Loggly hooks

Notifications You must be signed in to change notification settings

younisshah/gelffy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gelffy

gelffy is a UDP-based GELF (Greylog Extended Log Format) aggregator with an HTTP POST hook to the LaaS - (Loggly).

gelffy is supposed to be used in the context of Docker. A Docker container (including a service in Docker Swarm mode) can configured to do logging using various drivers. Whenever anything is written to the stdout or stderr of a Docker container, the Docker Engine captures the log entries and processes them using the configured driver.

gelffy uses gelf Docker log driver.

gelffy runs on port 12123.

When a Docker container or a Docker Swarm service is configured to use gelf as its logging driver with gelffy as the endpoint for the GELF log entries, the Docker Engine sends the log entries to the gelffy's UDP endpoint. gelffy processes the log entries and does an HTTP POST to Loggly.

Pre-requisites

A Loggly customer token

Installation and Usage

  1. Clone the repository
    git clone https://github.com/younisshah/gelffy.git
  1. Change your working directory to gelffy

  2. Edit the Dockerfile and update the value of LOGGLY_CUSTOMER_TOKEN Env variable to your Loggly Customer Token.

  3. Run

dep ensure
  1. Next, run
make build-bin
  1. Then, do a
make build
  1. Finally,
make run
  1. Get the container IP address of gelffy
docker inspect --format '{{ .NetworkSettings.IPAddress }}' gelffy
  1. Run your Docker container (or Docker Swarm service) which gelf log driver and gelffy configured
docker run -p IN_PORT:OUT_PORT --rm --log-driver=gelf --log-opt gelf-address=udp://GELFFY_CONTAINER_IP_ADDRESS:12123 --log-opt gelf-compression-type=none IMAGE_NAME:TAG

That's it!

Now all the logs of your Docker container (or Docker Swarm service) will be pushed to gelffy which POSTs to Loggly.

TODOs

  • Support additional drivers

License

MIT

About

A UDP-based GELF log aggregator with Loggly hooks

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published