class Apcera::MetricsApi

Attributes

api_client[RW]

Public Class Methods

new(api_client = nil) click to toggle source
# File lib/apcera/api/metrics_api.rb, line 7
def initialize(api_client = nil)
  @api_client = api_client || Configuration.api_client
end

Public Instance Methods

metrics_cluster_get(opts = {}) click to toggle source

Returns metrics data for the cluster. Returns metrics data for the cluster. @param [Hash] opts the optional parameters @option opts [Array<String>] :metric Comma-delimited string that includes, in order, the following fields: n * Job FQN (wildcards accepted) n * Instance manager hostname (can be a wildcard)n * Instance ID n * Metric to evaluate n * &#39;From&#39; time (optional)n * &#39;To&#39; time (optional). @option opts [String] :authorization @return [Metrics]

# File lib/apcera/api/metrics_api.rb, line 17
def metrics_cluster_get(opts = {})

  if Configuration.debugging
    Configuration.logger.debug "Calling API: MetricsApi#metrics_cluster_get ..."
  end
  
  
  # resource path
  path = "/metrics/cluster".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'metric'] = opts[:'metric'] if opts[:'metric']

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  _header_accept = []
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
  header_params[:'authorization'] = opts[:'authorization'] if opts[:'authorization']

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  

  auth_names = ['authorization']
  result = @api_client.call_api(:GET, path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Metrics')
  if Configuration.debugging
    Configuration.logger.debug "API called: MetricsApi#metrics_cluster_get. Result: #{result.inspect}"
  end
  return result
end
metrics_instance_managers_get(opts = {}) click to toggle source

Returns metrics for instance managers. Returns metrics for instance managers. @param [Hash] opts the optional parameters @option opts [Array<String>] :metric @option opts [String] :authorization @return [Metrics]

# File lib/apcera/api/metrics_api.rb, line 70
def metrics_instance_managers_get(opts = {})

  if Configuration.debugging
    Configuration.logger.debug "Calling API: MetricsApi#metrics_instance_managers_get ..."
  end
  
  
  # resource path
  path = "/metrics/instance_managers".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'metric'] = opts[:'metric'] if opts[:'metric']

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  _header_accept = []
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
  header_params[:'authorization'] = opts[:'authorization'] if opts[:'authorization']

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  

  auth_names = ['authorization']
  result = @api_client.call_api(:GET, path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Metrics')
  if Configuration.debugging
    Configuration.logger.debug "API called: MetricsApi#metrics_instance_managers_get. Result: #{result.inspect}"
  end
  return result
end
metrics_jobs_get(opts = {}) click to toggle source

Returns job metrics. Returns job metrics. @param [Hash] opts the optional parameters @option opts [Array<String>] :metric Comma-delimited string that includes, in order, the following fields: n * Job FQN (wildcards accepted) n * Instance manager hostname (can be a wildcard)n * Instance ID n * Metric to evaluate n * &#39;From&#39; time (optional)n * &#39;To&#39; time (optional). @option opts [String] :authorization @return [Metrics]

# File lib/apcera/api/metrics_api.rb, line 123
def metrics_jobs_get(opts = {})

  if Configuration.debugging
    Configuration.logger.debug "Calling API: MetricsApi#metrics_jobs_get ..."
  end
  
  
  # resource path
  path = "/metrics/jobs".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'metric'] = opts[:'metric'] if opts[:'metric']

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  _header_accept = []
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
  header_params[:'authorization'] = opts[:'authorization'] if opts[:'authorization']

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  

  auth_names = ['authorization']
  result = @api_client.call_api(:GET, path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Metrics')
  if Configuration.debugging
    Configuration.logger.debug "API called: MetricsApi#metrics_jobs_get. Result: #{result.inspect}"
  end
  return result
end
metrics_route_counters_get(opts = {}) click to toggle source

Returns metrics for counters on the route.

@param [Hash] opts the optional parameters @option opts [Array<String>] :metric @option opts [String] :authorization @return [Metrics]

# File lib/apcera/api/metrics_api.rb, line 176
def metrics_route_counters_get(opts = {})

  if Configuration.debugging
    Configuration.logger.debug "Calling API: MetricsApi#metrics_route_counters_get ..."
  end
  
  
  # resource path
  path = "/metrics/route/counters".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'metric'] = opts[:'metric'] if opts[:'metric']

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  _header_accept = []
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
  header_params[:'authorization'] = opts[:'authorization'] if opts[:'authorization']

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  

  auth_names = ['authorization']
  result = @api_client.call_api(:GET, path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Metrics')
  if Configuration.debugging
    Configuration.logger.debug "API called: MetricsApi#metrics_route_counters_get. Result: #{result.inspect}"
  end
  return result
end
metrics_route_timers_get(opts = {}) click to toggle source

Returns metrics for timers on the route.

@param [Hash] opts the optional parameters @option opts [Array<String>] :metric @option opts [String] :authorization @return [Metrics]

# File lib/apcera/api/metrics_api.rb, line 229
def metrics_route_timers_get(opts = {})

  if Configuration.debugging
    Configuration.logger.debug "Calling API: MetricsApi#metrics_route_timers_get ..."
  end
  
  
  # resource path
  path = "/metrics/route/timers".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'metric'] = opts[:'metric'] if opts[:'metric']

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  _header_accept = []
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
  header_params[:'authorization'] = opts[:'authorization'] if opts[:'authorization']

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  

  auth_names = ['authorization']
  result = @api_client.call_api(:GET, path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Metrics')
  if Configuration.debugging
    Configuration.logger.debug "API called: MetricsApi#metrics_route_timers_get. Result: #{result.inspect}"
  end
  return result
end