Reference documentation and code samples for the Cloud Monitoring V3 API class Google::Cloud::Monitoring::V3::ServiceLevelIndicator.
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.
Note: The following fields are mutually exclusive: basic_sli, request_based, windows_based. If a field in that set is populated, all other fields in the set will automatically be cleared.
Note: The following fields are mutually exclusive: basic_sli, request_based, windows_based. If a field in that set is populated, all other fields in the set will automatically be cleared.
Note: The following fields are mutually exclusive: basic_sli, request_based, windows_based. If a field in that set is populated, all other fields in the set will automatically be cleared.
Note: The following fields are mutually exclusive: request_based, basic_sli, windows_based. If a field in that set is populated, all other fields in the set will automatically be cleared.
Note: The following fields are mutually exclusive: request_based, basic_sli, windows_based. If a field in that set is populated, all other fields in the set will automatically be cleared.
Note: The following fields are mutually exclusive: request_based, basic_sli, windows_based. If a field in that set is populated, all other fields in the set will automatically be cleared.
Note: The following fields are mutually exclusive: windows_based, basic_sli, request_based. If a field in that set is populated, all other fields in the set will automatically be cleared.
Note: The following fields are mutually exclusive: windows_based, basic_sli, request_based. If a field in that set is populated, all other fields in the set will automatically be cleared.
Note: The following fields are mutually exclusive: windows_based, basic_sli, request_based. If a field in that set is populated, all other fields in the set will automatically be cleared.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Cloud Monitoring V3 API - Class Google::Cloud::Monitoring::V3::ServiceLevelIndicator (v1.6.1)\n\nVersion latestkeyboard_arrow_down\n\n- [1.6.1 (latest)](/ruby/docs/reference/google-cloud-monitoring-v3/latest/Google-Cloud-Monitoring-V3-ServiceLevelIndicator)\n- [1.6.0](/ruby/docs/reference/google-cloud-monitoring-v3/1.6.0/Google-Cloud-Monitoring-V3-ServiceLevelIndicator)\n- [1.5.1](/ruby/docs/reference/google-cloud-monitoring-v3/1.5.1/Google-Cloud-Monitoring-V3-ServiceLevelIndicator)\n- [1.4.0](/ruby/docs/reference/google-cloud-monitoring-v3/1.4.0/Google-Cloud-Monitoring-V3-ServiceLevelIndicator)\n- [1.3.0](/ruby/docs/reference/google-cloud-monitoring-v3/1.3.0/Google-Cloud-Monitoring-V3-ServiceLevelIndicator)\n- [1.2.0](/ruby/docs/reference/google-cloud-monitoring-v3/1.2.0/Google-Cloud-Monitoring-V3-ServiceLevelIndicator)\n- [1.1.0](/ruby/docs/reference/google-cloud-monitoring-v3/1.1.0/Google-Cloud-Monitoring-V3-ServiceLevelIndicator)\n- [1.0.1](/ruby/docs/reference/google-cloud-monitoring-v3/1.0.1/Google-Cloud-Monitoring-V3-ServiceLevelIndicator)\n- [0.18.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.18.0/Google-Cloud-Monitoring-V3-ServiceLevelIndicator)\n- [0.17.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.17.0/Google-Cloud-Monitoring-V3-ServiceLevelIndicator)\n- [0.16.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.16.0/Google-Cloud-Monitoring-V3-ServiceLevelIndicator)\n- [0.15.2](/ruby/docs/reference/google-cloud-monitoring-v3/0.15.2/Google-Cloud-Monitoring-V3-ServiceLevelIndicator)\n- [0.14.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.14.0/Google-Cloud-Monitoring-V3-ServiceLevelIndicator)\n- [0.13.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.13.0/Google-Cloud-Monitoring-V3-ServiceLevelIndicator)\n- [0.12.1](/ruby/docs/reference/google-cloud-monitoring-v3/0.12.1/Google-Cloud-Monitoring-V3-ServiceLevelIndicator)\n- [0.11.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.11.0/Google-Cloud-Monitoring-V3-ServiceLevelIndicator)\n- [0.10.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.10.0/Google-Cloud-Monitoring-V3-ServiceLevelIndicator)\n- [0.9.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.9.0/Google-Cloud-Monitoring-V3-ServiceLevelIndicator)\n- [0.8.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.8.0/Google-Cloud-Monitoring-V3-ServiceLevelIndicator)\n- [0.7.1](/ruby/docs/reference/google-cloud-monitoring-v3/0.7.1/Google-Cloud-Monitoring-V3-ServiceLevelIndicator) \nReference documentation and code samples for the Cloud Monitoring V3 API class Google::Cloud::Monitoring::V3::ServiceLevelIndicator.\n\nA Service-Level Indicator (SLI) describes the \"performance\" of a service. For\nsome services, the SLI is well-defined. In such cases, the SLI can be\ndescribed easily by referencing the well-known SLI and providing the needed\nparameters. Alternatively, a \"custom\" SLI can be defined with a query to the\nunderlying metric store. An SLI is defined to be `good_service /\ntotal_service` over any queried time interval. The value of performance\nalways falls into the range `0 \u003c= performance \u003c= 1`. A custom SLI describes\nhow to compute this ratio, whether this is by dividing values from a pair of\ntime series, cutting a `Distribution` into good and bad counts, or counting\ntime windows in which the service complies with a criterion. For separation\nof concerns, a single Service-Level Indicator measures performance for only\none aspect of service quality, such as fraction of successful queries or\nfast-enough queries. \n\nInherits\n--------\n\n- Object \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #basic_sli\n\n def basic_sli() -\u003e ::Google::Cloud::Monitoring::V3::BasicSli\n\n**Returns**\n\n- ([::Google::Cloud::Monitoring::V3::BasicSli](./Google-Cloud-Monitoring-V3-BasicSli)) --- Basic SLI on a well-known service type.\n\n\n Note: The following fields are mutually exclusive: `basic_sli`, `request_based`, `windows_based`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #basic_sli=\n\n def basic_sli=(value) -\u003e ::Google::Cloud::Monitoring::V3::BasicSli\n\n**Parameter**\n\n- **value** ([::Google::Cloud::Monitoring::V3::BasicSli](./Google-Cloud-Monitoring-V3-BasicSli)) --- Basic SLI on a well-known service type.\n\n\nNote: The following fields are mutually exclusive: `basic_sli`, `request_based`, `windows_based`. If a field in that set is populated, all other fields in the set will automatically be cleared. \n**Returns**\n\n- ([::Google::Cloud::Monitoring::V3::BasicSli](./Google-Cloud-Monitoring-V3-BasicSli)) --- Basic SLI on a well-known service type.\n\n\n Note: The following fields are mutually exclusive: `basic_sli`, `request_based`, `windows_based`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #request_based\n\n def request_based() -\u003e ::Google::Cloud::Monitoring::V3::RequestBasedSli\n\n**Returns**\n\n- ([::Google::Cloud::Monitoring::V3::RequestBasedSli](./Google-Cloud-Monitoring-V3-RequestBasedSli)) --- Request-based SLIs\n\n\n Note: The following fields are mutually exclusive: `request_based`, `basic_sli`, `windows_based`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #request_based=\n\n def request_based=(value) -\u003e ::Google::Cloud::Monitoring::V3::RequestBasedSli\n\n**Parameter**\n\n- **value** ([::Google::Cloud::Monitoring::V3::RequestBasedSli](./Google-Cloud-Monitoring-V3-RequestBasedSli)) --- Request-based SLIs\n\n\nNote: The following fields are mutually exclusive: `request_based`, `basic_sli`, `windows_based`. If a field in that set is populated, all other fields in the set will automatically be cleared. \n**Returns**\n\n- ([::Google::Cloud::Monitoring::V3::RequestBasedSli](./Google-Cloud-Monitoring-V3-RequestBasedSli)) --- Request-based SLIs\n\n\n Note: The following fields are mutually exclusive: `request_based`, `basic_sli`, `windows_based`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #windows_based\n\n def windows_based() -\u003e ::Google::Cloud::Monitoring::V3::WindowsBasedSli\n\n**Returns**\n\n- ([::Google::Cloud::Monitoring::V3::WindowsBasedSli](./Google-Cloud-Monitoring-V3-WindowsBasedSli)) --- Windows-based SLIs\n\n\n Note: The following fields are mutually exclusive: `windows_based`, `basic_sli`, `request_based`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #windows_based=\n\n def windows_based=(value) -\u003e ::Google::Cloud::Monitoring::V3::WindowsBasedSli\n\n**Parameter**\n\n- **value** ([::Google::Cloud::Monitoring::V3::WindowsBasedSli](./Google-Cloud-Monitoring-V3-WindowsBasedSli)) --- Windows-based SLIs\n\n\nNote: The following fields are mutually exclusive: `windows_based`, `basic_sli`, `request_based`. If a field in that set is populated, all other fields in the set will automatically be cleared. \n**Returns**\n\n- ([::Google::Cloud::Monitoring::V3::WindowsBasedSli](./Google-Cloud-Monitoring-V3-WindowsBasedSli)) --- Windows-based SLIs\n\n\n Note: The following fields are mutually exclusive: `windows_based`, `basic_sli`, `request_based`. If a field in that set is populated, all other fields in the set will automatically be cleared."]]