Class: Fog::Google::Monitoring::TimeseriesCollection

Inherits:
Collection
  • Object
show all
Defined in:
lib/fog/google/models/monitoring/timeseries_collection.rb

Instance Method Summary collapse

Instance Method Details

#all(filter: nil, interval: nil, aggregation: nil, order_by: nil, page_size: nil, page_token: nil, view: nil) ⇒ Array<Fog::Google::Monitoring::Timeseries>

Lists all Timeseries.

Parameters:

  • filter (String) (defaults to: nil)

    A monitoring filter that specifies which time series should be returned. The filter must specify a single metric type, and can additionally specify metric labels and other information.

  • interval (Hash) (defaults to: nil)

    Required. The time interval for which results should be returned.

  • aggregation (Hash) (defaults to: nil)

    Optional object describing how to combine multiple time series to provide different views of the data. By default, the raw time series data is returned.

  • order_by (String) (defaults to: nil)

    Specifies the order in which the points of the time series should be returned. By default, results are not ordered. Currently, this field must be left blank.

  • page_size (String) (defaults to: nil)
  • page_token (String) (defaults to: nil)
  • view (String) (defaults to: nil)

    Specifies which information is returned about the time series.

Options Hash (interval:):

  • end_time (String)

    Required RFC3339 timestamp marking the end of interval

  • start_time (String)

    Required RFC3339 timestamp marking start of interval.

Options Hash (aggregation:):

  • alignment_period (String)

    The alignment period for per-time series alignment.

  • cross_series_reducer (String)

    The approach to be used to align individual time series.

  • group_by_fields (String)

    The set of fields to preserve when crossSeriesReducer is specified.

  • per_series_aligner (String)

    The approach to be used to combine time series.

Returns:



32
33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/fog/google/models/monitoring/timeseries_collection.rb', line 32

def all(filter: nil, interval: nil, aggregation: nil, order_by: nil, page_size: nil, page_token: nil, view: nil)
  data = service.list_timeseries(
    :filter => filter,
    :interval => interval,
    :aggregation => aggregation,
    :order_by => order_by,
    :page_size => page_size,
    :page_token => page_token,
    :view => view
  ).to_h[:time_series] || []

  load(data)
end