ELK安装

作者: 长孙俊明 | 来源:发表于2019-10-28 23:02 被阅读0次

Elasticsearch安装请参考
安装Kibana

安装logstash-6.4.3.tar.gz
解压,然后配置下即可。

input {
    # 从文件读取日志信息 输送到控制台
    file {
        path => "/root/tomcat_log/2019-06-28.log"
        codec => "json" ## 以JSON格式读取日志
        type => "elasticsearch"
        start_position => "beginning"
    }
}

# filter {
#
# }

output {
    # 标准输出 
    # stdout {}
    # 输出进行格式化,采用Ruby库来解析日志   
     stdout { codec => rubydebug }
         elasticsearch {
        hosts => [  "112.74.77.162:9200"]
        index => "es-%{+YYYY.MM.dd}"
    }    
}

相关文章

网友评论

      本文标题:ELK安装

      本文链接:https://www.haomeiwen.com/subject/zxbivctx.html