class Fog::Google::Monitoring::Real
List metric descriptors that match the query. If the query is not set, then all of the metric descriptors will be returned.
@see cloud.google.com/monitoring/v2beta2/metricDescriptors/list
List the data points of the time series that match the metric and labels values and that have data points in the interval
developers.google.com/cloud-monitoring/v2beta1/timeseries
List the descriptors of the time series that match the metric and labels values and that have data points in the interval.
@see developers.google.com/cloud-monitoring/v2beta1/timeseriesDescriptors/list
Attributes
client[RW]
monitoring[R]
Public Class Methods
new(options)
click to toggle source
# File lib/fog/google/monitoring/real.rb, line 10 def initialize(options) shared_initialize(options[:google_project], GOOGLE_MONITORING_API_VERSION, GOOGLE_MONITORING_BASE_URL) options[:google_api_scope_url] = GOOGLE_MONITORING_API_SCOPE_URLS.join(" ") @client = initialize_google_client(options) @monitoring = @client.discovered_api("cloudmonitoring", api_version) end
Public Instance Methods
list_metric_descriptors(options = {})
click to toggle source
# File lib/fog/google/requests/monitoring/list_metric_descriptors.rb, line 10 def list_metric_descriptors(options = {}) api_method = @monitoring.metric_descriptors.list parameters = { "project" => @project } parameters["count"] = options[:count] if options.key?(:count) parameters["pageToken"] = options[:page_token] if options.key?(:page_token) parameters["query"] = options[:query] if options.key?(:query) request(api_method, parameters) end
list_timeseries(metric, youngest, options = {})
click to toggle source
# File lib/fog/google/requests/monitoring/list_timeseries.rb, line 10 def list_timeseries(metric, youngest, options = {}) api_method = @monitoring.timeseries.list parameters = { "project" => @project, "metric" => metric, "youngest" => youngest } parameters["count"] = options[:count] if options.key?(:count) parameters["labels"] = options[:labels] if options.key?(:labels) parameters["oldest"] = options[:oldest] if options.key?(:oldest) parameters["pageToken"] = options[:page_token] if options.key?(:page_token) parameters["timespan"] = options[:timespan] if options.key?(:timespan) request(api_method, parameters) end
list_timeseries_descriptors(metric, youngest, options = {})
click to toggle source
# File lib/fog/google/requests/monitoring/list_timeseries_descriptors.rb, line 10 def list_timeseries_descriptors(metric, youngest, options = {}) api_method = @monitoring.timeseries_descriptors.list parameters = { "project" => @project, "metric" => metric, "youngest" => youngest } parameters["count"] = options[:count] if options.key?(:count) parameters["labels"] = options[:labels] if options.key?(:labels) parameters["oldest"] = options[:oldest] if options.key?(:oldest) parameters["pageToken"] = options[:page_token] if options.key?(:page_token) parameters["timespan"] = options[:timespan] if options.key?(:timespan) request(api_method, parameters) end