V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
zjf061315
V2EX  ›  Logstash

logstash+elasticsearch+kibana 问题

  •  
  •   zjf061315 · Aug 21, 2015 · 6282 views
    This topic created in 3915 days ago, the information mentioned may be changed or developed.

    在用着三个工具搭一个日志处理的平台,目前有两个不同的系统日志需要处理。
    开始考虑在一台机器上启动两个 logstash 实例,收集日志后发到 elasticsearch 上,不知道为什么第二个总是连接不上,传不出数据,进而考虑用一个 logstash 实例,然后在配置文件里给文件加 type ,在 output 中根据 type 判断处理,但是还是有一个条件里的不成功啊。。。求助大家,目前输出的配置文件如下
    output {

    if [type] == "targeted_coupon" {
        elasticsearch {
            host     => ["127.0.0.1:9300"]
            cluster  => "cluster_spark"
            protocol => "node"
            index    => "coupon_%{+YYYYMMdd}"
            max_retries => 10
        }
        #stdout { codec => rubydebug }
    
    } else {
        elasticsearch {
            host    => ["127.0.0.1:9300"]
            cluster => "cluster_spark"
            protocol => "node"
            index   => "gift_%{+YYYYMMdd}"
            document_type  => "%{type}"
            max_retries => 10
        }
        #stdout { codec => rubydebug }
    }
    
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   859 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 20:32 · PVG 04:32 · LAX 13:32 · JFK 16:32
    ♥ Do have faith in what you're doing.