Reference documentation and code samples for the Stackdriver Monitoring V3 Client class 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 begood_service /
total_serviceover any queried time interval. The value of performance
always falls into the range0 <= performance <= 1. A custom SLI describes
how to compute this ratio, whether this is by dividing values from a pair of
time series, cutting aDistributioninto 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.
Generated from protobuf messagegoogle.monitoring.v3.ServiceLevelIndicator
[[["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,["# Stackdriver Monitoring V3 Client - Class ServiceLevelIndicator (2.1.2)\n\nVersion latestkeyboard_arrow_down\n\n- [2.1.2 (latest)](/php/docs/reference/cloud-monitoring/latest/V3.ServiceLevelIndicator)\n- [2.1.1](/php/docs/reference/cloud-monitoring/2.1.1/V3.ServiceLevelIndicator)\n- [2.0.1](/php/docs/reference/cloud-monitoring/2.0.1/V3.ServiceLevelIndicator)\n- [1.12.1](/php/docs/reference/cloud-monitoring/1.12.1/V3.ServiceLevelIndicator)\n- [1.11.1](/php/docs/reference/cloud-monitoring/1.11.1/V3.ServiceLevelIndicator)\n- [1.10.3](/php/docs/reference/cloud-monitoring/1.10.3/V3.ServiceLevelIndicator)\n- [1.9.0](/php/docs/reference/cloud-monitoring/1.9.0/V3.ServiceLevelIndicator)\n- [1.8.0](/php/docs/reference/cloud-monitoring/1.8.0/V3.ServiceLevelIndicator)\n- [1.7.1](/php/docs/reference/cloud-monitoring/1.7.1/V3.ServiceLevelIndicator)\n- [1.6.0](/php/docs/reference/cloud-monitoring/1.6.0/V3.ServiceLevelIndicator)\n- [1.5.1](/php/docs/reference/cloud-monitoring/1.5.1/V3.ServiceLevelIndicator)\n- [1.4.0](/php/docs/reference/cloud-monitoring/1.4.0/V3.ServiceLevelIndicator)\n- [1.3.2](/php/docs/reference/cloud-monitoring/1.3.2/V3.ServiceLevelIndicator)\n- [1.2.2](/php/docs/reference/cloud-monitoring/1.2.2/V3.ServiceLevelIndicator) \nReference documentation and code samples for the Stackdriver Monitoring V3 Client class 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\nGenerated from protobuf message `google.monitoring.v3.ServiceLevelIndicator`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Monitoring \\\\ V3\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getBasicSli\n\nBasic SLI on a well-known service type.\n\n### hasBasicSli\n\n### setBasicSli\n\nBasic SLI on a well-known service type.\n\n### getRequestBased\n\nRequest-based SLIs\n\n### hasRequestBased\n\n### setRequestBased\n\nRequest-based SLIs\n\n### getWindowsBased\n\nWindows-based SLIs\n\n### hasWindowsBased\n\n### setWindowsBased\n\nWindows-based SLIs\n\n### getType"]]