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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 2.0.0
    • 2.1.1
    • ambari-metrics
    • 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

        1. buggy-cpu-graph-api-call.png
          320 kB
          Siddharth Wagle

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: