{"id":1382,"date":"2023-03-19T10:57:19","date_gmt":"2023-03-19T02:57:19","guid":{"rendered":"https:\/\/www.appblog.cn\/?p=1382"},"modified":"2023-04-28T21:12:16","modified_gmt":"2023-04-28T13:12:16","slug":"logstash-configuration-filtering-spring-cloud-heartbeat-logs","status":"publish","type":"post","link":"https:\/\/www.appblog.cn\/index.php\/2023\/03\/19\/logstash-configuration-filtering-spring-cloud-heartbeat-logs\/","title":{"rendered":"Logstash\u914d\u7f6e\u8fc7\u6ee4Spring Cloud\u5fc3\u8df3\u65e5\u5fd7"},"content":{"rendered":"<p>Eureka Client \u53d1\u9001\u5fc3\u8df3: <code>com.netflix.discovery.shared.resolver.aws.ConfigClusterResolver.getClusterEndpoints<\/code><br \/>\nEureka \u63a5\u6536\u5fc3\u8df3: <code>com.netflix.eureka.registry.AbstractInstanceRegistry.run<\/code><\/p>\n<p><!-- more --><\/p>\n<pre><code>output {\n    if &quot;_grokparsefailure&quot; in [tags] {\n        file { path =&gt; &quot;\/usr\/local\/logstash\/logs\/grok_failures.txt&quot; }\n    } else {\n        if (([classpath] == &quot;com.netflix.eureka.registry.AbstractInstanceRegistry&quot; and [methodname] == &quot;run&quot;) or\n            ([classpath] == &quot;com.netflix.discovery.shared.resolver.aws.ConfigClusterResolver&quot; and [methodname] == &quot;getClusterEndpoints&quot;)) {\n            #stdout {\n               #codec =&gt; rubydebug\n            #}\n        } else {\n            elasticsearch {\n                hosts =&gt; [&quot;192.168.10.10:9200&quot;]\n                index =&gt; &quot;%{type}&quot;\n            }\n        }\n    }\n}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Eureka Client \u53d1\u9001\u5fc3\u8df3: com.netflix.discovery.shared.resolv [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[345],"tags":[343],"class_list":["post-1382","post","type-post","status-publish","format-standard","hentry","category-elk","tag-logstash"],"_links":{"self":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/1382","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/comments?post=1382"}],"version-history":[{"count":0,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/1382\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/media?parent=1382"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/categories?post=1382"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/tags?post=1382"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}