{"id":131916,"date":"2020-07-06T10:03:26","date_gmt":"2020-07-06T02:03:26","guid":{"rendered":"http:\/\/4563.org\/?p=131916"},"modified":"2020-07-06T10:03:26","modified_gmt":"2020-07-06T02:03:26","slug":"flume-%e5%ad%a6%e4%b9%a0%e4%b9%8b%e8%b7%af%ef%bc%88%e5%85%ad%ef%bc%89flume-%e7%9a%84%e7%9b%91%e6%8e%a7","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=131916","title":{"rendered":"Flume \u5b66\u4e60\u4e4b\u8def\uff08\u516d\uff09Flume \u7684\u76d1\u63a7"},"content":{"rendered":"<p>\u4f7f\u7528 Flume \u5b9e\u65f6\u6536\u96c6\u65e5\u5fd7\u7684\u8fc7\u7a0b\u4e2d\uff0c\u5c3d\u7ba1\u6709\u4e8b\u52a1\u673a\u5236\u4fdd\u8bc1\u6570\u636e\u4e0d\u4e22\u5931\uff0c\u4f46\u4ecd\u7136\u9700\u8981\u65f6\u523b\u5173\u6ce8 Source\u3001Channel\u3001Sink \u4e4b\u95f4\u7684\u6d88\u606f\u4f20\u8f93\u662f\u5426\u6b63\u5e38\u3002<br \/>\u6bd4\u5982\uff0cSouceChannel \u4f20\u8f93\u4e86\u591a\u5c11\u6d88\u606f\uff0cChannelSink \u53c8\u4f20\u8f93\u4e86\u591a\u5c11\uff0c\u4e24\u5904\u7684\u6d88\u606f\u91cf\u662f\u5426\u504f\u5dee\u8fc7\u5927\u7b49\u7b49\u3002<\/p>\n<p>Flume \u4e3a\u6211\u4eec\u63d0\u4f9b\u4e86 Monitor \u7684\u673a\u5236\uff1a<a href=\"http:\/\/flume.apache.org\/FlumeUserGuide.html#monitoring\">http:\/\/flume.apache.org\/FlumeUserGuide.html#monitoring<\/a> \u901a\u8fc7Reporting \u7684\u65b9\u5f0f\uff0c\u628a\u8fc7\u7a0b\u4e2d\u7684Counter\u90fd\u6253\u5370\u51fa\u6765\u3002<\/p>\n<h3><a href=\"https:\/\/www.studytime.xin\/article\/#\u7c7b\u578b\" title=\"\u7c7b\u578b\"><\/a>\u7c7b\u578b<\/h3>\n<ul>\n<li>JMX Reporting<\/li>\n<li>Ganglia Reporting<\/li>\n<li>JSON Reporting<\/li>\n<li>Custom Reporting<\/li>\n<\/ul>\n<h3><a href=\"https:\/\/www.studytime.xin\/article\/#Ganglia-Reporting\" title=\"Ganglia Reporting\"><\/a>Ganglia Reporting<\/h3>\n<p>Flume \u53ef\u4ee5\u62a5\u544a\u5b83\u7684 metrics \u5230 ganglia3\uff0c\u53ea\u8981\u4f60\u5728\u542f\u52a8 Flume agent \u7684\u65f6\u5019\u8bbe\u7f6e\u4e00\u4e9b\u53c2\u6570\u5373\u53ef\uff0c\u4e5f\u53ef\u4ee5\u628a\u8fd9\u4e9b\u53c2\u6570\u8bbe\u7f6e\u5728 flume-env.sh \u914d\u7f6e\u6587\u4ef6\u4e2d\u3002\u9700\u8981\u8bbe\u7f6e\u7684\u53c2\u6570\u5982\u4e0b\uff0c\u8fd9\u4e9b\u53c2\u6570\u7684\u524d\u7f00\u5982\u4e0bFlume.monitoring\uff1a<\/p>\n<p>-Dflume.monitoring.type\uff1a\u7c7b\u578b\u5fc5\u987b\u662fganglia<br \/>-Dflume.monitoring.pollFrequency\uff1a \u9ed8\u8ba4\u503c\u662f60\u79d2\uff0cflume\u5411ganglia\u62a5\u544ametrics\u7684\u65f6\u95f4\u95f4\u9694<br \/>-Dflume.monitoring.isGanglia3\uff1a \u9ed8\u8ba4\u662ffalse\uff0cganglia server\u7684\u7248\u672c\u57283\u4ee5\u4e0a\uff0cflume \u53d1\u9001\u7684\u662fganglia3.1\u7684\u6570\u636e\u683c\u5f0f<\/p>\n<p>\u542f\u52a8flume Agent:<\/p>\n<figure>\n<table>\n<tr>\n<td>\n<pre><span>1<\/span><br><\/pre>\n<\/td>\n<td>\n<pre><span>$ bin&#x2F;flume-ng agent --conf-file example.conf --name a1 -Dflume.monitoring.type&#x3D;ganglia -Dflume.monitoring.hosts&#x3D;com.example:1234,com.example2:5455<\/span><br><\/pre>\n<\/td>\n<\/tr>\n<\/table>\n<\/figure>\n<h3><a href=\"https:\/\/www.studytime.xin\/article\/#JSON-Reporting\" title=\"JSON Reporting\"><\/a>JSON Reporting<\/h3>\n<p>Flume \u4e5f\u53ef\u4ee5\u62a5\u544a JSON \u683c\u5f0f\u7684 report\uff0c\u4e3a\u4e86\u5f00\u542f JSON report\uff0c\u5728 Flume \u673a\u5668\u4e0a\u542f\u52a8\u4e86\u4e00\u4e2a web server\u3002\u9700\u8981\u5728\u5ba2\u6237\u7aef\u542f\u52a8\u65f6\u8bbe\u7f6e\u4ee5\u4e0b\u53c2\u6570\uff1a<br \/>type    \u8be5\u7ec4\u4ef6\u7684\u540d\u79f0\uff0c\u8fd9\u91cc\u8bbe\u7f6e\u4e3ahttp<br \/>port    \u8be5\u670d\u52a1\u76d1\u542c\u7684\u7aef\u53e3\uff0c\u9ed8\u8ba4\u662f41414<\/p>\n<p>\u542f\u52a8flume Agent:<br \/><code>flume-ng agent --conf-file example.conf --name a1 -Dflume.monitoring.type=http -Dflume.monitoring.port=34545<\/code><br \/>\u7136\u540e\u901a\u8fc7http:\/\/<hostname>:<port>\/metrics\u6765\u67e5\u770b\u503c<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4f7f\u7528 Flume \u5b9e\u65f6\u6536\u96c6\u65e5\u5fd7\u7684\u8fc7&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/131916"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=131916"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/131916\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=131916"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=131916"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=131916"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}