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.

REST API path to get cluster memory used for a particular queue for a time period

Solved Go to solution
Highlighted

REST API path to get cluster memory used for a particular queue for a time period

Expert Contributor

Hi, i am trying to get the ambari metrics rest api path to get the memory usage for a particular queue Q1 for the last 1 week. how can i get that?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: REST API path to get cluster memory used for a particular queue for a time period

Super Mentor

@PJ

Last 7 Days of Memory For Yarn Queues :

1. Allocated Memory of "default" queue:

http://$AMS_COLLECTOR_HOSTNAME:6188/ws/v1/timeline/metrics?metricNames=yarn.QueueMetrics.Queue=root....


2. Reserved Memory of "default" queue:

http://$AMS_COLLECTOR_HOSTNAME:6188/ws/v1/timeline/metrics?metricNames=yarn.QueueMetrics.Queue=root....


3. Pending Memory of "default" queue:

http://$AMS_COLLECTOR_HOSTNAME:6188/ws/v1/timeline/metrics?metricNames=yarn.QueueMetrics.Queue=root....


4. Available Memory of "default" queue

http://$AMS_COLLECTOR_HOSTNAME:6188/ws/v1/timeline/metrics?metricNames=yarn.QueueMetrics.Queue=root....



Please replace the following in the above queries:

1. "AMS_COLLECTOR_HOSTNAME:6188" with your Ambari Metrics Collector Hostname and port (default port is 6188)

2. Name of the queue "default" with the name of your own queue which you want to monitor.

3. Change the StartTime and endTime in the query to cover last 7 days.
You can use some online tool to generate the EPOC time like https://www.epochconverter.com/

Make sure that the generated epooc time is in milliseconds like 10 digits.

.

View solution in original post

3 REPLIES 3
Highlighted

Re: REST API path to get cluster memory used for a particular queue for a time period

Super Mentor

@PJ

Last 7 Days of Memory For Yarn Queues :

1. Allocated Memory of "default" queue:

http://$AMS_COLLECTOR_HOSTNAME:6188/ws/v1/timeline/metrics?metricNames=yarn.QueueMetrics.Queue=root....


2. Reserved Memory of "default" queue:

http://$AMS_COLLECTOR_HOSTNAME:6188/ws/v1/timeline/metrics?metricNames=yarn.QueueMetrics.Queue=root....


3. Pending Memory of "default" queue:

http://$AMS_COLLECTOR_HOSTNAME:6188/ws/v1/timeline/metrics?metricNames=yarn.QueueMetrics.Queue=root....


4. Available Memory of "default" queue

http://$AMS_COLLECTOR_HOSTNAME:6188/ws/v1/timeline/metrics?metricNames=yarn.QueueMetrics.Queue=root....



Please replace the following in the above queries:

1. "AMS_COLLECTOR_HOSTNAME:6188" with your Ambari Metrics Collector Hostname and port (default port is 6188)

2. Name of the queue "default" with the name of your own queue which you want to monitor.

3. Change the StartTime and endTime in the query to cover last 7 days.
You can use some online tool to generate the EPOC time like https://www.epochconverter.com/

Make sure that the generated epooc time is in milliseconds like 10 digits.

.

View solution in original post

Highlighted

Re: REST API path to get cluster memory used for a particular queue for a time period

Expert Contributor

@Jay Kumar SenSharma

It works, Great!! There was a typo in your command.

This works for me:

  1. http://$AMS_COLLECTOR_HOSTNAME:6188/ws/v1/timeline/metrics?metricNames=yarn.QueueMetrics.Queue=root....

Thanks again.

Highlighted

Re: REST API path to get cluster memory used for a particular queue for a time period

Expert Contributor

@Jay Kumar SenSharma

Thank you so much for the explanation and commands, but i am getting 404 not found error when i try to run this command using curl. I see there are some special characters and was wondering if it has to do anything with it?

For eg below path has a ☆ before tTime and after max there is a = curly sign.

http://$AMS_COLLECTOR_HOSTNAME:6188/ws/v1/timeline/metrics?metricNames=yarn.QueueMetrics.Queue=root....pId=resourcemanagertTime=1545613074&endTime=1546217874

Don't have an account?
Coming from Hortonworks? Activate your account here