Instantly share code, notes, and snippets.

Embed
What would you like to do?
Ambari Collect API: Applying SeriesAggregator

http://avijayan-ams-1.openstacklocal:3000/api/datasources/proxy/1/ws/v1/timeline/metrics?metricNames=regionserver.RegionServer.%25Bytes._avg&hostname=&appId=hbase&startTime=1465275291&endTime=1465361691&seriesAggregateFunction=sum

{
   "metrics":[
      {
         "timestamp":0,
         "metricname":"SUM(regionserver.RegionServer.receivedBytes._avg,regionserver.RegionServer.sentBytes._avg)",
         "appid":"hbase",
         "instanceid":"",
         "hostname":"",
         "starttime":1465275300000,
         "metrics":{
            "1465275300000":193370.555,
            "1465275600000":193787.5,
            "1465275900000":194871.555,
            "1465276200000":195288.5,
            "1465276500000":196632.78,
            "1465276800000":198908.45500000002,
            "1465277100000":203381.595,
            "1465277400000":206264.45500000002,
            "1465277700000":208742.555,
            "1465278000000":209159.5,
            "1465278300000":210243.555,
            "1465278600000":210660.5,
            "1465278900000":211744.555,
            "1465279200000":212161.5,
            "1465279500000":213245.555,
            "1465279800000":213662.5,
            "1465280100000":215006.78,
            "1465281300000":227533.5,
            "1465281600000":227758.65,
            "1465281900000":228659.25,
            "1465282200000":229259.65,
            "1465282500000":230160.25,
            "1465282800000":230760.65,
            "1465283100000":231661.25,
            "1465283400000":232261.65,
            "1465283700000":233513.55,
            "1465284000000":236197.815,
            "1465284300000":240323.085
         }
      }
   ]
}

http://avijayan-ams-1.openstacklocal:3000/api/datasources/proxy/1/ws/v1/timeline/metrics?metricNames=regionserver.RegionServer.%25Bytes._avg&hostname=&appId=hbase&startTime=1465275291&endTime=1465361691&seriesAggregateFunction=avg

{
   "metrics":[
      {
         "timestamp":0,
         "metricname":"AVG(regionserver.RegionServer.receivedBytes._avg,regionserver.RegionServer.sentBytes._avg)",
         "appid":"hbase",
         "instanceid":"",
         "hostname":"",
         "starttime":1465275300000,
         "metrics":{
            "1465275300000":96685.2775,
            "1465275600000":96893.75,
            "1465275900000":97435.7775,
            "1465276200000":97644.25,
            "1465276500000":98316.39,
            "1465276800000":99454.22750000001,
            "1465277100000":101690.7975,
            "1465277400000":103132.22750000001,
            "1465277700000":104371.2775,
            "1465278000000":104579.75,
            "1465278300000":105121.7775,
            "1465278600000":105330.25,
            "1465278900000":105872.2775,
            "1465279200000":106080.75,
            "1465279500000":106622.7775,
            "1465279800000":106831.25,
            "1465280100000":107503.39,
            "1465281300000":113766.75,
            "1465281600000":113879.325,
            "1465281900000":114329.625,
            "1465282200000":114629.825,
            "1465282500000":115080.125,
            "1465282800000":115380.325,
            "1465283100000":115830.625,
            "1465283400000":116130.825,
            "1465283700000":116756.775,
            "1465284000000":118098.9075,
            "1465284300000":120161.5425
         }
      }
   ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment