<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Ambari Metrics Collector API not return latest metrics in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Metrics-Collector-API-not-return-latest-metrics/m-p/162570#M53527</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I've set up a AMS API call to retrieve Yarn matrix on a minute basis. I tried to add startTime/endTime in my query. Even though I found the metrics returned are not reflecting the latest time stamp, and data is kind of stale. Is there a way I can configure my query so that it can always catch the latest state of the metrics?&lt;/P&gt;&lt;P&gt;Example of my tests:&lt;/P&gt;&lt;P&gt;curl 'http://myhost:6188/ws/v1/timeline/metrics?metricNames=[metricsname]&amp;amp;appId=resourcemanager&amp;amp;startTime=1486410484&amp;amp;endTime=1486410784&amp;amp;precision=SECONDS'&lt;/P&gt;&lt;P&gt;In the return below, I want to see at least the endTime epoch or endTime - 1min epoch, but sometimes it can't get this far. &lt;/P&gt;&lt;P&gt;{u'metrics': [{u'metrics': {u'1486410630000': 0.0, u'1486410570000': 0.0, u'1486410540000': 0.0, u'1486410600000': 0.0, u'1486410510000': 0.0}, u'timestamp': 1486410510000, u'appid': u'resourcemanager', u'starttime': 1486410510000, u'metricname': u'metricsname'}]}&lt;/P&gt;&lt;P&gt;Thanks for the help!&lt;/P&gt;</description>
    <pubDate>Tue, 07 Feb 2017 03:59:45 GMT</pubDate>
    <dc:creator>meng_meng</dc:creator>
    <dc:date>2017-02-07T03:59:45Z</dc:date>
    <item>
      <title>Ambari Metrics Collector API not return latest metrics</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Metrics-Collector-API-not-return-latest-metrics/m-p/162570#M53527</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I've set up a AMS API call to retrieve Yarn matrix on a minute basis. I tried to add startTime/endTime in my query. Even though I found the metrics returned are not reflecting the latest time stamp, and data is kind of stale. Is there a way I can configure my query so that it can always catch the latest state of the metrics?&lt;/P&gt;&lt;P&gt;Example of my tests:&lt;/P&gt;&lt;P&gt;curl 'http://myhost:6188/ws/v1/timeline/metrics?metricNames=[metricsname]&amp;amp;appId=resourcemanager&amp;amp;startTime=1486410484&amp;amp;endTime=1486410784&amp;amp;precision=SECONDS'&lt;/P&gt;&lt;P&gt;In the return below, I want to see at least the endTime epoch or endTime - 1min epoch, but sometimes it can't get this far. &lt;/P&gt;&lt;P&gt;{u'metrics': [{u'metrics': {u'1486410630000': 0.0, u'1486410570000': 0.0, u'1486410540000': 0.0, u'1486410600000': 0.0, u'1486410510000': 0.0}, u'timestamp': 1486410510000, u'appid': u'resourcemanager', u'starttime': 1486410510000, u'metricname': u'metricsname'}]}&lt;/P&gt;&lt;P&gt;Thanks for the help!&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2017 03:59:45 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Metrics-Collector-API-not-return-latest-metrics/m-p/162570#M53527</guid>
      <dc:creator>meng_meng</dc:creator>
      <dc:date>2017-02-07T03:59:45Z</dc:date>
    </item>
    <item>
      <title>Re: Ambari Metrics Collector API not return latest metrics</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Metrics-Collector-API-not-return-latest-metrics/m-p/162571#M53528</link>
      <description>&lt;P&gt;When a hostname is not specified, AMS returns data aggregated across all hosts/appId that send this metric. The aggregation happens every 2 mins, creating 4 x 30 second aggregates per iteration.&lt;/P&gt;&lt;P&gt;Add the following query parameter to your curl URL.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;hostname=&amp;lt;resourcemanager_host&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;This should return most recent data. &lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2017 02:24:16 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Metrics-Collector-API-not-return-latest-metrics/m-p/162571#M53528</guid>
      <dc:creator>avijayan</dc:creator>
      <dc:date>2017-02-08T02:24:16Z</dc:date>
    </item>
    <item>
      <title>Re: Ambari Metrics Collector API not return latest metrics</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Metrics-Collector-API-not-return-latest-metrics/m-p/162572#M53529</link>
      <description>&lt;P&gt;Thanks &lt;A rel="user" href="https://community.cloudera.com/users/290/avijayan.html" nodeid="290"&gt;@Aravindan Vijayan&lt;/A&gt; for the information. This works.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Feb 2017 02:29:54 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Metrics-Collector-API-not-return-latest-metrics/m-p/162572#M53529</guid>
      <dc:creator>meng_meng</dc:creator>
      <dc:date>2017-02-09T02:29:54Z</dc:date>
    </item>
  </channel>
</rss>

