Uploaded image for project: 'Ambari'
  1. Ambari
  2. AMBARI-12248

Metrics API result set contains a lot of data outside the requested time range

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: 2.1.1
    • Component/s: ambari-metrics
    • Labels:
      None

      Description

      When I access the Host Details page for :

      http://172.22.76.13:8080/api/v1/clusters/leapsec/hosts/leapsec-rhel6-11.openstacklocal?fields=metrics/cpu/cpu_user[1436028521,1436032121,15],metrics/cpu/cpu_wio[1436028521,1436032121,15],metrics/cpu/cpu_nice[1436028521,1436032121,15],metrics/cpu/cpu_aidle[1436028521,1436032121,15],metrics/cpu/cpu_system[1436028521,1436032121,15],metrics/cpu/cpu_idle[1436028521,1436032121,15]&_=1435698892786
      

      However, look at the screenshot. The start time (1435946268) and using the standard +3600 seconds for the end time (1435949868), the following call was made:

      http://172.22.76.13:8080/api/v1/clusters/leapsec/hosts/leapsec-rhel6-11.openstacklocal?fields=metrics/cpu/cpu_user[1435946268,1435949868,15],metrics/cpu/cpu_wio[1435946268,1435949868,15],metrics/cpu/cpu_nice[1435946268,1435949868,15],metrics/cpu/cpu_aidle[1435946268,1435949868,15],metrics/cpu/cpu_system[1435946268,1435949868,15],metrics/cpu/cpu_idle[1435946268,1435949868,15]&_=1435698626557
      

      This resulted in 13.6MB of data transferred in 12.05s. The result set size is exactly consistent with what is in the screenshot.
      Note that this result set contained a bunch of data that are outside of the time window specified [1435946268,1435949868).

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                swagle Siddharth Wagle
                Reporter:
                swagle Siddharth Wagle
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: