Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug fixes databasename and aws namespace #18

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/cloudwatch/sender/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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"] || "graphite",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should just drop the default, require users to have a DB in the config file

:username => options["influx_username"],
:password => options["influx_password"],
:use_ssl => options["influx_ssl"] || false,
Expand Down
2 changes: 1 addition & 1 deletion lib/cloudwatch/sender/fetcher/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
namespace.start_with?("AWS/EC2") || namespace.start_with?("AWS/SQS") ? Object.const_get(class_namespace component_meta) : Cloudwatch::Sender::Fetcher::Custom
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we add more metrics, this could be hard to maintain, would be better to capture all aws metrics

end

def class_namespace(component_meta)
Expand Down