ELK日志系统

29 Feb 2016, by

linux按照ELK(elasticsearch, logstash, kibana)

连接rails日志的logstash配置文件例子

input {
  file {
    type => "rails logs"
    path => "../log/development.log"
    codec =>   json {
      charset => "UTF-8"
    }
  }

}

output {
  # Print each event to stdout.
  stdout {
    codec => rubydebug
  }
  elasticsearch {
    # Setting 'embedded' will run  a real elasticsearch server inside logstash.
    # This option below saves you from having to run a separate process just
    # for ElasticSearch, so you can get started quicker!
#    embedded => true
  }
}