Logstash配置过滤Spring Cloud心跳日志

Eureka Client 发送心跳: com.netflix.discovery.shared.resolver.aws.ConfigClusterResolver.getClusterEndpoints
Eureka 接收心跳: com.netflix.eureka.registry.AbstractInstanceRegistry.run

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
output {
if "_grokparsefailure" in [tags] {
file { path => "/usr/local/logstash/logs/grok_failures.txt" }
} else {
if (([classpath] == "com.netflix.eureka.registry.AbstractInstanceRegistry" and [methodname] == "run") or
([classpath] == "com.netflix.discovery.shared.resolver.aws.ConfigClusterResolver" and [methodname] == "getClusterEndpoints")) {
#stdout {
#codec => rubydebug
#}
} else {
elasticsearch {
hosts => ["192.168.10.10:9200"]
index => "%{type}"
}
}
}
}

Powered by AppBlog.CN     浙ICP备14037229号

Copyright © 2012 - 2020 APP开发技术博客 All Rights Reserved.

访客数 : | 访问量 :