Logstash配置过滤Spring Cloud心跳日志

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

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}"
            }
        }
    }
}

版权声明:
作者:Joe.Ye
链接:https://www.appblog.cn/index.php/2023/03/19/logstash-configuration-filtering-spring-cloud-heartbeat-logs/
来源:APP全栈技术分享
文章版权归作者所有,未经允许请勿转载。

THE END
分享
二维码
打赏
海报
Logstash配置过滤Spring Cloud心跳日志
Eureka Client 发送心跳: com.netflix.discovery.shared.resolver.aws.ConfigClusterResolver.getClusterEndpoints Eureka 接收心跳: com.netflix.eureka.regi……
<<上一篇
下一篇>>
文章目录
关闭
目 录