justin 齐齐
生命在于折腾

6.3Logstach收集java日志

es是java服务,收集es需要注意换行问题 
1.编写收集Elasticsearch访问日志

 
    1. [root@linux-node3 conf.d]# cat java.conf
    2. input {
    3. file {
    4. type => "access_es"
    5. path => "/var/log/elasticsearch/xuliangwei.log"
    6. codec => multiline {
    7. pattern => "^\["
    8. negate => true
    9. what => "previous"
    10. }
    11. }
    12. }
    13. output {
    14. redis {
    15. host => "192.168.90.204"
    16. port => "6379"
    17. db => "6"
    18. data_type => "list"
    19. key => "access_es"
    20. }
    21. }
posted on 2017-12-09 16:38  justin01  阅读(433)  评论(0编辑  收藏  举报