Class: Google::Apis::MonitoringV3::ServiceLevelObjective

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/monitoring_v3/classes.rb,
lib/google/apis/monitoring_v3/representations.rb,
lib/google/apis/monitoring_v3/representations.rb

Overview

A Service-Level Objective (SLO) describes a level of desired good service. It consists of a service-level indicator (SLI), a performance goal, and a period over which the objective is to be evaluated against that goal. The SLO can use SLIs defined in a number of different manners. Typical SLOs might include "99% of requests in each rolling week have latency below 200 milliseconds" or "99.5% of requests in each calendar month return successfully."

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ServiceLevelObjective

Returns a new instance of ServiceLevelObjective.



4381
4382
4383
# File 'lib/google/apis/monitoring_v3/classes.rb', line 4381

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#calendar_periodString

A calendar period, semantically "since the start of the current ". At this time, only DAY, WEEK, FORTNIGHT, and MONTH are supported. Corresponds to the JSON property calendarPeriod

Returns:

  • (String)


4329
4330
4331
# File 'lib/google/apis/monitoring_v3/classes.rb', line 4329

def calendar_period
  @calendar_period
end

#display_nameString

Name used for UI elements listing this SLO. Corresponds to the JSON property displayName

Returns:

  • (String)


4334
4335
4336
# File 'lib/google/apis/monitoring_v3/classes.rb', line 4334

def display_name
  @display_name
end

#goalFloat

The fraction of service that must be good in order for this objective to be met. 0 < goal <= 0.9999. Corresponds to the JSON property goal

Returns:

  • (Float)


4340
4341
4342
# File 'lib/google/apis/monitoring_v3/classes.rb', line 4340

def goal
  @goal
end

#nameString

Identifier. Resource name for this ServiceLevelObjective. The format is: projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[ SLO_NAME] Corresponds to the JSON property name

Returns:

  • (String)


4347
4348
4349
# File 'lib/google/apis/monitoring_v3/classes.rb', line 4347

def name
  @name
end

#rolling_periodString

A rolling time period, semantically "in the past ". Must be an integer multiple of 1 day no larger than 30 days. Corresponds to the JSON property rollingPeriod

Returns:

  • (String)


4353
4354
4355
# File 'lib/google/apis/monitoring_v3/classes.rb', line 4353

def rolling_period
  @rolling_period
end

#service_level_indicatorGoogle::Apis::MonitoringV3::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. Corresponds to the JSON property serviceLevelIndicator



4369
4370
4371
# File 'lib/google/apis/monitoring_v3/classes.rb', line 4369

def service_level_indicator
  @service_level_indicator
end

#user_labelsHash<String,String>

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. Corresponds to the JSON property userLabels

Returns:

  • (Hash<String,String>)


4379
4380
4381
# File 'lib/google/apis/monitoring_v3/classes.rb', line 4379

def user_labels
  @user_labels
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4386
4387
4388
4389
4390
4391
4392
4393
4394
# File 'lib/google/apis/monitoring_v3/classes.rb', line 4386

def update!(**args)
  @calendar_period = args[:calendar_period] if args.key?(:calendar_period)
  @display_name = args[:display_name] if args.key?(:display_name)
  @goal = args[:goal] if args.key?(:goal)
  @name = args[:name] if args.key?(:name)
  @rolling_period = args[:rolling_period] if args.key?(:rolling_period)
  @service_level_indicator = args[:service_level_indicator] if args.key?(:service_level_indicator)
  @user_labels = args[:user_labels] if args.key?(:user_labels)
end