Service level objectives API - GET an SLO
Gets the parameter of the specified service level objective.
If from and to parameters are provided, the SLO is calculated for that timeframe; otherwise the SLO's own timeframe is used.
The request produces an application/json
payload.
This request is an Early Adopter release and may be changed in non-compatible way.
GET |
|
Authentication
To execute this request, you need the Read SLO (slo.read
) permission assigned to your API token. To learn how to obtain and use it, see Tokens and authentication.
Parameters
Parameter | Type | Description | In | Required |
---|---|---|---|---|
from | string |
The start of the requested timeframe. You can use one of the following formats:
If not set, the relative timeframe of two weeks is used ( |
query | optional |
to | string |
The end of the requested timeframe. You can use one of the following formats:
If not set, the current timestamp is used. |
query | optional |
id | string |
The ID of the required SLO. |
path | required |
Response
Response codes
Code | Description |
---|---|
200 | Success. The response contains the parameters and calculated values of the requested SLO. |
400 | Failed. The input is invalid. |
404 | Failed. The requested resource doesn't exist. |
Response body
The Slo object
Parameters of a service-level objective (SLO).
Element | Type | Description |
---|---|---|
evaluatedPercentage | number | The calculated value of the SLO. Has the value of |
numeratorValue | number | The numerator value used to evaluate the SLO when useRateMetric is set to |
denominatorValue | number | The denominator value used to evaluate the SLO when useRateMetric is set to |
errorBudget | number | The error budget of the calculated SLO. The error budget is the difference between the calculated and target values. A positive number means all is good; a negative number means trouble. |
useRateMetric | boolean | The type of the metric to use for SLO calculation:
For a list of available metrics, see Built-in metric page or try the GET metrics API call. |
metricRate | string | The percentage-based metric for the calculation of the SLO. Required when the useRateMetric is set to |
metricNumerator | string | The metric for the count of successes (the numerator in rate calculation). Required when the useRateMetric is set to |
metricDenominator | string | The total count metric (the denominator in rate calculation). Required when the useRateMetric is set to |
evaluationType | string | The evaluation type of the SLO. |
timeframe | string | The timeframe for the SLO evaluation. Use the syntax of the global timeframe selector. |
name | string | The name of the SLO. |
id | string | The ID of the SLO |
target | number | The target value of the SLO. |
description | string | A short description of the SLO. |
filter | string | The entity filter for the SLO evaluation. Use the syntax of entity selector. |
enabled | boolean | The SLO is enabled ( |
status | string | The status of the calculated SLO. |
error | string | The error of the SLO calculation. If the value differs from |
warning | number | The warning value of the SLO. At warning state the SLO is still fulfilled but is getting close to failure. |
{
"evaluatedPercentage": 96.25,
"numeratorValue": 80,
"denominatorValue": 90,
"errorBudget": 1.25,
"useRateMetric": true,
"metricRate": "builtin:service.successes.server.rate",
"metricNumerator": "builtin:service.errors.server.successCount",
"metricDenominator": "builtin:service.requestCount.total",
"evaluationType": "AGGREGATE",
"timeframe": "-1d",
"name": "Payment service availability",
"id": "123e4567-e89b-42d3-a456-556642440000",
"target": 95,
"description": "Check the SLO for our payment service",
"filter": "type(\"HOST\")",
"enabled": true,
"status": "WARNING",
"error": "NONE",
"warning": 97.5
}