Class: Google::Apis::MonitoringV1::Scorecard

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

Overview

A widget showing the latest value of a metric, and how this value relates to one or more thresholds.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Scorecard

Returns a new instance of Scorecard.



1936
1937
1938
# File 'lib/google/apis/monitoring_v1/classes.rb', line 1936

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

Instance Attribute Details

#blank_viewGoogle::Apis::MonitoringV1::Empty

A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo rpc Bar(google. protobuf.Empty) returns (google.protobuf.Empty); Corresponds to the JSON property blankView



1883
1884
1885
# File 'lib/google/apis/monitoring_v1/classes.rb', line 1883

def blank_view
  @blank_view
end

#dimensionsArray<Google::Apis::MonitoringV1::Dimension>

Optional. A dimension is a structured label, class, or category for a set of measurements in your data. Corresponds to the JSON property dimensions



1889
1890
1891
# File 'lib/google/apis/monitoring_v1/classes.rb', line 1889

def dimensions
  @dimensions
end

#gauge_viewGoogle::Apis::MonitoringV1::GaugeView

A gauge chart shows where the current value sits within a pre-defined range. The upper and lower bounds should define the possible range of values for the scorecard's query (inclusive). Corresponds to the JSON property gaugeView



1896
1897
1898
# File 'lib/google/apis/monitoring_v1/classes.rb', line 1896

def gauge_view
  @gauge_view
end

#measuresArray<Google::Apis::MonitoringV1::Measure>

Optional. A measure is a measured value of a property in your data. For example, rainfall in inches, number of units sold, revenue gained, etc. Corresponds to the JSON property measures



1902
1903
1904
# File 'lib/google/apis/monitoring_v1/classes.rb', line 1902

def measures
  @measures
end

#spark_chart_viewGoogle::Apis::MonitoringV1::SparkChartView

A sparkChart is a small chart suitable for inclusion in a table-cell or inline in text. This message contains the configuration for a sparkChart to show up on a Scorecard, showing recent trends of the scorecard's timeseries. Corresponds to the JSON property sparkChartView



1909
1910
1911
# File 'lib/google/apis/monitoring_v1/classes.rb', line 1909

def spark_chart_view
  @spark_chart_view
end

#thresholdsArray<Google::Apis::MonitoringV1::Threshold>

The thresholds used to determine the state of the scorecard given the time series' current value. For an actual value x, the scorecard is in a danger state if x is less than or equal to a danger threshold that triggers below, or greater than or equal to a danger threshold that triggers above. Similarly, if x is above/below a warning threshold that triggers above/below, then the scorecard is in a warning state - unless x also puts it in a danger state. ( Danger trumps warning.)As an example, consider a scorecard with the following four thresholds: value: 90, category: 'DANGER', trigger: 'ABOVE',, value: 70, category: 'WARNING', trigger: 'ABOVE',, value: 10, category: 'DANGER', trigger: 'BELOW',, value: 20, category: 'WARNING', trigger: 'BELOW', Then: values less than or equal to 10 would put the scorecard in a DANGER state, values greater than 10 but less than or equal to 20 a WARNING state, values strictly between 20 and 70 an OK state, values greater than or equal to 70 but less than 90 a WARNING state, and values greater than or equal to 90 a DANGER state. Corresponds to the JSON property thresholds



1928
1929
1930
# File 'lib/google/apis/monitoring_v1/classes.rb', line 1928

def thresholds
  @thresholds
end

#time_series_queryGoogle::Apis::MonitoringV1::TimeSeriesQuery

TimeSeriesQuery collects the set of supported methods for querying time series data from the Stackdriver metrics API. Corresponds to the JSON property timeSeriesQuery



1934
1935
1936
# File 'lib/google/apis/monitoring_v1/classes.rb', line 1934

def time_series_query
  @time_series_query
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1941
1942
1943
1944
1945
1946
1947
1948
1949
# File 'lib/google/apis/monitoring_v1/classes.rb', line 1941

def update!(**args)
  @blank_view = args[:blank_view] if args.key?(:blank_view)
  @dimensions = args[:dimensions] if args.key?(:dimensions)
  @gauge_view = args[:gauge_view] if args.key?(:gauge_view)
  @measures = args[:measures] if args.key?(:measures)
  @spark_chart_view = args[:spark_chart_view] if args.key?(:spark_chart_view)
  @thresholds = args[:thresholds] if args.key?(:thresholds)
  @time_series_query = args[:time_series_query] if args.key?(:time_series_query)
end