- API >
- Public API Resources >
- Metrics
Metrics¶
On this page
Operations¶
GET /api/public/v1.0/groups/GROUP-ID/hosts/HOST-ID/metrics
- Get a list of all available metrics for the host. Each entity in the list will be a partial metric entity. No actual data points are returned, but each entity contains aself
link which you may follow to retrieve the full metric entity.GET /api/public/v1.0/groups/GROUP-ID/hosts/HOST-ID/metrics/METRIC-NAME
- Get the data points for the specified host and metric. If no additional query parameters are given, then the minute-level data for the past hour is returned. TheMETRIC-NAME
may be any of the supported values listed for themetricName
field, above. Note that if the provided metric is a database-level metric (ie,DB_LOCK_PERCENTAGE
) or a hardware metric for a specific device (ie, its name begins withMUNIN_IOSTAT
), then the response entity will contain a list of links to all available database (or hardware device) metrics. You may also provide additional query parameters:granularity
- The size of the epoch. Acceptable values are:MINUTE HOUR DAY
.period
- The ISO-8601 formatted time period that specifies how far back in the past to query. For example, to request the last 36 hours of hour-level data, you must specify:granularity=HOUR&period=P1DT12H
.
GET /api/public/v1.0/groups/GROUP-ID/hosts/HOST-ID/metrics/DB-METRIC-NAME/DB-NAME
- Get the data points for the specified host, database metric, and database name. The only available database-level metric isDB_LOCK_PERCENTAGE
. The same query parameters described above are also supported.GET /api/public/v1.0/groups/GROUP-ID/hosts/HOST-ID/metrics/HW-METRIC-NAME/DEVICE-NAME
- Get the data points for the specified host, hardware metric, and device name. The device-specific hardware metrics include the supported values for themetricName
field that begin withMUNIN_IOSTAT_
. The same query parameters described above are also supported.
Sample Entity¶
Entity Fields¶
Name | Type | Description |
---|---|---|
hostId | string | ID of the host to which this metric pertains. |
groupId | string | ID of the group that owns this host. |
metricName | enum | The name of the metric. Possible values are:
|
units | enum | The units in which the metric values are expressed. Possible values are:
|
granularity | enum | The size of the epoch covered by each data point. Possible values are:
|
deviceName | string | The name of the device. Only present for hardware (ie, Munin) metrics. |
databaseName | string | The name of the database. Only present for database-level metrics. |
dataPoints | object array | An array of objects, where each object represents a single metric data point. When there is no data point available for a particular epoch, then it will simply be missing from the array. For example, if you request minute-level data points for 1:30PM through 2:00PM, but Ops Manager does not have a 1:31PM sample, then: dataPoints[0].timestamp = ‘…T13:30:00Z’; dataPoints[1].timestamp = ‘…T13:32:00Z’; dataPoints[2].timestamp = ‘…T13:33:00Z’; etc. |
dataPoints.$.timestamp | date | The timestamp of the beginning of the epoch represented by this data point. |
dataPoints.$.value | float | The value of the data point. |
Links¶
Relation | Description |
---|---|
self | Me |
group | The group that the host belongs to. |
host | The host to which the metric pertains. |