Current status -
I am trying to pull all yarn metrics data via curl on the HDP machine that is set up on 2.6.3 on VM
i am trying to run the curl command on the same host machine.
however, my curl command is failing. i tried using hostname and same issue
but curl -v <ip> works.
I want to use this data to plot graphs/ patterns that can reflect the usage of the cluster and suggest improvements.
My curl command -
curl -v "http://192.168.56.101:6188/ws/v1/timeline/metrics?metricNames=bytes_in._rate._avg&hostname=&appId=HOST&instanceId=&startTime=1451630974&endTime=1519110315"
Error message -
* About to connect() to 192.168.56.101 port 6188 (#0) * Trying 192.168.56.101... * Connection refused * Failed connect to 192.168.56.101:6188; Connection refused * Closing connection 0 curl: (7) Failed connect to 192.168.56.101:6188; Connection refused
Is my port incorrect ? what is the best command to pull yarn metrics .
Has anyone tried working on curl on VM and successfully able to pull data from yarn api
can someone share me any pointers that can be helpful here.
I referred to one of the posts and picked up the command.
This seems to be correct API. Is the metrics collector installed on the same host? (192.168.56.101), 6188 is the default port for AMS. If you have Ambari, you can search for timeline.metrics.service.webapp.address in Metrics collector configs, alternatively you can search for this property in ams-site.xml in the node where it's installed.
Or there's a problem in running collector daemon, you can check
/var/log/ambari-metrics-collector/ambari-metrics-collector.log/out to check it.
https://cwiki.apache.org/confluence/display/AMBARI/Metrics+Collector+API+Specification is the standard reference.