Code Monkey home page Code Monkey logo

gelffy's Introduction

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

gelffy's People

Contributors

younisshah avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.