diff --git a/lib/cloudwatch/sender/base.rb b/lib/cloudwatch/sender/base.rb index a0b5637..637442b 100644 --- a/lib/cloudwatch/sender/base.rb +++ b/lib/cloudwatch/sender/base.rb @@ -5,7 +5,7 @@ class Base def initialize(options, metric_prefix) @metric_prefix = metric_prefix - @influxdb = InfluxDB::Client.new "graphite", + @influxdb = InfluxDB::Client.new options["influx_database"], :username => options["influx_username"], :password => options["influx_password"], :use_ssl => options["influx_ssl"] || false, diff --git a/lib/cloudwatch/sender/fetcher/base.rb b/lib/cloudwatch/sender/fetcher/base.rb index 1f799b6..ae5320a 100644 --- a/lib/cloudwatch/sender/fetcher/base.rb +++ b/lib/cloudwatch/sender/fetcher/base.rb @@ -26,7 +26,7 @@ def extract_class_name(component_meta) end def fetcher(component_meta) - namespace.start_with?("AWS/") ? Object.const_get(class_namespace component_meta) : Cloudwatch::Sender::Fetcher::Custom + Object.const_defined?(class_namespace component_meta) ? Object.const_get(class_namespace component_meta) : Cloudwatch::Sender::Fetcher::Custom end def class_namespace(component_meta)