Package cm_api :: Package endpoints :: Module timeseries
[hide private]
[frames] | no frames]

Module timeseries

source code

Classes [hide private]
  ApiTimeSeriesCrossEntityMetadata
  ApiTimeSeriesAggregateStatistics
  ApiTimeSeriesData
  ApiTimeSeriesMetadata
  ApiTimeSeries
  ApiTimeSeriesResponse
  ApiMetricSchema
  ApiTimeSeriesEntityAttribute
  ApiTimeSeriesEntityType
Functions [hide private]
 
query_timeseries(resource_root, query, from_time=None, to_time=None, desired_rollup=None, must_use_desired_rollup=None, by_post=False)
Query for time series data from the CM time series data store.
source code
 
get_metric_schema(resource_root)
Get the schema for all of the metrics.
source code
 
get_entity_types(resource_root)
Get the time series entity types that CM monitors.
source code
 
get_entity_attributes(resource_root)
Get the time series entity attributes that CM monitors.
source code
Variables [hide private]
  TIME_SERIES_PATH = '/timeseries'
  METRIC_SCHEMA_PATH = '/timeseries/schema'
  METRIC_ENTITY_TYPE_PATH = '/timeseries/entityTypes'
  METRIC_ENTITY_ATTR_PATH = '/timeseries/entityTypeAttributes'
  __package__ = 'cm_api.endpoints'
Function Details [hide private]

query_timeseries(resource_root, query, from_time=None, to_time=None, desired_rollup=None, must_use_desired_rollup=None, by_post=False)

source code 

Query for time series data from the CM time series data store.

Parameters:
  • query - Query string.
  • from_time (datetime.datetime Note the that datetime must either be time zone aware or specified in the server time zone. See the python datetime documentation for more details about python's time zone handling.) - Start of the period to query (optional).
  • to_time (datetime.datetime Note the that datetime must either be time zone aware or specified in the server time zone. See the python datetime documentation for more details about python's time zone handling.) - End of the period to query (default = now). This may be an ISO format string, or a datetime object.
  • desired_rollup - The aggregate rollup to get data for. This can be RAW, TEN_MINUTELY, HOURLY, SIX_HOURLY, DAILY, or WEEKLY. Note that rollup desired is only a hint unless must_use_desired_rollup is set to true.
  • must_use_desired_rollup - Indicates that the monitoring server should return the data at the rollup desired.
  • by_post - If true, an HTTP POST request will be made to server. This allows longer query string to be accepted compared to HTTP GET request.
Returns:
List of ApiTimeSeriesResponse

get_metric_schema(resource_root)

source code 

Get the schema for all of the metrics.

Returns:
List of metric schema.

get_entity_types(resource_root)

source code 

Get the time series entity types that CM monitors.

Returns:
List of time series entity type.

get_entity_attributes(resource_root)

source code 

Get the time series entity attributes that CM monitors.

Returns:
List of time series entity attribute.