Skip to content

Instantly share code, notes, and snippets.

@eriadam
Last active March 16, 2020 21:19
Show Gist options
  • Select an option

  • Save eriadam/34eecf42c19c3c6693b97d500fdcca63 to your computer and use it in GitHub Desktop.

Select an option

Save eriadam/34eecf42c19c3c6693b97d500fdcca63 to your computer and use it in GitHub Desktop.

Revisions

  1. Adam Eri revised this gist Apr 26, 2018. 1 changed file with 25 additions and 26 deletions.
    51 changes: 25 additions & 26 deletions logstash.conf
    Original file line number Diff line number Diff line change
    @@ -1,40 +1,39 @@
    input {
    tcp {
    port => 5000

    # You need to have the json_lines plugin installed
    codec => json_lines
    # It is necessary to configure the SSL properly. Otherwise
    # the logs wont make it to ES.
    ssl_enable => true
    # This might be suefulr for testing if you have self-signed
    # certificates.
    tcp {
    port => 5000

    # You need to have the json_lines plugin installed
    codec => json_lines

    # It is necessary to configure the SSL properly. Otherwise
    # the logs wont make it to ES.
    ssl_enable => true

    # This might be suefulr for testing if you have self-signed
    # certificates.
    # ssl_verify => false

    ssl_cert => "/path/to/crt"
    ssl_key => "/path/to/key"
    }
    }
    }

    filter {

    # You need to have the json filter installed
    json {
    source => "message"
    }
    # You need to have the json filter installed
    json {
    source => "message"
    }
    }

    output {

    # This sends the message to elastic search
    elasticsearch {
    hosts => "elasticsearch:9200"
    }
    # This sends the message to elastic search
    elasticsearch {
    hosts => "elasticsearch:9200"
    }

    # This writes the message to stdout
    stdout {
    codec => rubydebug
    }
    # This writes the message to stdout
    stdout {
    codec => rubydebug
    }
    }
  2. Adam Eri created this gist Apr 26, 2018.
    40 changes: 40 additions & 0 deletions logstash.conf
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,40 @@
    input {
    tcp {
    port => 5000

    # You need to have the json_lines plugin installed
    codec => json_lines

    # It is necessary to configure the SSL properly. Otherwise
    # the logs wont make it to ES.
    ssl_enable => true

    # This might be suefulr for testing if you have self-signed
    # certificates.
    # ssl_verify => false

    ssl_cert => "/path/to/crt"
    ssl_key => "/path/to/key"
    }
    }

    filter {

    # You need to have the json filter installed
    json {
    source => "message"
    }
    }

    output {

    # This sends the message to elastic search
    elasticsearch {
    hosts => "elasticsearch:9200"
    }

    # This writes the message to stdout
    stdout {
    codec => rubydebug
    }
    }