Class: Cloudwatch::Sender::Base
- Inherits:
-
Object
- Object
- Cloudwatch::Sender::Base
- Defined in:
- lib/cloudwatch/sender/base.rb
Instance Attribute Summary collapse
-
#influxdb ⇒ Object
readonly
Returns the value of attribute influxdb.
-
#metric_prefix ⇒ Object
readonly
Returns the value of attribute metric_prefix.
Instance Method Summary collapse
-
#initialize(options, metric_prefix) ⇒ Base
constructor
A new instance of Base.
- #write_data(data) ⇒ Object
Constructor Details
#initialize(options, metric_prefix) ⇒ Base
Returns a new instance of Base.
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/cloudwatch/sender/base.rb', line 6 def initialize(, metric_prefix) @metric_prefix = metric_prefix @influxdb = InfluxDB::Client.new "graphite", :username => ["influx_username"], :password => ["influx_password"], :use_ssl => ["influx_ssl"] || false, :verify_ssl => ["influx_verify_ssl"] || false, :ssl_ca_cert => ["influx_ssl_ca_cert"] || false, :host => ["influx_host"] || false end |
Instance Attribute Details
#influxdb ⇒ Object (readonly)
Returns the value of attribute influxdb.
4 5 6 |
# File 'lib/cloudwatch/sender/base.rb', line 4 def influxdb @influxdb end |
#metric_prefix ⇒ Object (readonly)
Returns the value of attribute metric_prefix.
4 5 6 |
# File 'lib/cloudwatch/sender/base.rb', line 4 def metric_prefix @metric_prefix end |
Instance Method Details
#write_data(data) ⇒ Object
17 18 19 |
# File 'lib/cloudwatch/sender/base.rb', line 17 def write_data(data) influxdb.write_point(metric_prefix, data) end |