GithubHelp home page GithubHelp logo

applausearchives / heroku-fluentd-datadog Goto Github PK

View Code? Open in Web Editor NEW
1.0 9.0 1.0 14 KB

Heroku application to run fluentd and output to Datadog

License: MIT License

Ruby 59.29% Procfile 40.71%
heroku-fluentd-datadog datadog fluentd heroku heroku-application https-drains

heroku-fluentd-datadog's Introduction

heroku-fluentd-datadog

This is a Heroku application which contains everything to run fluentd on Heroku to accept logs from HTTPS drains using the in_heroku_http plugin to fluentd. The filter_record_transformer plugin is used to inject the source application's hostname, service name, and fluent tag into the record. The out_datadog plugin is used to stream the records to DataDog Logging.

This application uses the request PATH to specify the fluentd tag to use for routing. This matches the behavior of the in_http plugin. The value of the hostname attribute of the record can be set by specifying the desired value as the second (or more) part of the tag, using a . separator, with .herokuapp.com automatically appended to the value. To set the hostname to my-example-app.herokuapp.com and route to DataDog, you would send requests to /datadog.my-example-app of this application.

Setup

Check out this repository and create a Heroku application from it.

# Login to Heroku, then create
$ heroku apps:create YOUR-LOGGING-APP-NAME

# Next, configure your API key
$ heroku config:set DD_API_KEY=YOUR-DATADOG-API-KEY -a YOUR-LOGGING-APP-NAME

# Push your application
$ git push heroku master

Next, you configure Heroku HTTPS log drains to publish logs to this application.

$ heroku drains:add https://YOUR-LOGGING-APP-NAME/datadog.YOUR-SOURCE-APP-NAME -a YOUR-SOURCE-APP-NAME

Logs should now be flowing from your service to DataDog.

Testing

This application supports sending incoming events to STDOUT using a debug tag prefix.

# debug using curl
$ curl "https://YOUR-LOGGING-APP-NAME/debug.YOUR-SOURCE-APP-NAME" -d "60 <13>1 2014-01-29T06:25:52.589365+00:00 host app web.1 - foo"

This should show up in the logging application's logs on Heroku.

heroku-fluentd-datadog's People

Contributors

wolf31o2 avatar dependabot[bot] avatar

Stargazers

Janez Troha avatar

Watchers

Paweł Lasek avatar Piotr Duda avatar  avatar James Cloos avatar Tomasz Rogozik avatar Applause Jenkins avatar Mateusz Sarna avatar Ales Verbic avatar  avatar

Forkers

fossabot

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.