service_level_objectives
Creates, updates, deletes, gets or lists a service_level_objectives
resource.
Overview
Name | service_level_objectives |
Type | Resource |
Id | google.monitoring.service_level_objectives |
Fields
Name | Datatype | Description |
---|---|---|
name | string | Identifier. Resource name for this ServiceLevelObjective. The format is: projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] |
calendarPeriod | string | A calendar period, semantically "since the start of the current ". At this time, only DAY, WEEK, FORTNIGHT, and MONTH are supported. |
displayName | string | Name used for UI elements listing this SLO. |
goal | number | The fraction of service that must be good in order for this objective to be met. 0 < goal <= 0.9999. |
rollingPeriod | string | A rolling time period, semantically "in the past ". Must be an integer multiple of 1 day no larger than 30 days. |
serviceLevelIndicator | object | A Service-Level Indicator (SLI) describes the "performance" of a service. For some services, the SLI is well-defined. In such cases, the SLI can be described easily by referencing the well-known SLI and providing the needed parameters. Alternatively, a "custom" SLI can be defined with a query to the underlying metric store. An SLI is defined to be good_service / total_service over any queried time interval. The value of performance always falls into the range 0 <= performance <= 1. A custom SLI describes how to compute this ratio, whether this is by dividing values from a pair of time series, cutting a Distribution into good and bad counts, or counting time windows in which the service complies with a criterion. For separation of concerns, a single Service-Level Indicator measures performance for only one aspect of service quality, such as fraction of successful queries or fast-enough queries. |
userLabels | object | Labels which have been used to annotate the service-level objective. Label keys must start with a letter. Label keys and values may contain lowercase letters, numbers, underscores, and dashes. Label keys and values have a maximum length of 63 characters, and must be less than 128 bytes in size. Up to 64 label entries may be stored. For labels which do not have a semantic value, the empty string may be supplied for the label value. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
services_service_level_objectives_get | SELECT | name | Get a ServiceLevelObjective by name. |
services_service_level_objectives_list | SELECT | parent, parentType | List the ServiceLevelObjectives for the given Service. |
services_service_level_objectives_create | INSERT | parent, parentType | Create a ServiceLevelObjective for the given Service. |
services_service_level_objectives_delete | DELETE | name | Delete the given ServiceLevelObjective. |
services_service_level_objectives_patch | UPDATE | name | Update the given ServiceLevelObjective. |
SELECT
examples
Get a ServiceLevelObjective by name.
SELECT
name,
calendarPeriod,
displayName,
goal,
rollingPeriod,
serviceLevelIndicator,
userLabels
FROM google.monitoring.service_level_objectives
WHERE name = '{{ name }}';
INSERT
example
Use the following StackQL query and manifest file to create a new service_level_objectives
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.monitoring.service_level_objectives (
parent,
parentType,
name,
displayName,
serviceLevelIndicator,
goal,
rollingPeriod,
calendarPeriod,
userLabels
)
SELECT
'{{ parent }}',
'{{ parentType }}',
'{{ name }}',
'{{ displayName }}',
'{{ serviceLevelIndicator }}',
{{ goal }},
'{{ rollingPeriod }}',
'{{ calendarPeriod }}',
'{{ userLabels }}'
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: displayName
value: string
- name: serviceLevelIndicator
value:
- name: basicSli
value:
- name: method
value:
- string
- name: location
value:
- string
- name: version
value:
- string
- name: availability
value: []
- name: latency
value:
- name: threshold
value: string
- name: requestBased
value:
- name: goodTotalRatio
value:
- name: goodServiceFilter
value: string
- name: badServiceFilter
value: string
- name: totalServiceFilter
value: string
- name: distributionCut
value:
- name: distributionFilter
value: string
- name: range
value:
- name: min
value: number
- name: max
value: number
- name: windowsBased
value:
- name: goodBadMetricFilter
value: string
- name: goodTotalRatioThreshold
value:
- name: threshold
value: number
- name: metricMeanInRange
value:
- name: timeSeries
value: string
- name: windowPeriod
value: string
- name: goal
value: number
- name: rollingPeriod
value: string
- name: calendarPeriod
value: string
- name: userLabels
value: object
UPDATE
example
Updates a service_level_objectives
resource.
/*+ update */
UPDATE google.monitoring.service_level_objectives
SET
name = '{{ name }}',
displayName = '{{ displayName }}',
serviceLevelIndicator = '{{ serviceLevelIndicator }}',
goal = number,
rollingPeriod = '{{ rollingPeriod }}',
calendarPeriod = '{{ calendarPeriod }}',
userLabels = '{{ userLabels }}'
WHERE
name = '{{ name }}';
DELETE
example
Deletes the specified service_level_objectives
resource.
/*+ delete */
DELETE FROM google.monitoring.service_level_objectives
WHERE name = '{{ name }}';