3 Replies Latest reply: Apr 13, 2012 3:29 AM by Heiko Rupp RSS

    REST interface cannot return more than 60 data points

    Elias Ross Master

      RHQ 4.2.

       

      Script:

       

      #!/bin/bash
      
      outdir=data
      url=http://localhost:7080/rest/1/metric/data
      duration=259200000
      ids="657236 623969 611685 611697" # 623970 611692 611701"
      dataPoints=120
      user="user:pw"
      udate=$( date "+%s" )
      sdate=$(( udate - 60 * 60 * 24))
      jsdate=$(( sdate * 1000 ))
      jedate=$(( udate * 1000 ))
      
      function c() {
          curl --user $user -H "Accept: application/json" "${url}/${1}/?dataPoints=${dataPoints}&startTime=${jsdate}&endTime=${jedate}"
      }
      
      for i in $ids
      do
          echo $i
          c $i > $outdir/${i}.json
      done
      

       

      If use 120 points, I only get back 60 regardless of the amount of data points.

       

      But I know this parameter is 'seen' since there is a bug when the number is increased. For example, I ask for 120 data points using the default duration, I get back 60 points where 30 of them are NaN values.