通过REST API进行Flume度量标准

时间:2015-08-27 05:53:36

标签: rest hadoop flume hortonworks-data-platform ambari

我正在运行hortonworks 2.3并且目前通过ambari挂钩到REST API来启动/停止水槽服务并提交配置。 这一切都很好,我的问题是如何获得指标? 以前我曾经运行带有参数的代理来生成指向http端口的指标,然后使用它来读取它们:

-Dflume.root.logger=INFO,console
-Dflume.monitoring.type=http
-Dflume.monitoring.port=XXXXX

然而,现在Ambari开始了代理我不再控制这个。 任何帮助表示赞赏: - )

2 个答案:

答案 0 :(得分:2)

使用Ambari 2.6.2.0, http:// {ipadress}:8080 / api / v1 / clusters / {your_cluster_name} / components /?ServiceComponentInfo / component_name = FLUME_HANDLER&fields = host_components / metrics / flume / flume 提供按组件划分的水槽指标细分。 通过为此JIRA问题提供的API调用进行快照(并进行裁剪)来找到答案(该问题抱怨获取水槽度量标准的速度很慢)https://issues.apache.org/jira/browse/AMBARI-9914?attachmentOrder=asc 希望这会有所帮助。

答案 1 :(得分:0)

我不知道你是否还需要答案。之所以发生这种情况,是因为Hortonworks默认禁用JSON监控,他们使用自己的度量标准类将指标发送到Ambari指标。虽然您无法直接从Flume检索它,但仍可以从Ambari REST API中检索它:https://github.com/apache/ambari/blob/trunk/ambari-server/docs/api/v1/index.md

祝你好运,