Structure of a Config File


# This is a comment. You should use comments to describe
# parts of your configuration.
input {

filter {

output {


Plugin Configuration


input {
  file {
    path => "/var/log/messages"
    type => "syslog"

  file {
    type => "apache"



Value Types

A plugin can require that the value for a setting be a certain type, such as boolean or hash. The following value types are supported.


An array can be a single string value or multiple values. If you specify the same setting multiple times, it appends to the array.


  path => "/data/mysql/mysql.log"

This example configures path to be an array that contains an element for each of the three strings.




  ssl_enable => true




  my_bytes => "1113"   # 1113 bytes
  my_bytes => "10MiB"  # 10485760 bytes
  my_bytes => "100kib" # 102400 bytes
  my_bytes => "180 mb" # 180000000 bytes






  codec => "json"




match => {
  "field1" => "value1"
  "field2" => "value2"




  port => 33




  my_password => "password"




  my_path => "/tmp/logstash"


A string must be a single character sequence. Note that string values are enclosed in quotes, either double or single. Literal quotes in the string need to be escaped with a backslash if they are of the same kind as the string delimiter, i.e. single quotes within a single-quoted string need to be escaped as well as double quotes within a double-quoted string.


  name => "Hello world"
  name => 'It\'s a beautiful day'



# this is a comment

  # ...