Public | Automated Build

Last pushed: 2 years ago
Short Description
Fixed version rancher/logstash-config:v0.2.0, fix patterns
Full Description

Confd Logstash Configuration Generator


This creates a minimalistic Docker container that provides /etc/logstash/logstash.conf file via a Volume.


If you would like to build your own container from scratch


The keyspace is set to:


In order to add a rule the format is:

/logstash/config/<section>/<rulename>/<idx> = '{"json": "value"}'


Section: is either inputs, filters or outputs. These line up to sections of a logstasy.conf file.

Rulename: is the name of a logstash input, filter or output. Ie. udp, redis, grok, elasticsearch, etc.

idx: is a unique number to the section/rule. This allows multiple entries of the same type. Ie. udp with port 5000 and 5001 would have the same keyspace and unique idx.

  #example(with environment variable backend): 
  LOGSTASH_CONFIG_INPUTS_UDP_0={"port": "5000"}

  # will translate to:
  output {
   udp {
       port => 5000

Currently, this supports top level if conditional(meaning else if/else and nested are not supported right now). The keyspace for a conditional looks like:

  /logstash/config/<section>/conditionals/<idx>/condition = <the whole condition>
  /logstash/config/<section>/conditionals/<idx>/<rule>/<idx> = {"json": "value"}

sections can have multiple conditionals. They have an index that is unique to the section. The must have a single key 'condition' that contains the entire condition string.

Each condition can have multiple rules. They follow the same rules as above, just nested under the conditionals/<idx> keyspace.

An example of a conditional with rule looks like:

 # using environment backend for key
 LOGSTASH_CONFIG_INPUTS_CONDITIONALS_0_REDIS_0='{"host": "localhost", "port": "6379", "data_type": "list", "key": "logstash"}'

 # Will translate to:
 output {
     if [] == "logspout" {
         redis {
             host => localhost
             port => 6379
             data_type => list
             keyh => logstash
Docker Pull Command