This Request Type is Deprecated
This will be removed in a future version of the API.Please use GET /v1/metrics/:name instead.
Description
Returns a specific gauge and (if time interval search parameters are specified) a set of measurements associated with the gauge.
URL
https://metrics-api.librato.com/v1/gauges/:name
Method
GET
Measurement Search Parameters
If optional time interval search parameters
are specified, the response includes the set of gauge's
measurements covered by the time interval. Measurements are listed
by their originating source name if one was specified when the
measurement was created. All measurements that were created
without an explicit source name are listed with the source name
unassigned.
- source
Deprecated: Use sources with a single source name, e.g
[mysource].
- sources
If sources is specified, the response is limited to gauge
measurements from those sources. The sources parameter should be
specified as an array of source names. The response is limited to
the set of sources specified in the array.
- source_tag
If source_tag is specified, the response is limited to gauge
measurements from sources tagged with source_tag.
- summarize_time
If summarize_time is specified, then the individual measurements
over the covered time period will be aggregated into a single
summarized record for each source. In this case, the measurements
array for each source will contain a single summarized record. The
measure_time in each of the summarized measurements will be set
to the first measure_time in the period covered by the time
interval search parameters. An additional
field rollups will be set to the number of individual
measurement records summarized in the single response measurement.
- summarize_sources
If summarize_sources is specified, a source name all is
included in the list of measurements. This special source name
will include all measurements summarized across all the sources
for each point in time. For each unique point in time within the
covered time interval search, there will be a single record in the
all measurements list. If multiple sources published a
measurement at the same time, the record in the all list will be
a summarized record of all the individual source measurements at
that point in time. If combined with the summarize_time
parameter, then the all list will be summarized across sources
and across time, implying it will be a list with a single
record.
Examples
Return the gauge named cpu_temp with up to four measurements at resolution 60.
curl \
-u <user>:<token> \
-X GET \
'https://metrics-api.librato.com/v1/gauges/cpu_temp?count=4&resolution=60'
Response Code
200 OK
Response Headers
** NOT APPLICABLE **
Response Body
{
"name": "cpu_temp",
"description": "Current CPU temperature in Fahrenheit",
"resolution": 60,
"measurements": {
"server1.acme.com": [
{
"measure_time": 1234567890,
"value": 84.5,
"count": 1
},
{
"measure_time": 1234567950,
"value": 86.7,
"count": 1
},
{
"measure_time": 1234568010,
"value": 84.6,
"count": 1
},
{
"measure_time": 1234568070,
"value": 89.7,
"count": 1
}
]
}
}