pyrax
Python Bindings for the Rackspace Cloud
 All Classes Namespaces Files Functions Variables Properties
Public Member Functions
CloudMonitorEntity Class Reference
Inheritance diagram for CloudMonitorEntity:
BaseResource FakeCloudMonitorEntity

List of all members.

Public Member Functions

def __init__
def update
 Only the agent_id and metadata are able to be updated via the API.
def get_check
 Returns an instance of the specified check.
def list_checks
 Returns a list of the checks defined for this account.
def find_all_checks
 Finds all checks for this entity with attributes matching ``**kwargs``.
def create_check
 Creates a check on this entity with the specified attributes.
def update_check
 Updates an existing check with any of the parameters.
def delete_check
 Deletes the specified check from this entity.
def list_metrics
 Returns a list of all the metrics associated with the specified check.
def get_metric_data_points
 Returns the data points for a given metric for the given period.
def create_alarm
 Creates an alarm that binds the check on this entity with a notification plan.
def update_alarm
 Updates an existing alarm on this entity.
def list_alarms
 Returns a list of all the alarms created on this entity.
def get_alarm
 Returns the alarm with the specified ID for this entity.
def delete_alarm
 Deletes the specified alarm.
def name

Constructor & Destructor Documentation

def __init__ (   self,
  args,
  kwargs 
)

Reimplemented in FakeCloudMonitorEntity.


Member Function Documentation

def create_alarm (   self,
  check,
  notification_plan,
  criteria = None,
  disabled = False,
  label = None,
  name = None,
  metadata = None 
)

Creates an alarm that binds the check on this entity with a notification plan.

def create_check (   self,
  label = None,
  name = None,
  check_type = None,
  disabled = False,
  metadata = None,
  details = None,
  monitoring_zones_poll = None,
  timeout = None,
  period = None,
  target_alias = None,
  target_hostname = None,
  target_receiver = None,
  test_only = False,
  include_debug = False 
)

Creates a check on this entity with the specified attributes.

The 'details' parameter should be a dict with the keys as the option name, and the value as the desired setting.

def delete_alarm (   self,
  alarm 
)

Deletes the specified alarm.

def delete_check (   self,
  check 
)

Deletes the specified check from this entity.

def find_all_checks (   self,
  kwargs 
)

Finds all checks for this entity with attributes matching ``**kwargs``.

This isn't very efficient: it loads the entire list then filters on the Python side.

def get_alarm (   self,
  alarm 
)

Returns the alarm with the specified ID for this entity.

If a CloudMonitorAlarm instance is passed, returns a new CloudMonitorAlarm object with the current state from the API.

def get_check (   self,
  check 
)

Returns an instance of the specified check.

def get_metric_data_points (   self,
  check,
  metric,
  start,
  end,
  points = None,
  resolution = None,
  stats = None 
)

Returns the data points for a given metric for the given period.

The 'start' and 'end' times must be specified; they can be be either Python date/datetime values, or a Unix timestamp.

The 'points' parameter represents the number of points to return. The 'resolution' parameter represents the granularity of the data. You must specify either 'points' or 'resolution'. The allowed values for resolution are: FULL MIN5 MIN20 MIN60 MIN240 MIN1440

Finally, the 'stats' parameter specifies the stats you want returned. By default only the 'average' is returned. You omit this parameter, pass in a single value, or pass in a list of values. The allowed values are: average variance min max

def list_alarms (   self,
  limit = None,
  marker = None,
  return_next = False 
)

Returns a list of all the alarms created on this entity.

def list_checks (   self,
  limit = None,
  marker = None,
  return_next = False 
)

Returns a list of the checks defined for this account.

By default the number returned is limited to 100; you can define the number to return by optionally passing a value for the 'limit' parameter. The value for limit must be at least 1, and can be up to 1000.

For pagination, you must also specify the 'marker' parameter. This is the ID of the first item to return. To get this, pass True for the 'return_next' parameter, and the response will be a 2-tuple, with the first element being the list of checks, and the second the ID of the next item. If there is no next item, the second element will be None.

def list_metrics (   self,
  check,
  limit = None,
  marker = None,
  return_next = False 
)

Returns a list of all the metrics associated with the specified check.

def name (   self)
def update (   self,
  agent = None,
  metadata = None 
)

Only the agent_id and metadata are able to be updated via the API.

def update_alarm (   self,
  alarm,
  criteria = None,
  disabled = False,
  label = None,
  name = None,
  metadata = None 
)

Updates an existing alarm on this entity.

def update_check (   self,
  check,
  label = None,
  name = None,
  disabled = None,
  metadata = None,
  monitoring_zones_poll = None,
  timeout = None,
  period = None,
  target_alias = None,
  target_hostname = None,
  target_receiver = None 
)

Updates an existing check with any of the parameters.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Properties