X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osm_mon%2Fplugins%2FCloudWatch%2Fconnection.py;h=023071f09a1ea27260bdb8e4f781ed50b3e4a8a5;hb=refs%2Fchanges%2F24%2F5824%2F1;hp=609f6aa2d611727b2de30e52d171873fa1684565;hpb=715a0ae6b46d22171c0f98c989cd971ea8b306bc;p=osm%2FMON.git diff --git a/osm_mon/plugins/CloudWatch/connection.py b/osm_mon/plugins/CloudWatch/connection.py index 609f6aa..023071f 100644 --- a/osm_mon/plugins/CloudWatch/connection.py +++ b/osm_mon/plugins/CloudWatch/connection.py @@ -35,7 +35,7 @@ try: import boto.vpc import boto.ec2.cloudwatch import boto.ec2.connection - import logging as log + import logging from boto.ec2.cloudwatch.alarm import MetricAlarm from boto.ec2.cloudwatch.dimension import Dimension from boto.sns import connect_to_region @@ -44,6 +44,7 @@ try: except: exit("Boto not avialable. Try activating your virtualenv OR `pip install boto`") +log = logging.getLogger(__name__) class Connection(): """Connection Establishement with AWS -- VPC/EC2/CloudWatch""" @@ -57,7 +58,7 @@ class Connection(): self.AWS_REGION = os.environ.get("AWS_EC2_REGION","us-west-2") #TODO Read from the cloudwatch_credentials.txt file - + return self.connection_instance() except Exception as e: log.error("AWS Credentials not configured, Try setting the access credentials first %s: ",str(e))