GithubHelp home page GithubHelp logo

isabella232 / dockerfile-logstash-with-consul-template Goto Github PK

View Code? Open in Web Editor NEW

This project forked from stakater/dockerfile-logstash-with-consul-template

0.0 0.0 0.0 15 KB

Dockerfile of Logstash with consul template

Shell 100.00%

dockerfile-logstash-with-consul-template's Introduction

Logstash with Consul Template

============================

A Consul Template powered Logstash docker container.

Supported Tags:

docker run stakater/logstash-with-consul-template:latest

To specify templates: docker run -d -v $(PWD)/templates:/templates stakater/logstash-with-consul-template:latest

This image is intended to be run together with Consul and Consul-Template

The daemon consul-template queries a Consul instance and updates any number of specified templates on the file system. As an added bonus, consul-template can optionally run arbitrary commands when the update process completes.

consul-template -consul-addr=$CONSUL_URL -template="/templates/logstash.ctmpl:/etc/logstash/conf.d/logstash.conf"

Sample Template

We have provided a sample template (in the templates directory).

To be able to use that template, you must make sure the following preconditions are met:

Preconditions

Consul Key-Value entries:

  • Port for receiving "beats" should be defined by the key /logstash/beatsPort
  • Grok pattern for logs of type syslog should be defined in the key /logstash/syslogPattern.
  • Default Grok pattern for applications without specific grok pattern should be defined by the key /logstash/defaultPattern.
  • Grok pattern (if any) for a specific application should be defined by the key /logstash/apps/<app_name>/grokPattern.
  • Multiline pattern (if any) for a specific application should be defined by the key /logstash/apps/<app_name>/multilinePattern.

Grok Pattern:

  • Time in the logs should be parsed and assigned to the key timestamp.
  • If using specific grok/multiline patterns for applications, logs must contain application name. The application name should be parsed and assigned to the key app_name.

dockerfile-logstash-with-consul-template's People

Contributors

hazim1093 avatar rasheedamir 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.