ambari.apache.org
在ambari-server开放的Rest API中分为主要的两大类 API,其中一类为ambari-web提供监控管理服务,另一类用于与ambari-agent交互,接受ambari-agent向ambari-server发送心跳请求。Master模块接受API和Agent Interface的请求,完成ambari-server的集中式管理监控逻辑,而每个agent节点只负责所在节点的状态采集及维护工作。
In the ambari-server open Rest API -- there are two API
one is called ambari-web
other is used for ambari-agent int... get the heart beats request from Ambari-agent send to Ambari-server.
Master model accpet API and Agent Interface request, and finish ambari-server
Each agent node only work for state collect and matining work in their own node.
Ambari-agent内部架构
Ambari-agent是一个无状态的,其功能分两部分: 采集所在节点的信息并且汇总发送心跳发送汇报给ambari-server。 处理ambari-server的执行请求。 因此它有两种队列: (1)、消息队列Message Queue,或称为ResultQueue。包括节点状态信息(包括注册信息)和执行结果信息,并且汇总后通过心跳发送给ambari-server。 (2)、操作队列ActionQueue。用于接收ambari-server发送过来的状态操作,然后交给执行器调用puppet或Python脚本等模块执行任务。
Ambari-agent:
functions:
collect information from nodes together and send total heart beats to ambari-server.
Dealing with quest which comes from ambari0server.
So, there are two queue
- Message queue, maybe called resultQueue,
- ActionQueue, get ambari-server state options and send it to executor python ---- let model execut mission.
Ambari
is Ambari Metrics是Ambari中负责监控集群状态的功能组件。它有如下一些主要的概念:
Terminology Description Ambari Metrics System (“AMS”) The built-in metrics collection system for Ambari. Metrics Collector The standalone server that collects metrics, aggregates metrics, serves metrics from the Hadoop service sinks and the Metrics Monitor. Metrics Hadoop Sinks Plugs into the various Hadoop components sinks to send Hadoop metrics to the Metrics Collector. Metrics Monitor Installed on each host in the cluster to collect system-level metrics and forward to the Metrics Collector.
“instance”指定“who”(角色)使用的指标体系。配置的实例可以是"master", "worker", "executor","driver", "applications" 。这些角色将创建指标系统来监测。所以这些实例等于这些角色。
“source”指定“where”(来源)收集的数据指标。在指标体系中,存在两种来源:
1、Spark内部source,像的MasterSource,WorkerSource等,它们会接收Spark组件的内部状态。这些source都与实例是创建特定的指标体系后,被添加的。
2、常见的source,就像JvmSource,这将低水平状态的收集,是由配置项决定的,并通过反射加载。
“sink”指定“where”(目的地)输出指标数据。多个sinks可以共存并冲洗指标对所有这些汇总。
Metrics配置如下:
[instance].[sink|source].[name].[options] =xxxx
[instance]可以是"master", "worker", "executor","driver", "applications",这意味着只有指定的实例才有这个属性。可用通配符“*”来代替实例名,这意味着所有的实例将具有这种属性。
[sink|source]表示该属性是source或者sink。此字段只能是source or sink。
[name] 指定sink or source的名称,它是自定义的
[options] 这是 source or sink的特定属性。
Source is for "Where"
Two source:
1 inner source like MasterSource, WorkerSource,
2 source like JvmSource --- low level collect
instance.sink|source.name.optaions = xxxxxxxxx '
can be master, worker, executor, driver, application