influxdb-rails icon indicating copy to clipboard operation
influxdb-rails copied to clipboard

More flexible client configuration

Open anlek opened this issue 5 years ago • 2 comments

With the following config:

InfluxDB::Rails.configure do |config|
  config.client.hosts = ['localhost']
  config.client.port = 8086
  config.client.username = 'root'
  config.client.password = 'pa$$word'
  config.client.auth_method = 'basic_auth'

When my app loads, I get a undefined method 'auth_method=' for #<InfluxDB::Rails::ClientConfig:0x000055af834ef718> (NoMethodError)

However, if I remove it and enter a rails console, I can set it to InfluxDB::Rails.client.config.auth_method = 'basic_auth' and am able to write_point without any issues.

Am I missing something?

anlek avatar Nov 04 '19 23:11 anlek

I guess we shouldn't hardcode client configuration and allow anything you want to pass in so we don't have to run after influxdb-ruby options.

hennevogel avatar Nov 06 '19 10:11 hennevogel

:+1: on this. That this gem only allows a limited number of configuration options is no benefit to any user. Also, if influxdb-ruby ever changes configuration on their end this gem must follow suit, or else it becomes unusable.

radiospiel avatar Apr 15 '20 15:04 radiospiel