Created on 12-30-2018 08:53 PM - edited 09-16-2022 07:01 AM
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?
Created 12-31-2018 01:06 AM
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.
.
Created 12-31-2018 01:06 AM
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.
.
Created 12-31-2018 03:13 AM
It works, Great!! There was a typo in your command.
This works for me:
Thanks again.
Created 12-31-2018 02:19 AM
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=resourcemanager☆tTime=1545613074&endTime=1546217874