出于某些原因,我需要获得Heron Cluster的吞吐量,但Heron UI中没有指标。那么你对如何监控Heron Cluster的吞吐量有什么想法吗?谢谢。
运行heron-explorer的结果如下:
yitian@heron01:~$ heron-explorer metrics aurora/yitian/devel SentenceWordCountTopology
[2018-08-03 21:02:09 +0000] [INFO]: Using tracker URL: http://127.0.0.1:8888
'spout' metrics:
container id jvm-uptime-secs jvm-process-cpu-load jvm-memory-used-mb emit-count ack-count fail-count
------------------- ----------------- ---------------------- -------------------- ------------ ----------- ------------
container_3_spout_6 2053 0.253257 146 1.13288e+07 1.13278e+07 0
container_4_spout_7 2091 0.150625 137.5 1.1624e+07 1.16228e+07 231
'count' metrics:
container id jvm-uptime-secs jvm-process-cpu-load jvm-memory-used-mb emit-count execute-count ack-count fail-count
-------------------- ----------------- ---------------------- -------------------- ------------ --------------- ----------- ------------
container_6_count_12 2092 0.184742 155.167 0 4.6026e+07 4.6026e+07 0
container_5_count_9 2091 0.387867 146 0 4.60069e+07 4.60069e+07 0
container_6_count_11 2092 0.184488 157.833 0 4.58158e+07 4.58158e+07 0
container_4_count_8 2091 0.443688 129.833 0 4.58722e+07 4.58722e+07 0
container_5_count_10 2091 0.382577 118.5 0 4.60091e+07 4.60091e+07 0
'split' metrics:
container id jvm-uptime-secs jvm-process-cpu-load jvm-memory-used-mb emit-count execute-count ack-count fail-count
------------------- ----------------- ---------------------- -------------------- ------------ --------------- ----------- ------------
container_1_split_2 2091 0.143034 75.3333 4.59453e+07 4.59453e+06 4.59453e+06 0
container_3_split_5 2042 1.12248 79.1667 4.64862e+07 4.64862e+06 4.64862e+06 0
container_2_split_3 2150 0.139837 83.6667 4.59443e+07 4.59443e+06 4.59443e+06 0
container_1_split_1 2091 0.145702 104.167 4.59454e+07 4.59454e+06 4.59454e+06 0
container_2_split_4 2150 0.138453 106.333 4.59443e+07 4.59443e+06 4.59443e+06 0
[2018-08-03 21:02:09 +0000] [INFO]: Elapsed time: 0.031s.发布于 2018-07-31 22:35:42
您可以使用接收器组件的execute-count来测量拓扑的输出。如果您的每个组件具有1:1的输入:输出比率,则这将是您的吞吐量。
但是,如果您将元组分成若干批或拆分元组(如将句子拆分成单独的单词),那么事情就会变得有点复杂。您可以通过查看spout组件的emit-count来获得拓扑中的输入。然后,您可以将其与螺栓execute-counts进行比较,以创建您自己的吞吐量指标。
对这些指标进行编程访问的一种简单方法是通过Heron Tracker REST API。您可以使用您选择的语言的HTTP库(就像对Python的请求一样)来查询最近3小时内运行的拓扑的数据。如果您需要超过3小时的数据(拓扑TMaster存储的最大值),则需要使用其他metrics sinks之一将指标发送到外部数据库。Heron目前提供了用于保存到本地文件、Graphite或Prometheus的接收器。对InfluxDB的支持正在进行中。
https://stackoverflow.com/questions/51614723
复制相似问题