GithubHelp home page GithubHelp logo

isabella232 / go-log2gelf Goto Github PK

View Code? Open in Web Editor NEW

This project forked from deck36/go-log2gelf

0.0 0.0 0.0 104 KB

glue code to 'tail -f' a log file to GELF/UDP

License: BSD 2-Clause "Simplified" License

Go 96.88% Shell 3.12%

go-log2gelf's Introduction

go-log2gelf

A simple daemon that reads a file (tail -f style) and sends every line as GELF 1.1 message via UDP. (Basically a combination of https://github.com/DECK36/go-log2amqp and https://github.com/DECK36/go-amqp2gelf, but without the AMQP transport.)

Uses https://github.com/ActiveState/tail to read files and https://github.com/DECK36/go-gelf to format GELF.

Intended for nginx and apache access logs -- so it does some special character encoding/escaping for that format (because \xXX is not valid JSON).

Usage of ./go-log2gelf:
  -file="/var/log/syslog": filename to watch
  -n=false: Quit after file is read, do not wait for more data, do not read/write state
  -port=12201: Graylog2 GELF/UDP port
  -server="localhost": Graylog2 server
  -v=false: Verbose output

Package example

The ubuntu directory contains an example how to package this tool: build.sh will fetch all sources, compile them, and use fpm to build a Debian package containing the binary, the configuration, and the upstart config.

go-log2gelf's People

Contributors

mschuett 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.