Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Does Ambari Database Stores Data about YARN memory consumption?

Does Ambari Database Stores Data about YARN memory consumption?

New Contributor

Hello, I am trying to create a custom alert for YARN memory consumption. I got to know that there is no direct REST API which can give me amount of YARN memory consumed at particular moment. So, I thought maybe Ambari DB will be storing this data somewhere.

Can anyone help me to calculate the available YARN memory at a particular moment using Ambari DB? Or is there any other way I could do that?

1 REPLY 1

Re: Does Ambari Database Stores Data about YARN memory consumption?

Super Mentor

@Nidhee Jaiswal

Teh Ambari Server does not store the YARN (or other components) metrics data. But Ambari Metrics Collector Does that.

We can use the following kind of APIs t find out the Heap & Non Heap Memory Consumed by the Yarn Resource Manager:

Example:

For Heap Max

http://kamb25103.example.com:6188/ws/v1/timeline/metrics?metricNames=jvm.JvmMetrics.MemHeapMaxM._max...


For Heap Used

http://kamb25103.example.com:6188/ws/v1/timeline/metrics?metricNames=jvm.JvmMetrics.MemHeapUsedM._ma...


For Heap Committed

http://kamb25103.example.com:6188/ws/v1/timeline/metrics?metricNames=jvm.JvmMetrics.MemHeapCommitted...


For Non Heap Used

http://kamb25103.example.com:6188/ws/v1/timeline/metrics?metricNames=jvm.JvmMetrics.MemNonHeapUsedM....


For Non Heap Committed

http://kamb25103.example.com:6188/ws/v1/timeline/metrics?metricNames=jvm.JvmMetrics.MemNonHeapCommit...

.



Here the "kamb25103.example.com:6188" need to be replaced with the "timeline.metrics.service.webapp.address"

.

You can also use the Grafana (which actually pulls data fromAmbari Metrics) to see the memory use graph based on different time time interval:

https://docs.hortonworks.com/HDPDocuments/Ambari-2.5.2.0/bk_ambari-operations/content/grafana_yarn_q...

https://docs.hortonworks.com/HDPDocuments/Ambari-2.5.2.0/bk_ambari-operations/content/grafana_yarn_d...

.