Metrics

The Metrics endpoints allow you to retrieve metric types and metric samples for a certain date range. Additional documentation for this endpoint can be found by navigating to http://your-web-server:port/api-docs.

Metric Types

 /api/v1/metrics/types

The metric types endpoint provides a list of metric types in Redgate monitor that are required to query metric samples using the metrics endpoint. 

Note: Each monitored entity supports different metrics types, for a list of metric types supported by each monitored entity please refer to metric type to monitored entity mapping

Attributes

idThe unique identifier for the metric type
nameName of the metric type
categoryCategory of the metric eg: Machine, SqlServer

Limitation

Rate limitDefaults to 100 API requests per minute, you can refer rate limiting to change these default values.

Metrics

 /api/v1/metrics

The metrics endpoint provides a list of metrics per monitored entity for a given metric type

This endpoint consists of a large amount of Data, It is recommended that you use the query parameters where possible to limit the amount of data returned by the endpoints.

Parameters

NameMandatory/OptionalTypeDefaultDescription
MetricTypeIdMandatoryStringNoneMetric type ID which can be retrieved from the metric types endpoint
MonitoredEntityIdOptionalStringNoneMonitored entity ID which can be retrieved from the monitored entities endpoint, can be used to restrict the result to a single monitored entity
StartOptionalDateTimecurrent DateTime - 1hourThe date and time used to filter the metrics on the time the metric was collected, can be used to retrieve metric samples collected after the specified date and time.
EndOptionalDateTimecurrent DateTimeThe date and time used to filter the metrics on the time the metric was collected, can be used to retrieve metric samples collected before the specified date and time.
MaxSampleCountOptionalNumber100The maximum number of samples retrieved per entity for the specified metric type, this value retrieves a single sample for a block of time by dividing the time between the start and end values into equal blocks.

Attributes

metricTypeThe id and name of the metric type
monitoredEntityid and name of the monitored entity the alert was raised on.
targetNameThe name of the target entity the metric samples are collected against value can be Machine name, Database name etc.
dataDateTime and value of the metric sample

Limitation

Date RangeMaximum range of 31 Days
MaxSampleCountCannot exceed 500 and minimum value is 50
Rate limitDefaults to 100 API requests per minute, you can refer rate limiting to change these default values.



Didn't find what you were looking for?