...
{ "metrics": [ { "timestamp": 1432075898089, "metricname": "AMBARI_METRICS.SmokeTest.FakeMetric", "appid": "amssmoketestfake", "hostname": "ambari20-5.c.pramod-thangali.internal", "starttime": 1432075898000, "metrics": { "1432075898000": 0.963781711428, "1432075899000": 1432075898000 } } ] } |
The Metric Record Key data structure is described below:
Property | Type | Comment | Optional |
---|---|---|---|
Metric Name | String | First key part, important consideration while querying from HFile storage | N |
Hostname | String | Second key part | N |
Server time | Long | Timestamp on server when first metric write request was received | N |
Application Id | String | Uniquely identify service | N |
Instance Id | String | Second key part to identify instance/ component | Y |
Start time | Long | Start of the timeseries data |
Precision query parameter
&precision=[ seconds, minute, hour, day ]
- This flag can override which table gets queried and hence influence the amount of data returned.
All API calls honor a query limit set in the Collector service configs.
Query Time range | Resolution of returned metrics | Comments |
---|---|---|
Last 1 hour | 1 min aggregates | Precision data available on demand only |
Last 2 hours with precision | 30 sec resolution for 1 hour of data, 1 min aggregates thereafter | |
Last 10 hours | 1 min aggregates | Honor query result limit |
Last 24 hours | 1 hour aggregates | min and seconds precision available if requested |
Last week | 1 hour aggregates | |
Last year | Daily aggregates | If query limit is reached query weekly aggregates |