Exemple #1
0
 def __init__(self, namespace, region_name='us-east-1', dimensions={}, alarms={}, actions={}, **kwargs):
     Emitter.__init__(self)
     self.namespace = namespace
     self.conn = connect_to_region(region_name, **kwargs)
     # Set our dimensions, including instance ID
     self.dims = dimensions or {}
     self.setInstanceId()
     # Make sure our actions exist...
     self.actions = {}
     # Store our AWS credential args for later
     self.kwargs = kwargs
     self.updateActions(actions)
     # Now update our alarms
     self.updateAlarms(alarms)
Exemple #2
0
 def __init__(self, namespace, region_name=None, dimensions={}, alarms={}, actions={}, **kwargs):
     Emitter.__init__(self)
     if not region_name:
       region_name = get_instance_metadata()['placement']['availability-zone'][:-1]
     self.namespace = namespace
     self.conn = connect_to_region(region_name, **kwargs)
     # Set our dimensions, including instance ID
     self.dims = dimensions or {}
     self.setInstanceId()
     # Make sure our actions exist...
     self.actions = {}
     # Store our AWS credential args for later
     self.kwargs = kwargs
     self.updateActions(actions)
     # Now update our alarms
     self.updateAlarms(alarms)
Exemple #3
0
 def __init__(self,
              namespace,
              region_name='us-east-1',
              dimensions={},
              alarms={},
              actions={},
              **kwargs):
     Emitter.__init__(self)
     self.namespace = namespace
     self.conn = connect_to_region(region_name, **kwargs)
     # Set our dimensions, including instance ID
     self.dims = dimensions or {}
     self.setInstanceId()
     # Make sure our actions exist...
     self.actions = {}
     # Store our AWS credential args for later
     self.kwargs = kwargs
     self.updateActions(actions)
     # Now update our alarms
     self.updateAlarms(alarms)
Exemple #4
0
 def __init__(self,
              namespace,
              region_name=None,
              dimensions={},
              alarms={},
              actions={},
              **kwargs):
     Emitter.__init__(self)
     if not region_name:
         region_name = get_instance_metadata(
         )['placement']['availability-zone'][:-1]
     self.namespace = namespace
     self.conn = connect_to_region(region_name, **kwargs)
     # Set our dimensions, including instance ID
     self.dims = dimensions or {}
     self.setInstanceId()
     # Make sure our actions exist...
     self.actions = {}
     # Store our AWS credential args for later
     self.kwargs = kwargs
     self.updateActions(actions)
     # Now update our alarms
     self.updateAlarms(alarms)